Occluded Triangles still being calculated Issue

Hey everyone, today I’ve run into a weird issue and I hope someone can help me to solve this mystery.

I’m working on a huge dungeon level, and so far occlusion culling worked fine for me here. Today, I’ve just added another room, pretty basic, without too much stuff and details yet. Then, to my surprise, I noticed that the triangle count is above 700k when standing in that room, even with active occlusion culling. Obviously, this number is way too high for the given scene; I would have expected something below 10k.

As a usual step to research the origin of the problem, I turned on occlusion culling visualization. Surprisingly, it seemed as occlusion culling worked fine as the visualization only shows a small part of the level geometry (see overdraw picture).

The above picture shows that occlusion culling seems to be working fine, because only a small scene is visible here. However, what is visible here cannot create a triangle count of 700k+ on its own. Thus, it seems that the rendered triangle count in game does not match with the occlusion culling visualization.

These findings made me presume that other parts of the dungeon were still being calculated, despite the fact that they actually should be occluded.

Behind the walls of the room I was standing in and that is seen on the pictures, there is another much bigger room, as shown on the following picture. For debugging, I completely disabled this room to see if it has an effect on the triangles count, and voila: after deactivating the big room, the triangles go to 7.8k which is more reasonable for the current scene. Thus, it seems to me that most of the triangles of this big room (if not all) are completely calculated, ignoring the occlusion culling.

While I have some hints now, I do not know how to solve the problem.
The occlusion culling visualization does not match with the triagnles being rendered/calculated. It just seems that some parts of the dungeon are still being calculated, even if they are occluded. Maybe I did something wrong at another point? I don’t know.

Any help is much appreciated!

Thanks and all the best,
Moritz

Update:
After some additional research I think I might have found the issue myself: I did some tweaking in the Project Settings → Quality Settings and it seems that the increased triangle count is related to the quality settings, particularily and especially to the shadow distance. However, it’s interesting/weird that enabling/disabling occluded rooms still causes triangle differences of 100-300k triangles per room, at least on the highest quality settings.

Thus, based on these findings, I presume that a certain extent of occluded triangles is still included in the calculated triangles, and, in addition, that the amount of these triangles significantly scales with the quality settings/shadow distances. I guess I need to do some more investigations here to fully understand the specific correlations.

Update 2:
After additional tests, it is now pretty clear to me that the high amount of triangles is caused by the multiple point lights I’m using and especially by the shadows they are causing. Reducing the number of lights with shadows enabled seems like a reasonable way to increase performance here. This also fits with the documentation that give a warning about using too much point lights with shados.

However, I do not fully understand yet why all of those lights and shadows are included into the calculations even though they should be occluded.