Hello everyone,
I’m currently struggling getting a good performance in my game with the hundreds of light I have in my levels.
So, to improve the performance, I a) used lightmapping and b) used occlusion culling.
While the light mapping is ok, I only get a real performance boost if I almost disable all lighting by reducing the shadow distance to almost 0.
On the other side, occlusion culling does not work as I would expect it. (All objects but the doors had been set to static).
Imagine you have 3 adjacent rooms. I have set up one occlusion area per room, slightly overlapping the adjacent rooms occlusion area (in order to be sure that any door works).
The strange thing is that the rooms don’t get disabled as expected. They only are hidden when they aren’t in the camera frustum anymore. Object in that room get visible/invisible in a strange way.
So I set the doors to static and re-boke the occlusion map. I expected the rooms to be invisible as long as I wasn’t in the room with my camera… but the rooms were still visible.
First question: Does anyone know why this is happening?
In those rooms I have a bunch of lights… I really mean a BUNCH of lights. I expected them to be culled also, when their light volume is outside the view frustum. But this doesn’t happen. They are always active.
Second question: Why aren’t they culled and what can I do to disable them, when they are not visible/used in the current view?
Third question: Is it possible to let the occlusion culling handle the light activation?
Thanks for your help…