I'm trying to implement occlusion culling in my engine to improve my framerate. The general idea is this:
The entire scene is split into OctTree nodes where all visible meshes are contained. The scene is very dynamic, therefore some of the nodes in the OctTree change every frame.
There's only a single OctTree for the entire scene.
I want to combine this system with the coherent hierarchical culling algorithm, but I'm unsure how to do so.
The CHC algorithm basically travels through the OctTree hierarchy, looks for visible nodes, and marks them as such.
The problem is, the CHC algorithm needs to be run several times, once for the view camera, then for each light (to cull shadow casters), again for reflections, etc. That means the CHC implementation has to be separated from the actual OctTree and can't be directly integrated.
It still does, however, need the same hierarchy structure as the OctTree to be able to traverse correctly, which means I essentially have to 'duplicate' the OctTree hierarchy for each CHC instance. This is problematic, because as I've said, the OctTree is dynamic and nodes can change, which would be difficult to reflect in the CHC tree.
More importantly, the duplication and constant synchronization between the OctTree and the CHC Tree seems like an unnecessary drain of resources and speed.
Alternatively I could store the CHC node information directly in each OctTree node, but I'd need some sort of container to account for all CHC instances and that seems highly impractical.
I can't help but feel there has to be a better way, but I'm out of ideas.
Any help would be much appreciated.