Deferred point lights disappear at distance
I've also posted this question on StackOverflow, but I thought it would be best to post it here as well.
Summary including updates:
Unity3D 5 scene using deferred lighting, containing approximately 200 lights spread along 800 units of space.
Most of the lights are point lights, some are spots - the spots work fine.
The point lights cut instantly to dark at around 150-200 units away from the camera.
If large numbers of point lights are moved inside this range they work without issue.
Switching the Render Priority between Auto and Important makes no difference.
If I play a different scene in the editor which allows me to load this scene, it displays correctly! It still does not display correctly when played directly or when running the build.
I've got a basic scene together, which consists of 5 cloned sections of corridor, each with 12 lights, so 60 total.
However, only the first couple of sections show properly, the others are almost completely dark:
(please be kind, I only started this one today :P)
And from the editor, with the end section highlighted to show the distance better:
As you can faintly see, the lights are actually there, just very, very dim:
When you walk down the corridor, they snap to full brightness as you approach.
This is on a build with deferred lighting set, and the pixel light count turned right up, just in case.
I' guessed this might relate to LOD or camera range in some way, but I can't seem to get anything to effect the issue currently.
(This scene is actually based around the lights cutting out and switching to emergency lighting so I really do need to be able to control them!)
Anyone?
UPDATE
The lights you can see are spot lights. The lights that are disappearing are all point lights.
You can just see the spot lights uplighting onto the ceiling in the distance, but the main ceiling lights just go completely dark.
UPDATE 2
I've added a frankly silly number of lights into the scene and extended the corridor, to run some tests.
There are now 24 lights per section, and a total of 8 sections, making 192 lights in all:
I wanted to check if more lights would cut out, and they don't. It seems to be entirely based around range - around 150-200 units in my scene.
To confirm this, I also walked to the center of the tunnel to see if the number of lights visible would effectively double, including ones behind - they do.
I also moved all of the sections close to the camera to confirmed that all the lights can be displayed at once without problems, and this works as well.
UPDATE 3
I have found a situation where the scene displays correctly!
If I press play in the editor on my main menu scene, then press the UI button that loads this scene, it displays correctly!
It still does not display correctly either when playing the scene directly, or when running the final build.
Anyone?!
I'm having a very similar issue with a much more simply made level of $$anonymous$$e. If I figure anything out, I'll let you know.
Answer by PRINCESAHIL57 · Jul 05, 2019 at 02:50 PM
Well, Go to Edit>Project Settings> Quality. Under Rendering Section increase your Pixel light count. This might help you. Thank you.
Your answer
Follow this Question
Related Questions
Point/spot lights dont bake 0 Answers
Overlapping Point Light Halos 0 Answers