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 7 of 7

Thread: regarding camera position

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2003
    Location
    Hyderabad,A.P,India
    Posts
    10

    regarding camera position

    What is the default position of the camera if you don't specify in gluLookAt?

    I think the default position is at origin.So how does -ve parameters make sense in Orthographic projection.
    karteek

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Jan 2003
    Location
    Virginia
    Posts
    586

    Re: regarding camera position

    I believe it is glLookAt(0.0, 0.0, 0.0, 0.0, 0.0, -100.0, 0.0, 1.0, 0.0). Not sure what you mean by -ve unless you mean why are the near and far parameters negative of the value you pass to glOrtho. I think it is probably just to maintain similarity to glFrustum to reduce confusion when passing the arguments, but I could be wrong.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: regarding camera position

    You are at the origin (0,0,0) looking down the Z axis.

    Mikael

  4. #4
    Junior Member Newbie
    Join Date
    Mar 2003
    Location
    Hyderabad,A.P,India
    Posts
    10

    Re: regarding camera position

    You specify -ve parameters in glOrtho but when the camera is at origin how does the -ve values make sense..I mean the values lie behind the camera and are not rendered.
    karteek

  5. #5
    Junior Member Newbie
    Join Date
    Mar 2003
    Location
    Taiwan
    Posts
    4

    Re: regarding camera position

    Originally posted by karteek:
    You specify -ve parameters in glOrtho but when the camera is at origin how does the -ve values make sense..I mean the values lie behind the camera and are not rendered.
    It actually make sense. You can put object behind the camera and get it rendered if you use glOrtho. glFrustum and glOrtho are quite different.

  6. #6
    Junior Member Newbie
    Join Date
    Mar 2003
    Location
    Hyderabad,A.P,India
    Posts
    10

    Re: regarding camera position

    How can you render a scene which is behind the camera.What is the difference in glOrtho and glFrustum in rendering a scene?I think both will not render a scene which is behind the camera.
    karteek

  7. #7
    Junior Member Newbie
    Join Date
    Mar 2003
    Posts
    1

    Re: regarding camera position

    Originally posted by karteek:
    How can you render a scene which is behind the camera.What is the difference in glOrtho and glFrustum in rendering a scene?I think both will not render a scene which is behind the camera.

    ok first, without specifying a position you are at (0,0,0) and looking down the _negative_ z-axis.
    glOrtho sets a orthographic projection (also known as affine projection), which means no perspective effect.
    glFrustum sets a perspective projection, where things get smaller in the distance (like in the real world).

    ok, these are simple explainations, but should give you a clue what this is all about. look at the openGL specification to get a deeper look what glOrtho an glFrustum do.

Posting Permissions

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