How to make fast or instant day/night cycle?

Hello everyone,

I created a map and I want to make day/night cycle on the map, but this is going to be fast, sometimes instant. For example, when the player enters a trigger box, the daytime will become night time in 1-2 minutes. Until the player enters the trigger box, the position of the sun will not change and the player should be able to see the transition but this is going to be fast. Other example, when the player enters a tunnel, the daytime will become night time instantly, so when the player exits the tunnel, the environment will be dark. To do this, do I have to use moveable lights? I think, moveable lights are not as optimized as static lights.

Dynamic (movable) lights are definitely the right way to go if you need a day/night cycle. Yes, dynamic lighting can carry significant performance costs, but Fortnight, for example, accomplishes its day/night cycle using totally dynamic lighting. So it can be done.

This is not to say that it’s easy, however. It’s a challenge to create dynamic lighting that:

  • Looks good at all “hours” of your day’s cycle
  • Is easy to control (change cycle speed, instantly change to day or night, etc.)
  • Is performance friendly (e.g. doesn’t destroy your frame rate)

If you want to learn more about the lighting techniques used in Fortnight, you can check out this video presentation from GDC 2018: Fortnite’s Real-Time Lighting Techniques and Tools

As for how you, specifically, can make your dynamic day/night lighting change quickly from day to night or vice versa, that’s going to depend a lot on how you choose to build your lighting “system.” There’s surely more than one “correct” solution for this problem, but which works best for your project is up to you.

I know this answer lacks specific examples, but I hope it’s helpful nonetheless!

It looks like what I’m looking for. Thank you.

There is an experimental plugin that comes with UE4.21 that lets you create an accurate sun system.

It’s then pretty easy to manipulate using blueprints:

https://docs.unrealengine.com/en-us/Engine/Rendering/LightingAndShadows/SunPositioner

It tells you how to enable it and use it.

I’m using UE4.20. I don’t want to move the project to UE4.21 because it may cause some issues, but I’ll try if it comes in handy. Thank you.