WebGL - 3d View and Model Matrices

In this episode, I discuss the View and Model Matrices used for 3d in WebGL.
  • Model Matrix (also known as the world matrix):
  • Unique for every object within your world, and is responsible for transforming the vertices of an object from its own local space, to a common coordinate system called model space.
  • View Matrix:
  • Provides the concept of a mobile camera, when it reality the camera is actually the only constant point of reference within the world. The view matrix is a transformation that is applied to every object in the scene (but is not unique to each object), and provides the illusion of a camera. The view matrix is basically the inverse of what could be considered a model matrix for the camera. Yet instead of moving the camera itself, it provides the opposite movements to the rest of the scene.

  • https://github.com/davidwparker/programmingtil-webgl/tree/master/0054-3d-view-model
  • http://www.3dgep.com/understanding-the-view-matrix/
  • http://gamedev.stackexchange.com/questions/56201/opengl-understanding-the-relationship-between-model-view-and-world-matrix
© programmingtil.com