Optimization a many Lights source

Hello!
I have a stage about 200x200 meters. This is interior scene have ceiling with lightings (rectlights). In scene them about 100 pcs.
In rooms i have good performance but when distance camera (camera catch many lights actors) i have very low performance. How i can fix it? Maybe use something else?

Use static lights, they have near-zero performance cost. If you need dynamic shadows, you could accompany the lights with a smaller dynamic light, and optimize them by adjusting the max draw distance value.

Using optimization viewports and stat commands also help you understand where the performance bottleneck really is.

You should take a look at Stationary lights

Hey guys!
I use static lights. When i hide ceiling with ligting, i have 120FPS. When it displayed i have 45 FPS.


You’re not using static lights, because that red cross cannot appear on anything but stationary lights.

Stationary lights, due to the way how they are being implemented, don’t work if there are too many of them with an overlapping influence radius. This is what the red cross is warning you about; the stationary light you have in the scene cannot work as a stationary light.

I actually got interested in what the fallback behaviour really is. Put in 4 stationary lights within each other’s influence radius (4 stationary point lights + stationary directional) and I get this warning when I bake the lights:

PointLight2_4 Severe performance loss: Failed to allocate shadowmap channel for stationary light due to overlap - light will fall back to dynamic shadows!

Therefore, all the lights you have a red cross over are, in fact, dynamic.

You have some options. Change light type to static, change the influence radius of the lights so that they no longer overlap etc.

Using console commands like stat gpu, stat unit, stat game etc. are great ways to debug performance issues.

1 Like

Yeah, tbh I was just so caught up to the whole “100 rect lights”, that I thought of something like faking a dynamic effect by putting one light source with dynamic shadows in, but didn’t really process it enough to give it a second thought.