Inverse and Transpose Matrices
hi everybody
well, i know the various uses of these matrices, but, um i don''t know the exact meaning of them.
I live in israel, and my english''s pretty awesome, but i can''t seem to figure out what transpose and inverse matrices mean
so if u can pls explain simply
thanx.
First off, seeing that just joined the forums today, welcome to GameDev!
Now, for the matrices:
A transpose matrix is simply the matrix you get by "rotating" the original around its major diagonal:
An inverse matrix is a matrix, that if you multiply it by your original one, you''ll get the identity matrix:
A * A^-1 = A^-1 * A = I
I assume you know what an identity matrix is (if not - ask).
Michael K.,
Designer and Graphics Programmer of "The Keepers"
We come in peace... surrender or die!
Now, for the matrices:
A transpose matrix is simply the matrix you get by "rotating" the original around its major diagonal:
/0 1 2\A = |3 8 1| \4 0 3/ /0 3 4\A^t = |1 8 0| \2 1 3/
An inverse matrix is a matrix, that if you multiply it by your original one, you''ll get the identity matrix:
A * A^-1 = A^-1 * A = I
I assume you know what an identity matrix is (if not - ask).
Michael K.,
Designer and Graphics Programmer of "The Keepers"
We come in peace... surrender or die!
Perhaps one should note an important fact about inverses and transposes, esp. in the domain of computer graphics: a matrix transpose is actually the same as an inverse, if the matrix is an orthonormal rotation matrix with a determinant of 1. This is very often the case in 3D graphics.
Taking the ''real'' inverse of an arbitrary matrix is computationally expensive. Taking the transpose is a piece of cake. So, if you can make sure that a (3x3) matrix represents a rotation, then you can simply replace the inverse by a transpose. Very useful to know, it saves you a lot of processor cycles
Besides that, I would suggest looking at GDNet''s resource section about matrices. You will certainly find some tutorials that will help you to better understand the basic concepts of matrices.
Taking the ''real'' inverse of an arbitrary matrix is computationally expensive. Taking the transpose is a piece of cake. So, if you can make sure that a (3x3) matrix represents a rotation, then you can simply replace the inverse by a transpose. Very useful to know, it saves you a lot of processor cycles
Besides that, I would suggest looking at GDNet''s resource section about matrices. You will certainly find some tutorials that will help you to better understand the basic concepts of matrices.
That''s something I''ve been wondering. In computer games, is it even worth coding a proper matrix inverse, or is the transpose sufficient?
That highly depends on what you''re using your matrices for. If it''s simply a rotation matrix, then a transpose it equal to an inverse. If it''s a rotation + translation matrix (the typical 3x4 matrices, where the last row is [0,0,0,1]), then you can use a simplified inversion algorithm, involving basically a transpose and an adjustment of the translation term.
But if you want to invert matrices that encode projection, scaling, shearing, etc, then you need a full inversion function.
But if you want to invert matrices that encode projection, scaling, shearing, etc, then you need a full inversion function.
I''ve found the main place scaling and shearing can come into play is for skinning - artists can often use less bones and/or simplify frames if they can use scale in their transforms.
Some artists can do some quite surprisingly cool things with other forms of animation such as object matrix anims if you give them full control over the matrix.
Whether to allow scales etc is often a point of hot debate between programmers and artists , purely because of the transpose vs inverse issue.
--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Some artists can do some quite surprisingly cool things with other forms of animation such as object matrix anims if you give them full control over the matrix.
Whether to allow scales etc is often a point of hot debate between programmers and artists , purely because of the transpose vs inverse issue.
--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Right now I''m using the inverse of an entitys matrix to set the camera position (along with a mult to move the cam back and up) and I''m wondering if I can cut out the expensive inverse all-together (the calculations for the inverse is freaking crazy and I don''t feel like doing the p3 optimizations).
Would this be a situation where I can use the tranpose of the matrix to get the entity rotation and just transfer over the tranlation column?
Basically though this camera view is supposed to follow behind the entity (3rd person view). Is there another easier way all together to do this (using matrices of course)? Also, would it be wise to eventually upgrade to quaternions for rotation (at the very least for matrix compression)???
Thanks!
"Love all, trust a few. Do wrong to none." - Shakespeare
Dirge - Aurelio Reis
www.CodeFortress.com
Current Causes:
Nissan sues Nissan
Would this be a situation where I can use the tranpose of the matrix to get the entity rotation and just transfer over the tranlation column?
Basically though this camera view is supposed to follow behind the entity (3rd person view). Is there another easier way all together to do this (using matrices of course)? Also, would it be wise to eventually upgrade to quaternions for rotation (at the very least for matrix compression)???
Thanks!
"Love all, trust a few. Do wrong to none." - Shakespeare
Dirge - Aurelio Reis
www.CodeFortress.com
Current Causes:
Nissan sues Nissan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement