Difference between Camera/Eye coordinates and world coordinates

3k views Asked by At

For the sake of simplicity let's take OpenGL rendering system as an example. According to what I have learnt,

The camera in OpenGL is aligned with the world space's origin i.e (0,0,0). I also read that we don't move the camera so it will stay at it's original position of (0,0,0) in world coordinates. The camera faces in the negative z direction.

Thus the question is, if you don't move the camera then it will always stay at world space's origin of (0,0,0). If that's the case then there will be no difference between world and eye coordinates. Because for example, Object A position in world coordinates is (2,2,-5). In eye coordinates it will be the same (2-0, 2-0, -5-0) = (2,2,-5)

1

There are 1 answers

0
Harish On BEST ANSWER

The camera is the eye. If you don't move your camera, it means that your View matrix is an identity matrix so any coordinate you multiply with it will remain the same.

Lets take your example, we have a point being rendered (2.0, 2.0, -5.0). This is the world space position of the point. It means the point lies at (2.0, 2.0, -5.0) regardless of where the camera is.

If the camera is at origin like you say, yes the eye(camera) space position is the same as the world space position.

For a simple example, lets say you want to move your camera 2 units in the positive z-axis. Now your camera is at (0, 0, 2) and when you look from your camera(or eye), the point will be 2 units farther away in z axis from the origin, since you moved your camera back, so the eye space position is (2.0, 2.0, -7.0).

This is what happens with more complicated transformation on your camera. You will have a view matrix which will just be the inverse of your camera's transformation, and this is applied to every point in world space to convert it to eye (or camera) space.