occlusion culling

Started by
9 comments, last by Allebarde 21 years, 9 months ago
Hi! I would like how to code this kind of culling.. I heard that It''s the graphic card that generates this culling, is that true??
Advertisement
You know, you didn't have to start another thread; you could've just bumped the last one. The graphics card does do some culling, like backface and frustum, but specificly occlusion culling (not drawing an object if it is completely obscured behind another object), you have to do that on your own. You can use features of OpenGL to help you, but the actual implementation is something you gotta do yourself. I just read an article on occlusion culling on Gamasutra if you're interested in specific algorithms. Also, Game Programming Gems (the first one) has a great article on this sort of thing too. But it's a very advanced book, and if you're asking if the video card can do occlusion culling, then maybe you'll want to hold out on getting that for a little while (no offense ).

[edit] I forgot to mention: while the video card doesn't actually cull occluded faces, it still looks right because the video card uses its depth buffer (z buffer) to draw the nearest pixel to the camera last. So it may look like it's only drawing the stuff you see, it's actually drawing everything in the view frustum, regardless of whether or not it's visible. This is called overdraw. [/edit]

--Buzzy
(formerly buzzy_b)

[edited by - Buzzy on July 18, 2002 7:03:11 AM]
I just noticed something. The new Radeons (I think even the old ones) have a limited form of occlusion culling on the card. But it''s done automatically, so you don''t have to do anything to enable/disable it. It''s not really occlusion culling, imo, because all they did was change it so it checks the z buffer before it draws the pixel, and they compress the z buffer too. It still has to check for every pixel that could possibly be drawn, it just won''t draw those pixels not seen. Also, the Kyro II has something similar, but I forget the specifics.

--Buzzy
(formerly buzzy_b)
GF3, GF4, and some professionnal cards have an hardware occlusion test extension.

Y.
Yeah ATI calls their's HYPERZ and it's in generation III on the new Radeon 9700. I dont know if it is an extension or if it is done automatically...

http://www.tomshardware.com

With new hardware we will no longer need to do surface removal. But helping the GPUs, using octree or b-tree etc... by not passing geometry to the pipline will speed things up.... So if you have "game object" that is nowhere near the scene, dont pass it to the pipeline...

[edited by - ANSI2000 on July 19, 2002 11:21:48 AM]
If I understood what I read on some maillist (DRI if you want to know), HyperZ has to be activated. In Windoze, there''s an option to activate it in several driver tweaking tools. So it seems like it''s "fire and forget".
Can the glEnable(GL_CULL_FACE) and glCullFace(GL_BACK) active the occlusion culling??
Those functions are used for faces removal,no??
That enables backface culling, not occlusion culling. If you have an ATI Radeon that supports HyperZ (I, II, or III), then you''d enable it using one of their proprietary extensions. Check out ATI''s website for more information.

--Buzzy
(formerly buzzy_b)
Hehe, I have a 3dfx Voodoo4!!
THis card is SHIT!
The amount of misinformation on this board is SCARY, to say the least. I''d almost cry.

Y.

This topic is closed to new replies.

Advertisement