Need info on Modelview Matrix

Started by
6 comments, last by orbis 22 years, 2 months ago
Hey there guys and gurus Being an overly inquisitive programmer, I need to know how the modelview matrix is laid out. I know that the matrix is 4X4 and I am sure that the first three rows contain the rotation, scaling, and camera position (?) and the last row is for transformations. Can anyone clarify this? Am I close? I am currently working on billboarding and I read that I could simply load an identity matrix (3X3) into the modelview matrix to achieve a ''cheaters'' billboarding effect. Any help would be great. -The Headstones are talking... Can you hear them?
-The Headstones are talking... Can you hear them?
Advertisement
http://www.sjbaker.org/steve/omniv/matrices_can_be_your_friends.html

That should be everything you need to know.
Thx
-The Headstones are talking... Can you hear them?
hi,
problem with the above mentioned tutorial is that it does not explain the contents.
it took me a while to collect the info.
basic setup (C-Style):
[ 0][ 1][ 2][ 3]
[ 4][ 5][ 6][ 7]
[ 8][ 9][10][11]
[12][13][14][15]

now the contents:
[ 0][ 4][ 8] = right vector
[ 1][ 5][ 9] = up vector
[ 2][ 6][10] = forward vector
[12][13][14] = Position
[ 3][ 7][11][15] = perspective projection

hope it helps.

cu

frank
Ok... You are correct in that the afore mentioned page does not actually contain information on the layout of the modelview matrix. As a result I had to go collecting info as well, and I ended up with the same result-set. A few questions now, if you don't mind:

A) Are the RIGHT and UP vectors used to define the orientation of the local co-ordinate system and are these vectors relative to the axes (x and y) of said system?

B) Are these vectors normalized?

C) Is the FORWARD vector also referred to as the LOOKAT vector and is its purpose simply for defining the front and back of an object? (Does this parallel the z axis of a local coord sys?)

D) Does POSITION refer to the translation of the local origin relative to the world co-ordinates or to the camera?

E) (A dumb question I am sure) How is the perspective projection useful to me?

A lot of questions I know. Any help would be appreciated. Thx in advance.

I just thought of something else: Are the RIGHT and UP vectors perpendicular to each other? Are the FORWARD and UP vectors perpendicular to each other?

-The Headstones are talking... Can you hear them?

Edited by - orbis on February 17, 2002 2:06:04 AM
-The Headstones are talking... Can you hear them?
Look in to the red book, in one of the last chapters theirs information about the modelview matrix(in one of the appendices).



"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
Thank you for your reply. However, the appendix that you refer to does not actually lay out the modelview matrix. The post from Frank was exactly what I was looking for.

-The Headstones are talking... Can you hear them?
-The Headstones are talking... Can you hear them?
although I am also just learning the contents of the modelview matrix I''ll do my best.

A) Are the RIGHT and UP vectors used to define the orientation of the local co-ordinate system and are these vectors relative to the axes (x and y) of said system?

all vectors are coming from the position.

B) Are these vectors normalized?

don''t know

C) Is the FORWARD vector also referred to as the LOOKAT vector and is its purpose simply for defining the front and back of an object? (Does this parallel the z axis of a local coord sys?)

think so.

D) Does POSITION refer to the translation of the local origin relative to the world co-ordinates or to the camera?

the former iirc.

E) (A dumb question I am sure) How is the perspective projection useful to me?

i have no idea! ;-)

A lot of questions I know. Any help would be appreciated. Thx in advance.

I just thought of something else: Are the RIGHT and UP vectors perpendicular to each other? Are the FORWARD and UP vectors perpendicular to each other?

think of it this way.
picture yourself in space.
extend your right arm in a 90° angle to the right.
extend your left arm in a 90° angle forward.
the up vector goes from your hip through your head.
the right vector is your right arm.
and your left arm is forward.
pos is your position in space.

hope i could help
i''f i find out more i''ll keep you posted.

cu

frank

This topic is closed to new replies.

Advertisement