- Home /
Question is Answered
What is causing Terrain to improperly respond to point lights?
Is it just me or are point lights on terrain have begging to bug out recently. this may sound like something for Bug report but i want to make sure it isn't something i have done rather than what unity has done. basically lighting anomalies have been appearing on the terrain recently, specifically point lights, though spot lights have some effect to. but first some details.
Specs:
3x GTX 550i
8Gb DDR3 RAM
8 core AMD 3.6Ghz CPU
Windows 8 Pro
Unity 4.30f4
Scene Setup: Ambient light is set to pitch black, night time scene. practice meshes are used for spoiler protection. No Fog or Image Effects used.
4 point lights(blue torches in center) 1 pink point light attached to player. 1 spot light acting as a illuminate for an item.
TopLeft: The terrain is there, the light on the character has no effect on the terrain what so ever. notice how the mesh with the stone still behave and light correctly the blue torches have a range of roughly 3 meters, you can see that they influence the terrain on a much greater scale.
TopRight: by getting the blue torches out of frustum and a certain distance away, the lighting beings "working correctly".
BottomLeft: This is where it gets weird, as you can see a large portion of the terrain is being illuminated for no apparent reason. the blue out effect i mentioned also seen i the top left is really caused by the downward spot light, not the torches. but this illumination thing is caused y the torches.
BottomRight: this is the scene with everything removed bar the sword, spotlight and character. the lighting is working correctly.
Here is what I have tried:
Adjusting The Quality settings, Very little changes.
Changing the Ambient Light, no Changes.
Adjusting the terrain, only the resolution(size) has any effect, changes shape of the illumination effect.
Changing the Rendering type. Affects all 3 rendering types.
Adding A directional Light, No Changes.
Remove Torches, Fixes problem but not a real solution.
New Project / New Scene. No Changes.
What I'd like to know is what could cause this? does the default terrain shader not support multiple point lights(idk why that would be)? what can i do to fix this?
Any Support, Feedback or criticism is greatly appreciated.
EDIT: I have sent a bug report, though whether its me or them is still undetermined. however i never actually here from them.
Did you set the pixel light count to something above 4 in the render settings? Did you also check the same setup on a scaled up cube as the ground? If you move all of the lights further away from each other, do they all work?
I've tried both below and above four pixel lights. 5,6,7,8 or 9 did nothing. but 10 worked!! lol.
thank you
the plane on the ground scaled up or down has no effect on it, it still appears as it normally would.
again thank you, i feel silly that i was 1 pixel light off(there are six light in this scene not 10, i though the pixel light count mean how many lights scene could support at once, i guess i was wrong) . I appreciate the help you have given me.
however what i find strange is why it only effected the terrain and none of the other objects. including the 200x200 cube i made.
I'm glad we got you up and running again. FWIW more pixel lights you have in a scene will increase draw calls. Each object that is lit by more than one pixel light will incur an additional draw call. As long as you're not targeting mobile, having multiple pixel lights (and a terrain for that matter) shouldn't be an issue in most cases.