Jump to content
  • Advertisement
Sign in to follow this  
Libe

OpenGL nv_occlusion_query for collisions

This topic is 4238 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I read this paper about CULLIDE (http://gamma.cs.unc.edu/CULLIDE/) and I'd like to implement it in my little app, but I didn't understand a few points mainly about the use of opengl. Basically I didn't understand how can I check if for instance 2 bounding box collide or not, here an example: Free Image Hosting at www.ImageShack.us CULLIDE proceeds in two passes like this: The algorithm uses occlusion queries to test if an object is "fully visible" or not. To test if the object B is fully visible against A, CULLIDE renders A into the frame buffer. Next, it sets the depth function to GL GEQUAL and disables depth writes. The object B is rendered using an occlusion query(nv_occlusion_query). If the pixel pass count returned by occlusion query is zero, then the object B is fully visible against A. Then it goes the other way around meaning that it test if A is fully visible against B. CULLIDE states that A, B don't collide if A and B are fully visible. Now I'm not sure why CULLIDE inverts the depth function like that, my guess is because is the only way to check (given the # of pixel pass) if a primitive is fully visible. Also I'd like to know why it disables the depth write: my guess is that is to prevent the the depth to be updated while testing for the possible occlusion. Thank you Libe

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!