How much maximum light can be made in one scene

Hi all,

How much maximum light can be made in one scene without compromising performance ?

Well, I suppose it depends on the type you are using and how you build your scene. It seems like there’s virtually no limit to it, according to what you can see here However, don’t get fooled, this is a custom engine built and is ABSOLUTELY INSANE. Under (normal) conditions dev, the number of lights will eventually have an increasing impact on performance and also some restrictions depending on how you combine them with your scene.


I got pinged because of that link.
But on the Standard Material there is a property called maxSimultaneousLights.
I think by default this is 4. But it can be increased.
So, if you are using dynamic lights and the built in materials I would try to stay around that number.

You can try pre-baking lights and shadows through software like Blender.
For the voxel engine the light is “baked” into the each mesh by setting the vertex colors.
This may or may not be suitable to your needs based on what you are trying to accomplish.

1 Like

i’m trying to apply a lot of light in my project and it seems it’s making the performance drop :(. i’ll try using pre-baking lights.

Yup having a lot of lights will create a huge tax on the shaders.

Baking is usually the way to go when possible.

1 Like

Can we make baking light using babylon js code ?

Not with babylon but you can use baked lighting with lightmaps :slight_smile:

1 Like

ouh i see, thanks you all for the answers :).