- Home /
Mixed Point Lights bug
Hi, there is a very weird behavior of Mixed points lights in my scene. I have only 6 mixed point lights and they are all identical. Lighting mode set to Shadowmask. And after baking lightmaps some of these point light behave like normal (realtime direct and baked indirect), but some of light behaving like baked. They do not emit realtime direct light at all.
When I change a position of these bugged lights and bake them again, sometimes they starting to behave like normal Mixed lights. I have no idea why they acting like this.
I'm using Unity 5.6.0f3
Here is a quick video of a problem:
Answer by FlaSh-G · Jul 08, 2017 at 11:23 AM
There is no limit for the amount of baked lights in your scene. However, there is a limit for realtime pixel lights per object in Forward Rendering. You can see this limit in "Project Settings/Quality". It's labelled "Pixel Light Count". You can, of course, increase this value to 6, but be warned that there is a reason this value is so low. In Forward Rendering, more pixel lights cost extremely high performance.
There's two other ways of dealing with this. The first would be to do the level designer's dirty work and somehow setup the scene to work fine with a four light limit. The tools you have for this are:
Set less important lights to baked only, thus removing them from the list of realtime pixel lights.
Alternatively, set the surface shader of the objects in question to a vertex lit shader. This might significantly reduce lighting quality depending on the situation and the used mesh:
And finally: Simply set the lights' "Render Mode" to "Not Important" or "Important" in a logical way. This way, you basically have the same problem as before, but you have control over which of the lights will "fail".
The second solution is to switch from Forward Rendering to Deferred Rendering in "Project Settings/Graphics". Deferred Rendering is more performance heavy than Forward Rendering by default, but scales up infinitely better in terms of pixel light count. So by enabling Deferred Rendering, you set the minimum requirements for your game higher, but you gain room for almost limitless pixel lights.
Thx for the answer, but this project already have Deferred Rendering. I also tried to switch all light to "Important". None of this helped.
For the sake of context, I suppose you add this as a comment to my answer rather than an answer to your question :)
Your answer
Follow this Question
Related Questions
why is my baking GI get stuck at 7/11? Unity 5.50b7 1 Answer
Light leaking on baked lighting 1 Answer
Unity 5 baked GI weird result 2 Answers