You probably wouldn't want to use occlusion queries to determine whether a node should be rendered anyway. It's an obvious chicken-and-egg problem: to determine if something can be seen to render, you need to render it to tell if it can be seen. You also don't want to block and wait on an occlusion query to complete, as that will kill performance (the entire purpose of those queries is that they happen asynchronously on the hardware; anything you use those queries for needs to be able to take a few frames before utilizing the results). The only thing that can help is to reduce the effectiveness of the occlusion plane, e.g. start rendering some object when it's near the edge of the plane, essentially reducing the size of the plane... but even that's not fool-proof for fast-moving objects.AnyOldName3 wrote: ↑28 Nov 2018, 22:38 Regarding occlusion planes, it looks like OSG doesn't support them at all via occlusion queries with osg::OcclusionQueryNode (as those just check against the previous frame once every few frames, not against an existing depth buffer at cull time).
Occlusion planes, done "properly", would function on the CPU side similar to frustum culling. It should be quick and approximate, so it won't do perfect culling against each individual trimesh (especially if the occlusion plane is relatively small in screen space). Occlusion culling relies on big continuous visual obstructions that would be easy to test against and take out large portions of the node tree. With a world like Morrowind, I don't see much in the way of easy effective testing, especially as you move around cities. Sure there may be particular points that you can see a benefit with occlusion planes, but players are more likely to be wandering around all over, where the occlusion tests become a lot more difficult to do effectively. And if it takes more time to figure out what can be culled than to just draw everything, there's no point in culling.