I have a scene with 4 point lights. When they get close together and go near a textured object, the object becomes bright white, losing all colour and texture. How can I preserve the texture in these conditions?
- Unit: 5
- Project: Created as 2D
- Axis:x,y
The Problem
I was having problems with lighting attacked to units. When two units with light sources come together I would get whiteout issues.
The Setup
I have units in my game that are a simple sprite render. A light gameobject is nested on the unit object so I can move it to match the position of a torch on the unit.
The units are at z:0 (z-axis), the point light is at z:-1, the camera is pulled out a bit to z:-10. All the sprite materials are using the Unity shader “Sprites/Diffuse”.
Result
When the light sources overlay they become brighter and white out the unit. Sometimes the unit would look a bit transparent as well. I tried a number of light intensity, range, and z axis values but couldn’t get anything to change.
Possible Solution?
I finally checked the camera settings. The projection was set to Orthographic. I changed the camera projection to perspective. Perspective significantly changed how lighting functioned. While I still could whiteout objects if there are too many lights I could now work with different intensities, ranges, and z-axis to make it functional.
On the object that contains your texture. It will mostly say diffuse. Flip through the list and find something that has much less or no light reflection. Some you can adjust the shininess intensity.
Try Unlit Texture from the list. And change the color brightness to liking.
Probably the best solution would be to create a script that decreases the lights intensity when they come closer to your textured object.
Check this link: