How do you light a Night time exterior scene with directional moonlight for a day-night cycle system in UE5

Hi, I’ve been trying to set up a day-night cycle system in my UE5 project, while the new directional light + sky atmosphere made it incredibly easy to set up lighting between sun rise to sun set, I’m completely clueless on how I can transition that into a night time lighting with moon as directional light then back to sunrise, because by default it goes completely black at night time. I can’t find any good setting in directional light or sky atmosphere that allow me to fix that. Any help is appreciated, thanks!

I’ve spent the last few weeks looking at this.
There’s a few good tutorials on YouTube which demonstrate how you can go about achieving a semi-decent looking night scene.

  • Add in a second directional light, labelled “Moonlight” or something relevant
  • Set the “Atmosphere Sun Light” checkbox to checked under sub-section “Atmosphere and Cloud”.
  • Under the Advanced properties of the same section, set the “Atmosphere Sun Light Index” to 1 (Moon/Second Sun).
  • Offset the rotation of the directional light by 180 degrees (If you have a time of day already calculated, you can then nest this new light source under your existing Sun light source, so its always “12 hours” behind revealing the moonlight at “night” time.

This guy covers the basics you need, but there are a few issues:

  1. The “Moon” isn’t a moon, its simply a ball of blue light.
  2. The Stars are visible through the clouds, and need to be adjusted.
  3. All rotation is fixed on the Sun’s position, which is odd, and does some weird movements at both the solar-noon and lunar-noon which makes the stars rotate wildly.
  4. The hour progression doesn’t factor in the days of the month, or the months of the year, or even progress the year.
1 Like