Baking lightmaps ingame

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Bourdul

Hello. At some point in my game project, I’ll need a room to appear from nothing. The point it that this room can pop anywhere, any direction. Is it possible to trigger a lightmap bake while the game is running ?

I think it is possible to bake lightmaps when a game is running. But why would you? Baked lightmaps are used when real time lighting isn’t an option (i.e. the machine your game is running on doesn’t have the capabilities to perform real time lighting).

Ertain | 2020-11-24 19:43

The sun orientation might change, the room might change orientation too. And lighting inside of if might change as well. Though, it’ll not change while the player can see it.

The goal is to bake the lightmap of the room while the player is somewhere else for it to be ready when the player comes in.

Bourdul | 2020-11-24 19:56

I would recommend against baking the lights at runtime because it may take a lot of system resources just to bake the lights in the room. That potentially means a lot of loading and slowdown for the player.

Ertain | 2020-11-24 21:20