What is a lightmap?
CGI Visualization to Perfection
Danthree Studio turns complex 3D tech into high-converting marketing assets. Get high-end quality for your brand.
Discuss your projectWhat is a lightmap?
Lightmap definition
A lightmap stores precalculated surface lighting. The direct and indirect components included depend on the method. Lightmapping bakes this information into textures for an application to read later. This can reduce calculations at runtime, but it uses texture memory and has limits when lighting, geometry, or materials change.
How lightmapping works
- Prepare the scene and decide which lighting will remain fixed.
- Prepare suitable UV coordinates without overlapping regions. A separate UV channel is often used; its assignment depends on the application.
- The lightmapper calculates the chosen lighting components for the texels. Ambient occlusion is a complementary effect, not a substitute for indirect lighting.
- Store the lighting data in the target application's format. Encoding, resolution, and any directional information depend on the method.
- The shader evaluates the lightmap alongside the material. Other lighting, reflections, and moving objects may still require runtime calculations.
Lightmaps compared with dynamic lighting
| Criterion | Baked lightmap | Dynamic lighting |
|---|---|---|
| Performance | Less lighting computation, additional texture memory | Depends on the method, scene, and device |
| Later changes | Baked components usually need to be recalculated | Supported lighting changes are calculated at runtime |
| Appearance | Fixed lighting, with possible UV, resolution, and compression artifacts | Dynamic, with method-dependent sampling and shadow artifacts |
| Production Costs | UV preparation, bake time, and review | Lighting setup and optimization for target hardware |
From Technical Term to Visual Experience
We don't just use these technologies; we master them. See how we create photorealistic worlds for leading brands.
View WorkA five-step workflow
1. Prepare UV assignment and resolution
Give surfaces that receive different lighting their own UV regions. Island spacing, resolution, filtering, and compression must work together. A universal padding value of 4 to 16 pixels is not appropriate for every application. See Epic's guide to lightmap UVs and padding.
For the basics, see our UV mapping explanation.
2. Set up lighting and test bakes
Decide which lighting components are baked and which remain dynamic. Small test bakes help reveal light distribution and obvious leaks. Final resolution depends on the scene, viewing distance, and device.
Lighting design remains important, including for 3D animation.
3. Bake for the target application
Use the encoding and color-space interpretation expected by the application. A lightmap is not always an interchangeable linear 16-bit image. Decide how separate AO will combine with lighting.
Read more about texture baking.
A baked shadow in a still image is not automatically a lightmap for an interactive application; product packshots are a separate image type.
4. Integrate with the engine or viewer
Check material support, UV channel, and lighting intensity. Three.js documents lightMap in MeshStandardMaterial; Unity and Unreal have their own workflows. Do not add baked lighting or AO a second time without checking the combined effect.
An interactive room and a 360° tour do not necessarily use the same lighting method.
See also Unreal Engine and virtual production.
5. Review in the target environment
Check seams, light leaks, shadow resolution, and materials. Test the planned product variations, camera movements, and devices. Record settings and reference images so later changes can be compared.
For product imagery, the lighting needs to suit the material. A project image alone does not establish that lightmaps were used to make it.
Practical checks
- UV spacing: Choose padding for the resolution and filtering in use.
- Resolution: Base it on visible area and shadow detail. Higher resolutions require more memory and may increase download size.
- AO: Check additional darkening. It must not obscure material details or unintentionally double shadows.
- Color space: Encoding and decoding must agree; a lighting texture is not necessarily an ordinary color image.
- Variations: Even baked indirect lighting can depend on material color. Review the bake when finishes or shapes change.
Common errors
- Overlapping UVs: Differently lit surfaces receive the same values. Check unique assignment and the UV channel.
- Insufficient padding: Neighboring islands affect each other during filtering. Review spacing and resolution together.
- Low resolution: Shadows lose detail. Adjust texel density to visible needs.
- Light leaks: Check geometry, UVs, resolution, and bake settings. Identify the cause before changing geometry or bake settings.
- Double darkening: Inspect baked and additional AO or shadows separately before combining them.
Lightmap FAQ
Do I need lightmaps if I use ray tracing?
Not necessarily. Ray tracing is a calculation technique that can also be used for baking. An application can combine baked and dynamic lighting. What matters is which parts of the scene need to change and the result achieved on target devices.
Which maps complement a lightmap?
It depends on the material model. Base color, roughness, metalness, and normal maps can describe surface properties; not every channel needs a separate texture. A lightmap stores lighting data. It replaces neither the material definition nor the geometry.
What resolution should a lightmap have?
There is no universal resolution. Visible area, viewing distance, shadow gradients, and memory budget matter. Start with a test bake and increase texel density where it makes a visible difference. An arbitrarily tiled texture cannot replace location-dependent lighting.
Can I edit a lightmap after baking?
Yes, if the format and application allow it. Brightness or color changes must agree with the other lighting components. If geometry, light positions, or relevant materials change, a new bake is often more appropriate than image retouching.
Are lightmaps suitable for product configurators and AR?
They can be useful for fixed parts of a scene. Moving products, changing finishes, and a real AR environment have different requirements. A baked shadow does not automatically fit every variant or placement. Plan lighting and product variations together.
Which lightmappers does Unity offer?
Unity 6.0 documents Progressive Lightmapping with CPU and GPU backends. Platform and available memory help determine the choice. Check your version's documentation and a representative test scene. See Unity's backend selection guide.
How do you check a lightmap before publishing?
Check UV assignment, seams, shadows, color, and loading in the actual target application. Compare planned variants and viewpoints with approved references. A successful bake alone confirms neither product accuracy nor adequate performance on every device.
