Download

[HELP] Sun shines under the landscape - Day/Night cycle WIP

Hello, I"m working on a day and night cycle for my game. As you can see in the video provided below, the sun and moon are almost set (moon at 20% of progress), but I have an issue while the sun goes down the horizon, my meshes are illuminated upside down. Disabling the sun (direction light) intensity will not work due to the moon phases (affected by the sun’s directional light). Two sided shadows in the landscape details is set to on.
Have some of you any idea of what’s going on and how to fix it?

Essentially your meshes are one sided, especially the landscape mesh, which is causing the directional light to shine through as the night cycle runs. There are multiple ways to fix this actually, you can do the cheap easy fix for small landscapes by placing a simple box mesh under your map which will cause the light to be blocked. Another way is to build a blueprint system that turns the intensity of the light to 0 when reaching a certain position in the sky (horizon). I am not sure about specific blueprint cases but I have seen them in the forums and on example files.

I already made the intensity blueprint that switch on and off the sun intensity while hitting the horizon, but setting the intensity to 0 works, and than this is current but I need to use the intensity because my moon I’m working on is affected by the Sun intensity (full moon, half-moon etc).
I tested this second method… the easiest one with that cube, worked directly as it should be working. I don’t know why it didn’t work few days ago, perhaps I changed something somewhere, or I’m already too tired.:slight_smile:

But isn’t there a more advanced method for handling this sun issue?