Lightmapping Troubleshooting Guide

Chapter 1: No baked global illumination in the scene


Figure 1. Cornell Box scene rendered with no global illumination (left) and with baked global illumination (right).

1.1 Why does this happen?
If some prerequisites are not met, Progressive Lightmapper might fail to generate lighting in your scene. These include, but are not limited to:

  • No objects are marked as GI Contributors
  • No baked lights in the scene
  • Shader issues

1.2 How to fix it?
1.2.1 Mark GameObjects as GI Contributors


Figure 2. Contribute GI settings under the Mesh Renderer component.

Mark objects you want to lightmap as GI Contributors. To do so follow these steps:

  • Select your GameObject.
  • Navigate to the Mesh Renderer component.
  • Unfold the Lighting header.
  • Check the Contribute to Global Illumination checkbox.

Doing so will enable the Receive Global Illumination parameter underneath. It contains two options:

  • Lightmaps. Meant for static lightmapped objects. GameObject will receive and contribute GI to lightmaps.
  • Light Probes. Meant for small props, and objects not fit for lightmapping. GameObject will receive GI from light probes and will contribute GI to the surrounding lightmaps.

1.2.2 Inspect scene lights
Only mixed and baked lights can contribute to baked GI. Select lights in your scene, and make sure that in the Light component, Mode is set to either Mixed or Baked.

Other properties which are worth checking are:

  • Color. Dark colors will have low or no GI contribution. Choose bright colors for lights and use the Intensity property to boost or dim them.
  • Intensity. The higher the intensity, the brighter the light. Ensure that your lights are bright enough for meaningful GI contribution.
  • Indirect Multiplier. This property controls the intensity of the indirect bounce. Make sure that it is not set to zero. Otherwise, the light will have no contribution to GI at all. Note that setting this value above one will make the lighting in your scene non-compliant with the PBR standard.

1.2.3 Inspect the Lighting Setting Asset
In the Lighting window, accessible via Window > Rendering > Lighting, make sure that the Lighting Settings Asset field is not blank. If there is no asset assigned, click on the New Lighting Settings button. This will create and assign an asset, unlocking the properties in the window for editing.

Once you have done that, check for the following issues:

  • Ensure that you have ticked the Baked Global Illumination checkbox. This enables baked GI computations. This checkbox will also expose the Lighting Mode dropdown.
  • Check that the Max Bounces value is not set to zero. The higher this value, the more the light will bounce around the environment.
  • Check that the Indirect Intensity slider is not set to zero. Setting this slider to zero will diminish all indirect lighting in the scene.

1.2.4 Inspect shaders and materials
Custom shaders could be the reason why GI computation has failed. For debug purposes, use built-in shaders that come with the Unity editor. Those are:

  • Standard shader. Available in the built-in render pipeline.
  • Lit shader. Available in the Universal Render Pipeline.
  • Lit shader. Available in the High-Definition Render Pipeline.

If Unity generates lighting after switching to one of the shaders outlined above, the problem might be with custom shaders. In such cases, make sure that your surface shaders contain the LIGHTMAP_ON shader keyword.

Check out the meta pass page on how to further customize the baked GI output using shaders.

1.2.5 Other potential fixes
If the above-mentioned steps did not solve the problem, please try the following:

  • Make sure that the lights are not placed inside scene geometry.
  • Enable Mixed Lighting toggle in the Universal Render Pipeline Asset.
  • Select a different lightmapping backend in the Lighting window. If lighting fails to bake when using the Progressive GPU, but succeeds when baking with the Progressive CPU, this might be a result of a hardware or driver problem.
  • Update the GPU drivers. Please refer to the GPU manufacturer’s page for the correct drivers for your system. For Linux machines, please check the Linux driver setup section in this forum thread .
  • Ensure that your GPU meets the minimum requirements. Please refer to this forum thread for details.
  • Clear the GI Cache. To clear it, navigate to Preferences > GI Cache and click on the Clean Cache button. Keep in mind that this will delete all lighting data present in the scene, requiring you to regenerate lighting.
4 Likes