Search code examples
graphicscamera

Camera Frame and Object Frame


I'm reading about Interactive Graphics, in particular I started the section about the viewing and I did not understand well this sentence:

Initially, we start with the model-view matrix set to an identity matrix, so the camera frame and the object frame are identical.

I know what is a model view matrix and I know that in this case the camera view is oriented in the z negative axis. But I did not understand exactly what is the difference between the object frame and the camera frame.


Solution

  • you got 2 matrices: View and Model where View represents where from are you looking and in which directions (camera) and Model represents where is and how oriented your object you are currently rendering is.

    However To speed-up rendering we are using just one cumulative matrix so:

    ModelView = Inverse(View) * Model
    

    so for example when you write something like this in OpenGL:

    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    

    Then both View and Model matrices are identical and equal to unit matrix. After this point you add your incremental rotations and translations either to View (inverse order and direction) or to Model (normal order and direction).

    For more info see:

    Especially the last 3 links in there...