Jump to content

  • Log In with Google      Sign In   
  • Create Account


Getting frustum planes from orthogonal projection


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.

  • You cannot reply to this topic
3 replies to this topic

#1 Michael Wojcik   Members   -  Reputation: 163

Like
0Likes
Like

Posted 12 April 2012 - 03:42 PM

Hello,
I have read through most of this paperhere that explains how to extract your camera's frustum planes. For my game I am using a orthogonal projection matrix which might explain why I am getting seemingly off plane normals.

My question is, does the equation on that paper for the opengl version of frustum plane extraction work also for orthogonal projection matrices? If not, then I suppose I could create a routine myself since orthogonal projection is a box anyways. I don't want to do that though unless I know that this routine will not work for orthogonal matrices.

I appreciate any help,
Thanks!
Generalist Game Developer and Cofounder at Voidseer Realms

Sponsor:

#2 NumberXaero   Prime Members   -  Reputation: 1405

Like
1Likes
Like

Posted 12 April 2012 - 03:59 PM

If you have camera information of some sort that this frustum belongs to, you could use the forward, up, and right vectors to get 3 of the normals, negate them to get the other 3.
Then use these 6 normals with the view position and the l, r, t, b, n, f values to compute positions on the planes.

#3 Michael Wojcik   Members   -  Reputation: 163

Like
0Likes
Like

Posted 12 April 2012 - 04:31 PM

Indeed, I appreciate your confirmation, that what I had in mind as how to calculate the frustums for an orthogonal projection matrix is correct. In terms of the routine as explained in the paper, does that only work for perspective matrices though?
Generalist Game Developer and Cofounder at Voidseer Realms

#4 Michael Wojcik   Members   -  Reputation: 163

Like
0Likes
Like

Posted 12 April 2012 - 04:44 PM

I suppose the paper's frustum extraction routine only works for perspective matrices. I just double checked my implementation of the paper's routine and the normal I am getting for top plane for example is [0.0, 0.3737926, 0.9275124] not [0.0, 1.0, 0.0] as I would suspect.
Generalist Game Developer and Cofounder at Voidseer Realms




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