Coordinate Systems - jgoffeney/Cesium4Unreal GitHub Wiki

Back

References

Overall

  • Local Space: the original model coordinate space.
    • The model of a planet
  • World Space: the transformation of the model relative to the world origin
    • The position of the planet to orbit around the sun
    • Transformation is the model matrix
  • View Space: the transformation of the world coordinates to the camera view
    • The position of the solar system for the camera's view
    • Transformation is the view matrix
  • Clip Space: the transformation of the view space coordinates to -1.0 to 1.0 to determine which vertices are drawn to the screen.
    • Determine which part of the solar system is visible to the camera
    • Transformation is the projection matrix
  • Screen Space: transforms the clip space back to the coordinate range defined by the viewport
    • The final camera view of the solar system with respect to the viewport
    • Transformation is affine transform defined by glViewport parameters.

Local Space

The coordinates of the original model vertices are relative only to each other so it is local. It is not unusual for a model to be created around the origin (0,0,0).

World Space

When models are loaded their coordinates need to be transformed to make sense for the scene. This is done by applying a transform matrix or via the OpenGL transformation functions.

View Space

View space is analogous to the camera view. It is achieved to transforming the world space coordinates into view coordinates. Typically it is a global scene transformation to shift, scale or rotate the entire scene for the camera placement. This transformation is stored within a view matrix.

Clip Space

After the vertex shader is completed, OpenGL will clip/cull out any vertices that do not lie within a specified range. The projection matrix takes view coordinates and transforms them into normalized device coordinates from -1.0 to 1.0 for each dimension. Any coordinates outside of this range are culled out. The box formed from the projection ranges is called the frustum and anything that lies within the frustum will appear on the screen