Day and Night Cycle with lightmaps

Hi i want to have a day night cycle in my game. The game is kinda catoony so so it dosent matter that the shadows dont move. It dosent have to be that realistic. I am wondering
if i can change color/brightness of the light in real time if im using alot of staic light and if so how.

You have to use stationary lights for that. Set up a directional light and a skylight and you can change the light color and intensity later. The trick is to set the values, particularly the indirect llight contribution in such a way that they look good in day and night. For the night I use some blueish tint which mostly looks OK at night although it is unrealistic. Good luck.

Also adjusting the post processing or using a lut to set the night mood.

The quick answer is yes you can control lightmaps for day and night cycles depending what kind of output you require.

First bit of info. The only time you need to rebuild lighting is if you change the position of the lights when using static lighting.

If you use dynamite lighting (aka movable lights) you don’t need to rebuild at all but you will be trading off performance, which is not a bad thing depending on the type of game you are making.

Overall though UE4 continues to offer upgrades that improves performance in areas as to what once was considered to much of a performance hit.

Forward rendering for example has some to a lot of benefits as to increasing performance with out the need to decrease visual quality.

Using lighting scenario levels you can build a lighting solution to switch between day and night

Using postprocessing volumes you can add an HDRI image that you can increase or decrease the lighting level based on the direct and indirect lighting solution

Another tool to add to the mix is distance field effect where based on the distance from the camera the quality of the shadows can be tailored or even renderr4ed only when the player comes in to view of the player. This feature should recover the performance loss when using dynamic lighting.

Based on your need however, since shadows is not an important factor, postprocessing could be the best option as it only effects the lightmaps behavior as to it’s output so the lighting does not need to be rebuilt as would be needed if making a more realistic blend between night and day.

Thank you! :slight_smile:

You can change the color and intesity of a stationary skylight while keeping the baked shadows, same for stationary directional lights. So if you don’t need the shadows to move, it’s quite doable.