- Home /
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.
Answer by Eudaimonium · Sep 06, 2015 at 08:30 PM
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.
Answer by Fred-Mc-Ency · Sep 08, 2016 at 11:30 AM
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.
Your answer
Follow this Question
Related Questions
How to get rid of lines on terrain? 2 Answers
terrain not showing 5 Answers
Lights not affecting terrain 0 Answers
Making A 2d game android 2 Answers