# world culling

alright, given a view matrix (and its inverse), the points that define a view frustum, bounding volumes and the equations to intersect the volumes w/ a plane (and to determine which side of the plane that the volume is on), how does one actually go through w/ culling?

i figured inverse transform the frustum points, find the plane equations, test for the intersections.

no dice.

any ideas?

http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/001507.html

This was posted on the 10th of last month I beleive, it points to Mark Morley’s view frustum culling tutorial, I have found it to be a priceless peice of work.

[This message has been edited by BwB (edited 01-03-2001).]

thx bwb! guess i should thank the guy, too

That method of culling was also fully described in Paul Martz’ OpenGL FAQ a few years ago (!). The code sample provided does that same thing but with glut.

Paul.

I wouldn’t say it was “fully described”… I’m looking at the OpenGL faq right now and all it has to say about frustum culling at all is this:

Question 10.020 “How do I perform occlusion or visibility testing?”

OpenGL provides no direct support for determining whether a given primitive will be visible in a scene for a given viewpoint. At worst, an application will need to perform these tests manually. The previous question contains information on how to do this.

The code example from question 10.010 was combined with Nate Robins’ excellent viewing tutorial to produce this view culling example code.

Higher-level APIs, such as Fahernheit Large Model, may provide this feature.

HP OpenGL platforms support an Occlusion Culling extension. To use this extension, enable the occlusion test, render some bounding geometry, and call glGetBooleanv() to obtain the visibility status of the geometry.

If you download the tutorial you get source code, but it isn’t explained in detail. It also only gives a bounding box test and doesn’t cover spheres or individual points, etc.

It’s a great demo though, as all of Nate’s interactive tutorials are. They certainly helped me a lot when I was first learning OpenGL.

Toom (Mark Morley)

[This message has been edited by Toom (edited 01-04-2001).]

Toom!

u WROTE the tut!

kewl stuff.

your ideas worked for me just fine.
(well, for spheres… i can’t project obb’s yet…)

thank you guys. best set of answers i ever got.

Yeah, I remembered it a little ‘more complete’ than it actually was. Still, like you say pretty good starting point.