Jump to content
  • Advertisement

Archived

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

NeXius

ModelView/Projection Matrices

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I''m trying to implement frustum culling in a project I''m currently working on, and this involves extracting the frustum from the modelview and projection matrices, which I don''t understand. They are two 4*4 arrays, but of what? I understand that every object is multiplied by the modelview matrix, which allows for rotation, translation and scaling, but if each of these consist of four modifications (x, y, z, w) shouldn''t there be a fourth? To make it 16? Or am I missing something? I''ve read the red book (OpenGL programming guide) and I still don''t understand it. And I think it''s important that I should understand something as fundamental as these... Any help would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
quote:

They are two 4*4 arrays, but of what?


Of floating point numbers.

quote:

I understand that every object is multiplied by the modelview matrix, which allows for rotation, translation and scaling, but if each of these consist of four modifications (x, y, z, w) shouldn't there be a fourth? To make it 16? Or am I missing something?


rotation, scaling, translation, projection, etc, are all encoded in all 16 values of the matrix. You can represent as few or as much operations as you like in a single matrix. The columns/rows of the matrix aren't directly related to fundamental geometry operations (except translation). The whole 4*4 matrix represents those operations simultaneously.

To be a bit more precise: The upper left 3*3 part can represent rotation, scaling and shearing (or any combination of them). Each (x,y,z) column represents an axis of the matrices coordinate frame. Translation is represented by the last column, right of the 3*3 area. The last row multiplies the homogeneous coordinate, and is used for non-linear projection operations.

You should learn about fundamental matrix theory before going any further. There are lots of good resource sites about that topic, just browse the resource section of gamedev.net.

As a start, have a look at the matrix FAQ.

/ Yann

[edited by - Yann L on September 13, 2002 11:21:26 PM]

Share this post


Link to post
Share on other sites
i think this page will answer all if not most of your questions, its very good

http://www.gamedev.net/reference/articles/article417.asp

"We are what we repeatedly do. Excellence, then, is not an act, but a habit." - Aristotle

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!