MedicalVisualization

OpenGL Model-View Transformations

OpenGL Graphic Primitives | | OpenGL Coordinate Systems

When rendering objects the following coordinate system transformations are involved:

One transformation from the local to the global coordinate system, and another one into view coordinates.

Each of the above transformations can be represented as single multiplication of the vertices $\vec{v}$ with a 4×4 Matrix $M$ in homogeneous coordinates:

$\vec{v}' = M \cdot \vec{v}$

The modeling transformation corresponds to a 4×4 matrix $M_M$ (which is a rigid body or affine transformation).
The view transformation corresponds to a 4×4 matrix $M_V$ (which is the inverse of the camera modeling transformation).

Then the consecutive application of the above transformations yields the combined model-view matrix $M_{MV}$ with:

$M_{MV} = M_V \cdot M_M$

As final step the perspective transformation projects the vertices onto the image plane. This corresponds to a division by the z-component in camera coordinates.

The perspective transformation can also be represented as 4×4 matrix $M_P$ (which is a non-linear matrix) in homogeneous coordinates. Together with the model-view transformations this yields the combined 4×4 model-view-projection matrix $M_{MVP}$ with:

$M_{MVP} = M_P \cdot M_V \cdot M_M$

So the graphics pipeline effectively performs the following computation for each incoming vertex:

$\vec{v}' = M_{MVP} \cdot \vec{v}$

This takes about 30 flops per vertex.

OpenGL Graphic Primitives | | OpenGL Coordinate Systems

Options: