From Camera Space to Model Space

Started by
3 comments, last by maxest 15 years, 8 months ago
Hi , it is possible to transform vertices from camera space to model space only with the inverse of the current Model-View-Matrix ?
Advertisement
The MODELVIEW matrix is a composition of the global-to-view (VIEW) and local-to-global (MODEL) frame transformations, where the said VIEW matrix is the inverse of the camera matrix
V == C-1
so that
V * M == C-1 * M

Now, inverting this yields in
( C-1 * M )-1 = M-1 * C
what transform from camera space over the global space into the model space.

[Edited by - haegarr on August 19, 2008 10:32:42 AM]
its possible only with the inverse of the Current Modelview matrix to get vertices from camera space to model space ? How to get only the View matrix and Model matrix in opengl ?
Quote:Original post by haubi
its possible only with the inverse of the Current Modelview matrix to get vertices from camera space to model space ?

Err, I've argued in my answer above that it is possible. Perhaps you misunderstand my explanation due to the writing of the 2 matrices. So I formulate it another way. The overall MODELVIEW matrix MV is the product of the inverse camera transformation and the local-to-global model transformation
C-1 * M =: MV
so that its inverse
MV-1 = M-1 * C
actually does what you want it to do.

Quote:Original post by haubi
How to get only the View matrix and Model matrix in opengl ?

In OpenGL there is the composed MODELVIEW matrix; the VIEW and MODEL portions are not available separately. You have to deal yourself with the particular matrices.
Quote:
In OpenGL there is the composed MODELVIEW matrix; the VIEW and MODEL portions are not available separately. You have to deal yourself with the particular matrices.

Or you might leave away this horrible matrices-stack and do all the transformations by yourself :) This increases the ease of portability ogl code into d3d & vice versa

This topic is closed to new replies.

Advertisement