Suggestions for Improving Scene Performance with Multiple Lights?

Hi everyone,

I have been experimenting with Babylon.js for a while, and I am working on a scene that involves multiple dynamic lights (around 6-8). While everything looks great visually, I’ve noticed the performance starts to dip, especially on lower-end devices.

I have played around with shadows and adjusted the light intensity/position, but I am still seeing some frame rate drops. :sweat_smile:

When I was searching about them, I came across these articles Handling lots of lights in a scene and lights with instanced meshes jira interview questions that are quite informative. But I’d love to hear more from the community member.

Does anyone have tips or best practices for optimizing performance when using multiple lights in a scene? Are there specific techniques I should look into, or maybe some trade-offs I can make to keep things smooth?

Appreciate any advice from the community!

Thanks in advance. :blush:

Hello :slight_smile:

Usually when you need a lot of lights, it means not all of them will be usefull at the same place. Starting from there, you can play with range and includedOnlyMeshes params, in order to limit compute, and enhance performances.

Here is an example with 70 dynamic lights : Playground (found in this topic)

++
Tricotou

2 Likes