Website powered by

Day/Night Light Switcher and Shadow Optimisation

In our ongoing project there was a issue for a while with the lights. Well lights during the day are not really realistic, also it ate tons of resources for nothing. I wrote a BP to solve that issue, it takes the time info from Ultra Dynamic Sky and checks if the lights should be on, or not. Then if it has to change it does in a bit random matter to keep an organic feeling. Also I made a Cull Shadow by Distance check in it, so the lights are now way cheaper than before and we could keep more dynamic shadows in the scene without crazy performance cost.

Turning On and Off the light randomly with a nice transition. It makes the scenery more organic as the lights of the town won't turn up in the same moment.

As we all know the dynamic shadows are not cheap at all, but we wanted to have a long Draw Distance on them, but have some nice shadows when we are close. I found a solution to make a nice fade out for the shadows and they culled after a distance.

It is possible to add particle effect to the BP Actor, and it controls the effects as well. Altough I have to add some transition to avoid the abrupt change.

The BP itself is not heavy, run on Timer for the frequent checks. Optimised to run on minimal resources when there is nothing to be changed. Also it only runs when the player is nearby.

The BP itself is not heavy, run on Timer for the frequent checks. Optimised to run on minimal resources when there is nothing to be changed. Also it only runs when the player is nearby.

In action in our WIP project.