13
\$\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\$
4
  • \$\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
    Commented May 7, 2012 at 19:48
  • \$\begingroup\$ Google turned up answers.unity3d.com/questions/44353/… \$\endgroup\$
    – Adam
    Commented May 7, 2012 at 23:11
  • \$\begingroup\$ Baking seems like it may work, I'll try it out and let you know. \$\endgroup\$ Commented May 8, 2012 at 2:46
  • \$\begingroup\$ I think this question might be related to this: gamedev.stackexchange.com/q/151650/100681 \$\endgroup\$
    – user100681
    Commented Dec 17, 2017 at 10:03

8 Answers 8

14
\$\begingroup\$
  1. Select the Light object
  2. Go to Inspector
  3. Light
  4. And change rendered mode "Auto" to "important"
\$\endgroup\$
2
  • \$\begingroup\$ Wasted my one solid day until found out this answer. Thank you. \$\endgroup\$
    – felixwcf
    Commented Nov 18, 2017 at 15:03
  • \$\begingroup\$ Did not work for me. Instead, the "Additional Lights Per Pixel -> 8" solved it for me. \$\endgroup\$
    – tmighty
    Commented Nov 10, 2021 at 23:37
9
\$\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\$
6
\$\begingroup\$

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

\$\endgroup\$
1
  • 1
    \$\begingroup\$ For URP, it's located in the Universal Render Pipeline Asset (it may be called "LWRP-High Quality (Universal Render Pipeline Asset)". In the Inspector of this asset -> Lighting->Additional Lights -> Per Pixel, Per Object Limit -> 8. \$\endgroup\$
    – tmighty
    Commented Nov 10, 2021 at 23:39
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\$
1
\$\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\$
0
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 just ran into this problem in 2021.2.7 with URP and the suggestion of " edit-> project setting -> quality -> increase pixel light count" does not work, as that setting is not there.

Instead, if you are using URP - go to your Universal Render Pipeline Asset and increase the Per Object Limit value, located under Lighting > Additional Lights.

enter image description here

Alternatively, I was also able to solve this by reducing the radius of my spotlight - which effectively meant that the lights were not overlapping each other as much.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .