Why would realtime illumination not work for mixed lights?

I am trying to set up mixed lighting for realtime shadows in a scene that was originally configured only for baked lighting. However, I cannot get mixed lighting to work, because in this scene mixed lights behave identically to baked lights.

When I add a new real-time light to the scene, it creates realtime illumination and shadows on both static and non-static GameObjects as normal. If I switch it to “Mixed” and bake the scene, the light bakes correctly on static GameObjects, but stops casting realtime illumination and shadows on non-static GameObjects (in other words, it behaves exactly the same as a light set to “Baked”). Likewise, if I change an existing Baked light to Mixed and re-bake, the light continues to behave as if it was set to “Baked”, with no realtime illumination or shadows.

Once a Mixed or Baked light has been baked, switching its mode to “Realtime” has no immediate effect. I have to re-bake the scene to get the light to behave correctly. However, if I duplicate the light, the duplicate will behave as a real-time light without needing to re-bake the scene.

  • Scene Lighting Mode is set to “Shadowmask”
  • Shadow maps are enabled in the HDRP settings
  • Shadow maps are enabled in the light settings for each light, with resolution set to 2048, and configured to update Every Frame.
  • All lights and meshes use the default lighting layer.
  • I’ve played around with the Volume Profile settings for the scene but it does not affect this mixed-lighting issue.

So far I’ve only observed this behavior in one scene; if I create a new scene and throw together a quick test configuration, Mixed lights behave the way they’re supposed to.

Why would Mixed lights behave like Baked lights in one scene?

  • Unity 2020.3.16f1

  • HDRP 10.6.0

  • Baking with Progressive GPU lightmapper

Apparently the scene was hitting the odd limitation that if more than 4 mixed lights have overlapping areas, some of the overlapping lights will be treated as baked-only. Because the original artist has only designed the scene for baking, the light ranges were set extremely high and all of the lights in the scene were considered to be overlapping.

See the Light Overlap section on this page.

Looks like we’re screwed here, as changing the range of the lights enough to stop them from overlapping drastically alters the overall baked appearance of the scene.

2 Likes