PDA

View Full Version : regarding camera position



karteek
03-12-2003, 06:19 PM
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.

shinpaughp
03-12-2003, 07:17 PM
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.

mikael_aronsson
03-12-2003, 11:42 PM
You are at the origin (0,0,0) looking down the Z axis.

Mikael

karteek
03-13-2003, 08:56 AM
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.

egmont64
03-15-2003, 12:28 AM
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.

karteek
03-17-2003, 07:33 PM
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.

Hans Ohlo
03-18-2003, 10:29 PM
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.