Frustum Values

Would like to pose some questions about frustum numbers, if I may. My models/Levels are coming out of 3dsMax complete with their position in the level (world space). They also have available a geometric center and the farthest vertex from it, which gives me a bounding sphere also with world space values. For this reason, I want to cull against a frustum that is also in world space. I see two ways of implementing Frustum Extraction for this purpose. First is to get the default values and then transform them each frame to compare to the geometry parameters. Second is to extract them from the Projection and Model-View Matrices each frame and compare.
In the first implementation, there are several sub-cases. First, I could start with the NDC values and transform them up the pipeline to world space. This would require reversing the whole pipeline to include viewport transform and perspective division. Second, I could extract them from the initial projection matrix times the model-view (which is identity at this point), which should be in view/clip space. Again, transforming them to world/eye/camera space for culling. Q: Am I correct in equating world/eye/camera space? I feel it is likely since the position of objects in the scene is based on their position relative to the view point/camera. Third and finally, there is a set of equations (Eric Lengyel’s book Mathematics for Game Programming and Computer Graphics) that allow you to extract the frustum plane values from the parameters passed to either glFrustum or gluPrespective.
In the second implementation, the literature says that the matrix resulting from the cross product of the projection and the model-view can be used to extract the instantaneous plane values through row multiplication.
The problem I’m having is that with the exception of implementation 1, case 3 I do not end up with numbers that look like “world” numbers. From it I get the following with fovy = 45, near clip = 0.1, far clip = 2000, and aspect = 1.333… (1024/768):

Plane[A:0.15425146 B:0.0 C:-0.9880316 D:0.0]
                Plane[A:-0.15425146 B:0.0 C:0.9880316 D:0.0]
                Plane[A:0.0 B:-0.11629547 C:-0.99321467 D:0.0]
                Plane[A:0.0 B:0.11629547 C:-0.99321467 D:0.0]
                Plane[A:0.0 B:0.0 C:1.0 D:2000.0]
                Plane[A:0.0 B:0.0 C:-1.0 D:-0.1]

The other methods yielded values that were 0 or near 1; even the ones above when transformed with a variety of matrix combinations reverted to similar values.
The second implementation yields similar sorts of numbers.
Q: So how do I get frustum planes that rotate and translate with the view point and will allow culling in world space?

Eye space == Camera space == Space where the camera position is on {0, 0, 0}.
World space is the global space in which everything else exists. {0, 0, 0} is on the origin of the X,Y,Z world axis*. The camera and your objects move inside the world space.

I’m not sure I’ve understood everything you said, but the standard way to extract the frustum planes is through the MVP matrix. The extracted planes are by definition in world space and can be used immediately for frustum culling.

  • OT: What’s the plural of axis? Axes? :wink: