Eye Space or often called View Space or Camera Space is the space where the camera is located in origin (0,0,0) and all objects are transformed accordingly. More specifically the camera (in OpenGL) is located in origin, looking down the negative z-axis and has the x-axis pointing to the right and the y-axis pointing up. This mean that objects further away from the camera (when looking at them) has lower z-value. In OpenGL the ModelView determines how the objects should be transformed to be end up in eye space.
A vertex can be transformed to eye space with the following vertex shader (GLSL):
void main(void) { vec4 eyeSpaceVertex = gl_ModelViewMatrix * gl_Vertex; // now do what you want with it } |
A normal can be transformed to eye space with the following vertex shader (GLSL):
void main(void) { vec3 eyeSpaceNormal = normalize(gl_NormalMatrix * gl_Normal); // now do what you want with it } |
The gl_NormalMatrix can also be used to transform tangents and binormals to eye space.
void main(void) { vec3 eyeSpaceNormal = normalize(gl_NormalMatrix * gl_Normal); vec3 eyeSpaceTangent = normalize(gl_NormalMatrix * Tangent); vec3 eyeSpaceBinormal = normalize(gl_NormalMatrix * Binormal); // now do what you want with it } |
Note that neither of these shaders are complete because they don’t write anything to gl_Position.
Lights are passed to the shader in eye space as default and most lightning calculations take place in eye space.
Description of different 3D spaces:
http://vesta.astro.amu.edu.pl/Library/Linux/LinFocus/May1998/article6.html

















Pingback: Molehill3D » Blog Archive » Clip Space