- Home /
Why is my terrain dark in the distance? (It gets lighter when moving closer.)
Hey folks,
Well I've searched and searched this forum and I can't seem to find an answer to this problem I have - here are a few screenshots. The light fades out at a distance, but when I walk toward the darkness it gradually gets lighter. How can I fix this distance thing? Thanks.
Still unanswered... I am using one directional light.
Huh... From your screens it looked like that light was a point light. If it's directional and pointing straight down then it should light everything evenly. It doesn't look like you're using fog, so double-check the light's settings. Try setting the range and intensity to be higher, and if that doesn't work, please post more screens.
The problem is solved - I had a deep fog turned on.
Answer by CJCurrie · Feb 28, 2010 at 07:23 AM
Can you please explain your problem more thoroughly? Often unexpected lighting is the result of performance optimization. As the camera's distance from any given light changes, Unity will give different priority to it in rendering, which may cause lights to "pop" in or out, or other unexpected behaviour. You can change these settings in Edit->Project Settings->Quality. For example, I always set my editor quality to Fantastic and set the max number of lights per object to ~20. This solves most light problems.
I see you are using a terrain. Consider using vertex or pixel lighting for it.
I am using one directional light for the sun. Any ideas?
Edit > Render settings
Check your fog settings, they may be the culprit.
Yes, this was the answer, not what you see checked above.
Answer by oxl · Mar 01, 2010 at 11:25 AM
Try setting the "Billboard Start" setting in the terrain properties to a higher value. For some reason it seems to me, that this billboard Start threshold affects the border, where unity switches betweeen pixel light and the pre-calculated lightmap, too.
Same goes for "Base Map Distance". Both sliders are affecting the pixel light view distance. At least it's my experience.
Still a relevant answer, adjusting Base $$anonymous$$ap Distance fixed this issue for me. and
Answer by Christian Stewart · Feb 28, 2010 at 04:03 PM
See comment... Is there any way to mark things as unanswered?
You can always toggle the 'accepted answer' if you need to. I believe it will remain unanswered until you check the accept, so it will be visible as an open question by everyone.