I Tried building lighting many times and i have no idea how to fix this. i even checked if the landscape was casting shadows and it said it was casting “Static Shadows” no option for dynamic shadows though. Can someone please help me out?
If it is dynamic, expecting dynamic shadows to shadow the entire scene for night time is a bad idea even if you get these artifacts to go away. You will pay a huge expensive for a black result. I would suggest that you use a timeline or blueprint script to simply fade the brightness to 0 when the sun passes under the horizon.
Looks like landscapes no longer have an option to set two sided shadows. That is probably what is causing this. I will follow up with people on our end and make sure that gets bugged.
Oh ■■■■ i totally have an idea… what if i put an object UNDER the landscape and the object will recieve the light and cast a shadow on the trees instead of casting light.
You could place a big “blanket” shadow caster under the whole landscape.
Where are you updating your sunlight rotation form? Anywhere that you are doing that updating you should be able to easily calculate when the sun is below the horizon by doing a dot product with (0,0,1) and the light’s Xvector. I think it will return 1 when the sun is at noon and 0 right when the sun is below the horizon, and -1 when it is at midnight. Then you could easily use some math to isolate the blend to off at the right point.
Really though you should disable the directional light if it is coming from underneath, you don’t want to be paying all that dynamic shadowing cost for an invisible light.