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

Started by
2 comments, last by Lshink 16 years, 1 month ago
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]
Advertisement
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.
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.
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.

This topic is closed to new replies.

Advertisement