Terrain lights up at night (day-night cycle).

Hello.


I’ve got a problem with my terrain. I made a day-night cycle system where a directional light spins around the terrain (it’s quite hard to explain). So, at “night” (the light is under the terrain) the terrain kind of “lights up” (the strange thing is, that it happens not every time I play the game), I dont want this to happen. Is it possible that if the light is beneath the terrain the terrain kind of “response” to this event and lights up? Hopefully I explained the problem understandable and hopefully my english is not too bad.


Thanks in advance.

I assume it’s because even if your light source is below the terrain, it still casts light on hills or mountains because terrain itself doesn’t cast any shadows on itself. If you position your camera below the terrain, you’ll see that you can see through it - it’s a single-sided geometry, and so light can shine through it as well.

Right under your terrain, make a simple Plane, as large as your terrain is, match it corner for corner. So if the terrain fails to cast a shadow from the inverse side (which it shouldn’t really), then the plane will.

Try switching on “Lightmap static”.
Go to Window in top menu and select Lighting. In the Lighting window in “Object” tab select “Terrains” under Scene filter. Now select the terrain from your hierarchy and switch on the “Lightmap Static” checkbox.