I have baked lightmaps using the sxybox and am using mixed lighting so I can have realtime shadows on everything. This is so that I can have a moving sun (i.e directional light) for a day/night cycle. During the day this works fine, but at night the lightmap makes objects too bright, since it uses the daytime skybox. Now the Scene Editor window allows you to adjust the exposure of a lightmap in the Baked Lightmap view. I was wondering if there was a way to script in a reduction in the exposure or intensity of the lightmap at runtime so that the objects are less bright at night.
NOTE: Lightmap switching isn’t necessary, or useful, since I need a smooth reduction in brightness over time, as opposed to the sharp reduction that would happen if I changed to a totally different lightmap.
EDIT: I forgot to mention, I’m trying to do this with URP.
Ah thanks for this, I’m sure someone will find it useful. Problem is, and this is my bad for not mentioning, I’m using URP, since the game is supposed to run on crappy devices. I’ll check it out anyway.
Another variant for URP: change materials (ambient occlusion map coefficient):
occlusion map texture is white, coefficient = 1 , material is normal on light (white, receive all light), this is global day.
occlusion map texture is white, coefficient <1 , material is black on light (black, dont receive all light), this is global night.