• Create Account

# World Space Frustum Culling?

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

4 replies to this topic

### #1uglybdavis  Members   -  Reputation: 755

Like
0Likes
Like

Posted 11 December 2013 - 02:54 AM

Hi Guys,

I'm trying to implement frustum culling. I'm currently following this tutorial:

http://www.racer.nl/reference/vfc_markmorley.htm

Now correct me if i'm wrong, but extracting the frustum planes from proj * view will result in the frustum planes in eye-space.

So, in order to test a point against that frustum said point would also have to be in eye space (point * view * proj), right?

Assuming that the above statement is correct, would it not make more sense to simply extract the frustum planes in world space?

I tried to extract said planes in world space by building the following matrix

glm::mat4 worldFrustum = cameraWorldTransformMatrix * projectionMatrix;

However, extracting the planes from that matrix & running the intersection tests from the above article yield some wrong results.

Is my math correct? Can anyone give any insight?

I can post some code if needed.

### #2sgt_barnes  Members   -  Reputation: 497

Like
0Likes
Like

Posted 11 December 2013 - 05:45 AM

Now correct me if i'm wrong, but extracting the frustum planes from proj * view will result in the frustum planes in eye-space.

No, it extracts the planes in world coordinates. That's why the point check in the tutorial is so simple.

The planes in eye coordinates are actually quite simple, since they are the faces of the unit cube.

Edited by sgt_barnes, 11 December 2013 - 05:52 AM.

### #3uglybdavis  Members   -  Reputation: 755

Like
0Likes
Like

Posted 11 December 2013 - 10:47 AM

Thanks for clearing that up! I guess i messed up elsewhere in my code then.

Just to double check, the view matrix is the inverse of the camera's world transform, correct?

Thanks again!

### #4dpadam450  Members   -  Reputation: 773

Like
0Likes
Like

Posted 12 December 2013 - 12:48 AM

Camera's world transform doesnt make sense. There is world and view/camera space.  If  you mean the camera's world orientation (treating the camera as an object that could be seen in the world, then the view matrix to draw from that camera is the inverse of that, or simply the transpose. I don't recall of the top of my head.)

### #5Sponji  Members   -  Reputation: 967

Like
1Likes
Like

Posted 12 December 2013 - 01:05 AM

Inverse of the camera's world space transform is the view matrix. That inverse can be simplified by taking the transpose of the rotation part and negating the translation part.

Derp

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS