Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Perspective projection to orthographic and vice versa

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2009
    Location
    USA
    Posts
    14

    Lightbulb Perspective projection to orthographic and vice versa

    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?)

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    What would the "equivalent view volume" look like? An orthographic viewing volume is a rectangular prism, a "cubeoid"; a perspective view volume is a frustum. These are fundamentally geometric shapes; you can't have one become the other.

    So how do you define "equivalent?"

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2009
    Location
    USA
    Posts
    14
    Quote Originally Posted by Alfonse Reinheart View Post
    What would the "equivalent view volume" look like? An orthographic viewing volume is a rectangular prism, a "cubeoid"; a perspective view volume is a 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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •