quote:
However I found that a lot of cards wont give you access to the z buffer surface unless you only run in 16 bit modes. (DX8)
That's weird. I don't know too much about D3D, but in OpenGL you can get full access to the 24bit depth buffer in all screen modes. I would guess that D3D allows the same functionality ?
quote:
AFAIK only some HP gfx cards support ocllusion querying so far,
All GeForce3+ cards support hardware occlusion queries. So does the new Radeon.
quote:
So the thats why I though of the idea of rendering the oclluders to the z buffer first then the scene front to back and thus take advantage of the early z buffer reject.
That's not true occlusion culling. In fact, you aren't culling anything, you are just rejecting pixels. A speedup of 30% is nice, but with true occlusion culling, you can easily get speedups of 1000% or even more (depending on your scene). So the performance hit of reading back the zbuffer (or SW rendering it) might very well be worth it. And keep in mind, that we are talking about a fallback option here: on newer 3D cards, the whole process is HW assisted.
I just run a little test on our engine. I forced fallback mode (SW rendering on the CPU (handoptimized ASM), 500 occlusion faces max., 128² occlusion map, non-hierarchic), and timed a test scene (5 million faces). Without occlusion culling, I have around 1.25M faces in the view. With the culling, it gets down to 155k. That's 8 times less.
There is perhaps one additinal thing to mention: the results of occlusion culling *highly* depend on the nature of your scene geometry. If you are already using a portal engine, in a closed environment (Quake style), then occlusion culling won't be very effective at all, and the overhead might outweight the benefits. But on complex, open and/or outdoor scenes, scenes with lots of large (but complex) features (mountains, buildings, ...), occlusion culling can be incredibly efficient.
/ Yann
[edited by - Yann L on October 2, 2002 8:13:26 AM]