- Home /
(Day and Nigh Cycle) Terrain is lit up at night
So I have a day and night cycle in my game. But the problem is, when it's night the terrain has like a shadeless material on it. How can I make it pitch black when it's night. (Im using the built in procedural skybox.) Here it is by day: http://i.imgur.com/rftME4h.jpg Here it is by night (lit up): http://i.imgur.com/vqNwTxk.png And here it is how I want it to be: http://i.imgur.com/vqNwTxk.png
How are you passing from day to night? Just switching the lights off? Also the last 2 links goes to the same image.
I am making the directional light rotate around the X axis.
Answer by shdes161 · Nov 28, 2015 at 03:09 AM
Add a "Reflection Probe" to the scene, set the Type to "Realtime" and the refresh mode to "Every Frame" That should make it so static objects are not lit up at night.
Then add a "Light Probe Group" to the scene (no need to change settings) and it should make it so that nonstatic objects are not light up at night.
I suggest, if not already done, having the directional light's intensity lowered at night to make sure nothing else weird happens.
You can also, to make sure that light doesn't get messed up when loading the scene, bake the light, by going to Window -> Lighting -> Scene and at the bottom right uncheck Auto and press build.
These steps should fix all of your issues.