Search Unity

Baking lighting for procedurally generated levels

Discussion in 'Global Illumination' started by CF-Games, Mar 5, 2020.

  1. CF-Games

    CF-Games

    Joined:
    Jun 2, 2013
    Posts:
    134
    Hello,

    I'm working on a game that has procedurally generated levels. It uses prefab rooms and connects them together to create a level. The rooms are just a ceiling, walls, and floor. The props are randomly added in after the rooms are placed. This situation seems like it needs to use realtime lights, but using them brings the fps down to 5 for mobile.

    Does anyone know if it's possible to bake lighting/reflection probes/light probes for the rooms and save that data to each room's prefab? Baking lighting currently seems to be saved to the scene, which doesn't work for me since the scene starts empty.
     
  2. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    With custom shader you could create a lightmap g buffer that would update only when light change