Sign in to follow this  
Lshink

[SOLVED]Obtaining just the model matrix from the model-view matrix

Recommended Posts

Lshink    122
Hello everyone: My apologies if this is the wrong section -- I'm new around here. Anyways, I have searched these forums for awhile, Google, and skimmed through my Red Book but I'm still not able to find a clear solution to this problem. What I am trying to do is take some object space coordinates and convert them to world space coordinates. I believe that all I need to do is multiply the object space vertices by the model matrix (not model view) to obtain the world coordinates. (Please correct me if I am mistaken). To do this of course, I would need to somehow extract the model matrix from the model-view matrix. Alas, here is where I'm stumped. How do I go about seperating the two? Thanks in advance. [Edited by - Lshink on February 19, 2008 11:39:37 AM]

Share this post


Link to post
Share on other sites
Sneftel    1788
There is no separation. The two are logically equivalent. There is absolutely no difference between moving the camera left three units, and moving an object right three units. Of course, that's not really a problem: since you're the guy whose code is setting the model transformations, you know which transformations those are, and you can simply combine them into a world transformation yourself.

Share this post


Link to post
Share on other sites
gardin    122
One solution to the problem is to manage the cameras orientation as a separate matrix or vertices. This way you can obtain the data you're looking for.

Share this post


Link to post
Share on other sites
Lshink    122
Gentlemen:

Thank you for the very descriptive, quick response. Since I won't be using this much, I think I will just go ahead and make my own world transformation matrix.

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