Why do we refer to a "model view" matrix and not a "viewprojection" matrix?

Why there is a model-view matrix, but not a view-projection matrix?

A view-projection matrix would make much more sense to me, since every entity in the scene has his own position and therefore its own model-matrix, but there is only one camera, so you could just precalculate the view-projection matrix and then use this matrix to multiply it with every models model-matrix to get every models MVP-matrix. Am I wrong?

The graphics pipeline (typically) involves transformation from model space to world space, from world space to view space, and from view space to clip space. There is a transformation matrix associated with each of these (the world, view and projection transformations, respectively). There are of course stages of the pipeline after geometry reaches clip space, but they are not relevant to your question.

Because each transformation is a matrix, you can combine them: you can create a "model-view" matrix or a "view-projection" matrix or even a single combined "model-view-projection" matrix. They're all perfectly reasonable and are in fact used fairly commonly, when appropriate.

The reason that the term "modelview matrix" is so prevalent is because of classical graphics pipeline theory and OpenGL, where it was considered standard practice to combine the model-to-world and world-to-view transformations. This was done because there was a very common reason to have geometry in view space: it simplified the computation of lighting effects.

There wasn't a particularly common reason to have geometry in world space, particularly since the pipeline was not programmable the way it is today. Consequently, there was not really a common need to go from world space directly to clip space, and thus a "viewprojection matrix" was not a common thing and did not gain a foothold in the vernacular of the industry.

If you have a good reason to have your geometry in world space for some intermediate computations during the pipeline, but have no reason to have your geometry in view space, then it is perfectly acceptable to use a combined view-projection matrix.

• Thank you for the explanation. The reason I'm asking is just that the camera-position (yeah, i know, there is no real camera) will not change the whole frame, so if i just multiply viewprojection, i don't need to do modelview*projection for every single entity but only once, this means there are n-1 fewer matrix-multiplications where n is the number of drawn meshes. Feb 28, 2015 at 17:58
• At least for me it makes more sense, i can't think about anything where i would need the projection- or the viewmatrix seperately or even a model-view-matrix without projection. Feb 28, 2015 at 18:02
• For what it's worth, matrix multiplication is not a particularly intensive operation (especially on the GPU), so this isn't really a huge concern.
– user1430
Mar 1, 2015 at 0:35
• I always thought is it a good practice to use modelview matrix for precision reasons (model translation will be most likely negated by view translation, preserving precision), is it no longer relevant? Mar 1, 2015 at 23:27

The camera analogy is a lie because there is no camera. Instead all that happens is a transformation of points in 3D space to points on a 2D screen, and the matrices define how that transformation happens.

Modelview and projection are conceptually different although mathematically the same (it's all just matrix multiplication).

Modelview just moves points from one 3D space to another.

Projection defines how those points are then projected onto the 2D display; i.e how perspective, foreshortening, etc happen.

Since you mention "modelview" I'm going to deduce that you're talking about OpenGL and with specific reference to the old fixed pipeline. The fixed pipeline in other APIs, such as D3D need not have the same concepts. In fact in the old D3D fixed pipeline there are 3 matrices used: projection, view and world. In this case "view" is what you might call the "camera" and "world" is what you call "each model's model-matrix".

It therefore becomes clearer that you concatenate projection and view, and apply world separately.

The use of a concatenated "modelview" in OpenGL (which corresponds to D3D's "view" and "world") is therefore just an artefact of OpenGL's design but need not specifically refer to the way things are actually done.

With the programmable pipeline all of this goes away, and you can use as many (or as few) matrices as you like, concatenating any you like in order to get the end result.

You answered your question well. This is exactly how it should be done for a 3D scene at least in OpenGL (not used other graphics APIs). You create your projection matrix using your FOV, aspect ratio, near and far planes and use it to render your entities, by multiplying it against each entities own model matrix. You should only need to set your projection matrix once when you start up your rendering system.