Sign in to follow this  
haubi

From Camera Space to Model Space

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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 ?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this