Baking lighting
Baking computes lighting ahead of time, so it doesn't have to be calculated while the game runs. It's the main way to get good lighting on lower-end hardware.
How to bake
-
Add a Lightmap Volume around the area you want baked: Add › Lighting › Lightmap Volume.
-
For lighting and reflections on moving objects, add Reflection Probes and Irradiance Probes from the same menu.
-
Click Bake in the toolbar and pick what to bake: Lightmaps, Reflection Probes, Irradiance Probes, Fog Volumes or Static Shadows.
Progress is shown in an overlay while the bake runs.
When you change something a bake depends on, like moving a static object or a light, the editor shows what needs a rebake in an overlay.
What gets baked
| Type | What it is |
|---|---|
| Lightmaps | Light bouncing around your static geometry, saved into textures. Lightmap UVs are generated for you. |
| Reflection probes | What the world looks like from a point, for shiny surfaces. |
| Irradiance probes | How much light reaches a point, for lighting things that move. |
| Fog volumes | Light from static lights scattering through fog volumes. |
| Static shadows | Shadow maps for static point and spot lights with Bake static shadow map ticked. See lights & shadows. |
Baking runs on the GPU. It uses hardware ray tracing when available, and compute shaders otherwise.
Settings
Bake settings live in the "Baker" section of Config/EngineConfig.json:
| Setting | What it does |
|---|---|
| NumSamples | More samples, less noise, longer bakes. The default config uses 1. |
| MaxRayDistance | How far rays travel looking for light. Defaults to 1000. |
| ForceComputeTracing | Use the compute path even when hardware ray tracing is available. Also the Baking.ForceComputeTracing CVar. |
Each swatch has its own bake.
