View Full Version : Perspective projection to orthographic and vice versa

PJDIXIT

06-09-2012, 09:15 AM

If I know field of view angle and current view volume co-ordinates defined by left_perspective, right_perspective, top_perspective, bottom_perspective, zNear, zFar. Then is it possible to some how find equivalent view volume in orthographic mode, that is left_ortho, right_ortho, top_ortho, bottom_ortho, zNear, zFar?

Is it possible to reverse it (to get perspective view volume if I know orthographic view volume and FOV angle?)

Alfonse Reinheart

06-09-2012, 09:37 AM

What would the "equivalent view volume" look like? An orthographic viewing volume is a rectangular prism, a "cubeoid" (http://en.wikipedia.org/wiki/Cuboid); a perspective view volume is a frustum (http://en.wikipedia.org/wiki/Frustum). These are fundamentally geometric shapes; you can't have one become the other.

So how do you define "equivalent?"

PJDIXIT

06-09-2012, 09:48 AM

What would the "equivalent view volume" look like? An orthographic viewing volume is a rectangular prism, a "cubeoid" (http://en.wikipedia.org/wiki/Cuboid); a perspective view volume is a frustum (http://en.wikipedia.org/wiki/Frustum). These are fundamentally geometric shapes; you can't have one become the other.

So how do you define "equivalent?"

Hi Alfonse, sorry about not being very clear, By "equivalent", I mean this:

Lets say I have model with camera set for parallel projection. Now I want to have perspective projection of the same view with a predefined FOV angle. What should I specify as view volume co-ordinates to glFrustum()? I don't want to use gluPerspective as view-volume can be asymmetric.

Other way to think of it is when in a 3D modeling program (CAD applications) when you change a given view from ortho to perspective mode and vice-versa

Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.