Omni Lights Causing Lag

Hello, my project has many omni light (I think around 80) this is causing lots of lag, and the lights play a large role in the map so removing them is not an option for me, are there any light experts that could take a look or give me tips to reduce the lag the lights give? Any help would be great, thanks in advance. Project PlayCanvas | HTML5 Game Engine

You can bake your lights to texture in Blender, or use PlayCanvas runtime Lightmapper:
https://developer.playcanvas.com/en/user-manual/graphics/lighting/runtime-lightmaps/

1 Like

I cannot access blender, I will try my best to understand the runtime lightmapper, thank you.

Ok @LeXXik please tell me if i am doing this right, so first I set all the omni lights to bake lightmap and effect lightmapped objects, then I set everything in the scene to lightmapped and that should improve performance?

@LeXXik After lots of reading, I do not think I can use lightmaps because I have many batch groups, are there any other solutions?

This might help.
https://developer.playcanvas.com/en/user-manual/graphics/lighting/clustered-lighting/

How do you use these lights? Do they have shadows enabled?
What platform are you testing on?

How do these run on that device?
https://playcanvas.github.io/#/graphics/clustered-lighting
https://playcanvas.github.io/#/graphics/clustered-area-lights

These both have lots of clustered lights.
Make sure their radius is set to as small as possible … lots of overlapping lights is expensive.

1 Like

My lights do have shadows, but they are set to only render once. Those github links run fine on my device.

you project runs fine on my Mac too.

1 Like