shown in other instead.
Bake Lighting Window
Bake Lighting is a tool that incorporates all light baking tasks. It is used for the following operations:
- Calculate GI and bake into lightmaps associated with surfaces.
- Calculate static voxel-based GI and put it into generated voxel lighting maps.
- Calculate reflection cubemaps for Environment Probes in static mode.
- Calculate shadow maps for light sources in static mode.
The Bake Lighting tool enables you to improve performance by dropping the most of light and shadow computations.
Basically, light baking is available if there is at least one entity of the following ones is in the scene:
- Voxel probe
- Environment probe in Static mode with Grab by Bake Lighting enabled.
- Mesh Static with at least one surface that has Lightmaps and Bake flags enabled.
- Light source in Static mode.
To get the lighting baked, perform the following steps:
Prepare the scene: set up lighting and emissive geometry, choose the light baking mode, hide or exclude unnecessary and dynamic objects from calculations via masking and/or adjusting surface flags.
Create and place voxel probes at the places where the lighting remains relatively static (e.g. interiors, outdoor buildings, and immovable objects).
Place voxel probes inside other voxel probes to create insets defining the areas that require higher detail. Note that voxel probes with the additive blending mode enabled cannot be used for this purpose, as they are blended instead of replacing each other.
Create non-dynamic environment probes and cover the areas which require appropriate reflections on reflective materials.
Disable the Grab by Bake Lighting parameter for probes, the cubemap texture of which should not be modified by the Bake Lighting tool. This is applicable for cases when you do not want to modify your assets and are going to generate new ones.
- Adjust the Baking Settings of probes and the settings of the Bake Lighting tool.
Click Bake to begin light baking for all enabled light sources (or Bake selected lights to affect only selected light sources) and wait for the process to complete.
At this stage, the Bake Lighting tool performs the following:
You can stop the process at any moment and you will be prompted to keep the achieved result or restore the previous textures.
- For each enabled Omni and Projected light source in the Static mode the shadow map is grabbed and saved in the Depth Texture asset.
- For each enabled World light source in the Static Shadow Cascade mode the shadow map is grabbed and saved in the Depth Texture asset.
- For each enabled Environment Probe, a cubemap is grabbed from the center point of the probe depending on its parameters.
- For each enabled Voxel Probe, a cycle over all the voxels is performed in order to grab lighting from 6 faces of a voxel and append it to the resulting 3D lighting map.
Enable post and camera effects.
Bake Lighting Settings#
Bake Static Shadows For Lights#
|Bake Static Shadows For Lights||Enable baking of cached shadows for static light sources.|
|Automatic Rebake||Enable auto-rebake of shadows on transforming a static light source or changing its parameters.|
Bake Lightmaps For Surfaces#
|Bake Lightmaps For Surfaces||Enable baking of lightmaps for surfaces.|
|Baking Viewport Masks||For the light or surface to contribute to static GI, their viewport masks should match the camera's viewport mask.|
|Quality||Baking quality preset.|
|Far Clipping||Far clipping distance for light rays.|
Bake Voxel Probes#
|Bake Voxel Probes||Enable baking of voxel-based GI to voxel probes.|
|Voxel Size Multiplier||Multiplier for the Voxel Size parameter for each voxel probe.|
Bake Environment Probes#
|Bake Environment Probes||Enable baking of reflection cubemaps to environment probes.|
|Automatic Rebake||Enable auto-rebake of the cubemap of an environment probe on transforming it or changing its parameters.|
|Number of Bounces||Number of light ray bounces.|
|Samples per Frame||Number of sampling units processed and visualized simultaneously each frame (samples for lightmaps and voxels for voxel probes):
The parameter is available for changing during the baking process. Higher values cause longer user interface response but accelerate the calculations.
|Node/Surface||Progress of light baking for the current node/surface at the moment.|
|Bounce||Progress of calculating the current bounce.|
|Overall||Overall progress of light baking for all nodes in the scene.|
|Bake Selected||Starts baking for the selected static lights, probes and lightmapped objects regardless of whether they are enabled or not.|
|Bake/Stop||Starts baking for all enabled static lights, probes and lightmapped surfaces in the scene.|