Adding multiple PointLights causes massive increase in Triangle count


I was working on my project and got some problems when I tried to add more light sources to the scene. It seems that adding more PointLights make the triangle count go up really much. I made a simple test with the BasicGame and noticed that adding 10 additional PointLights increase the triangle count from 474 to 596 and that’s when I’ve only one cube. So adding multiple lights in high-poly scene made the performance drop really low.

Is there any way to help this or should I just avoid using multiple point lights?

No way.
Every light daraws geometry again.

You can try to bake lighting in blender and use static lighting with a shader.
Another way is Deffered Shading. But i dunno know how it is now.

1 Like

Thanks for clearing that out for me! I’m just doing a randomly generated map, so I can’t bake the lighting externally. It would be really nice to bake the lighting after generating my map. However, I’ve got no idea how to do something like that. Anyone has done something similar?

I’m also waiting for it…

Yeah well deferred is stil some time, for the moment, just attach your lgihts to the node they should light, (do a simple location based approch here might work fine enough)

1 Like

I’ve already divided my map into chunks for physics and batching. The problem is if I attach the lights to the chunk nodes, the light sources near the borders will have their light “cut” off around the borders. And because one chunk will have 3-10 light sources, the performance isn’t that great. I was thinking about baking some kind of light maps but I don’t have a slightest idea where to start from.

Light maps are generated in your modelling program or wherever and effectively burn the lighting and shadow into the textures. It works very well for static lighting on static surfaces.

Yes, I know that. But as I said, I have no real “base model” to bake the lightmaps on, but I’m generating the map from smaller pieces.