9
\$\begingroup\$

I'm making a game with a dungeon setting in Unity 3D. Many torches line the walls. I'm using a point light over each torch to simulate the flame. However, when two torches are across from each other, and one goes above the 1.85 range, the other disappears completely, giving off no light.

What might be causing this?

\$\endgroup\$
  • \$\begingroup\$ I actually currently have this problem as well and can't figure it out. One thing i did notice with it is that sometimes if i am in the scene tab and i zoom or move closer to the light, it turns back on and a different one will turn off. Can't really explain it but i'm guessing it has something to do with some sort of culling (or the lighting version of that) - still researching though \$\endgroup\$ – Mungoid May 7 '12 at 19:48
  • \$\begingroup\$ Google turned up answers.unity3d.com/questions/44353/… \$\endgroup\$ – Adam May 7 '12 at 23:11
  • \$\begingroup\$ Baking seems like it may work, I'll try it out and let you know. \$\endgroup\$ – Timothy Williams May 8 '12 at 2:46
  • \$\begingroup\$ I think this question might be related to this: gamedev.stackexchange.com/q/151650/100681 \$\endgroup\$ – user100681 Dec 17 '17 at 10:03
13
\$\begingroup\$
  1. Select the Light object
  2. Go to Inspector
  3. Light
  4. And change rendered mode "Auto" to "important"
\$\endgroup\$
  • \$\begingroup\$ Wasted my one solid day until found out this answer. Thank you. \$\endgroup\$ – felixwcf Nov 18 '17 at 15:03
8
\$\begingroup\$

Unity only renders a limited number of pixel lights at a time; exactly how many depends on the quality level. The most 'important' pixel lights are chosen, and brightness is a significant part of how 'important' a light is.

\$\endgroup\$
4
\$\begingroup\$

I don't know if you guys are still trying to figure this out, but I had the same issue awhile back and solved it by only using a single point light per dueling torches.

Set your torches up with flame particle systems, and then set the point light at the center of the hallway between the two torches. The particle systems draw the eye away from the origin point between them, and the majority of players aren't going to notice that detail anyway. This will cut the number of point lights in your scene while still maintaining the same effect.

If you do the above, or even if you don't, and want to be even more effective with lighting, set a collider as trigger on your torch prefab and use OnTriggerEnter / OnTriggerExit to turn the lights on and off as the player passes through the level (you could even set two box colliders on each light and lay them across the hallway in tactical locations).

This will give you much more control over which lights are on and off, as well as give possible performance boost depending on how many torches you have.

\$\endgroup\$
3
\$\begingroup\$

You should go to Edit > Project Settings > Quality and change the pixel light count to a higher value.

\$\endgroup\$
0
\$\begingroup\$

Im pretty sure the problem is caused by one point light being in the range of the other point light so, for lag issues Unity only renders one of these lights. This can be fixed by increasing the intensity of the light and decreasing the range of it.

\$\endgroup\$
0
\$\begingroup\$

If anybody is still looking for the answer, you could either : - select the light and change render from 'auto' to 'important' Or - go to edit-> project setting -> quality -> increase pixel light count to your desired number of lights.

\$\endgroup\$
0
\$\begingroup\$

I had the same problem. To solve it, you have to set the light's rendering priority.

Select the Light in your scene hierarchy, and inside the "Light" component, change "Render Mode" to "Important".

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.