Originally posted by Tom Nuydens:
[b] [quote]Originally posted by bunny:
In practice, at least on the ATi chipsets I’ve used, even using a parallel approach is way too slow to be useful; I’ve found that the resulting frame rate is significantly lower than with brute force, even where ~80% of the geometry can be culled.
I would really like to hear about what kind of app/data you used to come to this conclusion.
I’ve seen a Radeon 9700 slice through data sets with upwards of 20 million triangles like butter, with no CPU-based culling involved whatsoever. Would you like to try that with brute force, or with your SSE-enhanced rasterizer?
Occlusion queries aren’t the answer to all the world’s problems, but they work really well provided that you use them appropriately.
– Tom[/b][/QUOTE]Ok, at the risk of derailing the thread:
The data was a scene consisting of about 500,000 triangles in total, broken into about 400 models, each of which contained a hierarchy of meshes. Each of these was rendered as an indexed VBO. I used the model and mesh object’s OOBBs as occludees and the scene was sorted from front to back using a radix sort.
My initial approach was to traverse the scene, rendering each object after determining its visibility. This was pretty apalling, as you might expect, so following the guidelines in a nvidia paper on the subject, I tried sending the occludees through in batches, running increasingly large numbers of queries at once. This improved performance a bit, but it made the querying less accurate; brute force was still more effective. I tested this on a Radeon 9700 Pro and a Radeon Mobility 9600 Pro.
The software rast OTOH, takes a few shortcuts when selecting occluders, and it works pretty well. Typically I get about a 100% increase in frame rate. The nice thing is, I can run queries in software while at the same time rendering in hardware, and every object can be occlusion checked before rendering.
I might give hardware occlusion querying another try at some point, but I’m not desperately keen to do so given the experience so far. Still, if you have any tips on how to make it viable then I’d be interested to hear them.