Archived

This topic is now archived and is closed to further replies.

What do modelview / projection /texture matrices Contains?

This topic is 5578 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi all, I SEARCHED GOOGLE! i didn''t find nothing useful, maybe too because i don''t know exactly what to put in the search string, i realized that the modelview contains Sx__??__??__?? ??__Sy__??__?? ??__??__Sz__?? Px__Py__Pz__?? where S is Scale (modified with glScalef) P is position (modified with gltranslate) but what does other data contains? thanks
There aren''''t problems that can''''t be solved with a gun...

Share on other sites
Rotations, but I can''t remember exactly where. Try a few and see how they affect it.

-solo (my site)

Share on other sites
I would think of it as decomposing each matrix into a
top-left 3x3, a bottom 1x3, a right 3x1 and the number 1
in the bottom right:

M = [ R | 0 ]    [-------]    [ T | 1 ]T = translationR = rotation (may contain scale, if your models areappear at diffent scales)0 = zero vector. Put non-zero values here only if you are  after strange effects.P = [ R | P ]    [-------]    [ T | 1 ]R : The rotation in the projection matrix is usuallysimple and "axis aligned".  ie, it allows you to thinkof your camera looking down/up the X/Y or Z axis.T : is a translation - but it can be static dependingyou your app. ie, You can use it to "position the eye at 1.0,looking down the Z axis" - you then manupulate the model viewto move things in this logical space.P: Perspective vector - Ususally this would only have a z component, calculated to give a certain FoV.

I like to think of it as : Proj=Position you eye,
to your eye (eg, zooming in using a "sight") in the Proj matrix, Move your models around using the model view.

Share on other sites
Wow,those are a lot of info, thanks a lot!

There aren''''t problems that can''''t be solved with a gun...

1. 1
2. 2
3. 3
4. 4
5. 5
Rutin
11

• 12
• 19
• 10
• 14
• 10
• Forum Statistics

• Total Topics
632665
• Total Posts
3007711
• Who's Online (See full list)

There are no registered users currently online

×