• Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

We're also offering banner ads on our site from just \$5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.

# 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.

3 replies to this topic

### #1Michael Wojcik  Members   -  Reputation: 163

Like
0Likes
Like

Posted 12 April 2012 - 03:42 PM

Hello,
I have read through most of this paper here 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

### #2NumberXaero  Prime Members   -  Reputation: 1488

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.

### #3Michael 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

### #4Michael 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