Why SRT In Matrix ?
Why SRT In Matrix ?
How come matricies are read S,R,T with translation being last, what is the reason for this in 3D software ?

 Posts: 726
 Joined: 09 Jun 2009, 20:33
Re: Why SRT In Matrix ?
nope transformations aren't applied in this order i think take a look at wikipedia...
If you can translate french maybe you can read this article who explain you the transforms in ICE and in particular convertion between local and global
http://fbonometti.blogs.3dvf.com/archives/799
If you can translate french maybe you can read this article who explain you the transforms in ICE and in particular convertion between local and global
http://fbonometti.blogs.3dvf.com/archives/799

 Posts: 395
 Joined: 17 Nov 2009, 17:46
Re: Why SRT In Matrix ?
I made a tutorial awhile back to try to explain 4x4 matrix  http://www.sicommunity.com/community/v ... =41&t=1707
My first attempt to understanding matrix was from trying to translate XNA game code into ICE. It's a bit of a mess; maybe there's something in there helpful  http://www.sicommunity.com/community/v ... t=game+xna
The top (left) 3x3 matrix is used to calculate scale and rotation. The numbers correspond to the direction that the axis points at. So pointing out in X (normalized) is 1,0,0. Y = 0,1,0, Z = 0,0,1.
Identity matrix
1,0,0
0,1,0
0,0,1
Scaling in X by 2x would be 2,0,0. Scaling half of Y would be 0,.5,0. When you rotate the matrix, the numbers will change, utilizing sin and cos to calculate the new vector.
Because of the way they are calculated, it allows you to apply other mathematic operations to the matrices (multiplying them together, etc). Hopefully that helps explain.
My first attempt to understanding matrix was from trying to translate XNA game code into ICE. It's a bit of a mess; maybe there's something in there helpful  http://www.sicommunity.com/community/v ... t=game+xna
The top (left) 3x3 matrix is used to calculate scale and rotation. The numbers correspond to the direction that the axis points at. So pointing out in X (normalized) is 1,0,0. Y = 0,1,0, Z = 0,0,1.
Identity matrix
1,0,0
0,1,0
0,0,1
Scaling in X by 2x would be 2,0,0. Scaling half of Y would be 0,.5,0. When you rotate the matrix, the numbers will change, utilizing sin and cos to calculate the new vector.
Because of the way they are calculated, it allows you to apply other mathematic operations to the matrices (multiplying them together, etc). Hopefully that helps explain.

 Posts: 864
 Joined: 18 Mar 2010, 23:38
 Location: St. Thomas, Ontario
Re: Why SRT In Matrix ?
Softimage is rowmajor vector based, so the SRT is the correct order of operation in Soft (and an easy way to remember it).
Be careful with Wikipedia and other math primer, you have to understand the difference between rowmajor vector and columnmajor vector operation on matrices. As an example, OpenGL is columnmajor vector based and therefore the matrices and order of operation will be different. To translate columnmajor matrices into rowmajor matrices, you will need to "transpose" the matrix.
You also have to factor in the coordinate system you are working with (left hand or right hand coordinate). This will have an impact on the matrix order and representation. Softimage is a right hand coordinate system with Y axis up.
I have attached the matrix representation in Softimage for your info. Please note that I am using affine transformation matrices (4x4 matrix). This is easier to work with when translation is included.
Be careful with Wikipedia and other math primer, you have to understand the difference between rowmajor vector and columnmajor vector operation on matrices. As an example, OpenGL is columnmajor vector based and therefore the matrices and order of operation will be different. To translate columnmajor matrices into rowmajor matrices, you will need to "transpose" the matrix.
Code: Select all
OpenGL
 mo m4 m8 m12 
 m1 m5 m9 m13 
 m2 m6 m10 m14 
 m3 m7 m11 m15 
Code: Select all
Soft
 m0 m1 m2 m3 
 m4 m5 m6 m7 
 m8 m9 m10 m11 
 m12 m13 m14 m15 
I have attached the matrix representation in Softimage for your info. Please note that I am using affine transformation matrices (4x4 matrix). This is easier to work with when translation is included.
You do not have the required permissions to view the files attached to this post.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
Re: Why SRT In Matrix ?
I understand the Translation, and scaling of a matrix, not so much the rotation from the graph image.Daniel Brassard wrote:Softimage is rowmajor vector based, so the SRT is the correct order of operation in Soft (and an easy way to remember it).
Be careful with Wikipedia and other math primer, you have to understand the difference between rowmajor vector and columnmajor vector operation on matrices. As an example, OpenGL is columnmajor vector based and therefore the matrices and order of operation will be different. To translate columnmajor matrices into rowmajor matrices, you will need to "transpose" the matrix.
Code: Select all
OpenGL  mo m4 m8 m12   m1 m5 m9 m13   m2 m6 m10 m14   m3 m7 m11 m15 
You also have to factor in the coordinate system you are working with (left hand or right hand coordinate). This will have an impact on the matrix order and representation. Softimage is a right hand coordinate system with Y axis up.Code: Select all
Soft  m0 m1 m2 m3   m4 m5 m6 m7   m8 m9 m10 m11   m12 m13 m14 m15 
I have attached the matrix representation in Softimage for your info. Please note that I am using affine transformation matrices (4x4 matrix). This is easier to work with when translation is included.

 Posts: 395
 Joined: 17 Nov 2009, 17:46
Re: Why SRT In Matrix ?
Falam, please try to understand this inside of ICE by show numeric values. It's very hard to comprehend just by looking at a grid of numbers on a website... Store a SRT to Matrix > 4x4 matrix (force it to a 4x4 matrix) > set data. I would show values on each section, 1 showing Axis, 1 showing numeric. Then rotate the numbers around each axis 90 degrees. Notice how the numbers in the matrix change. REMEMBER: they correspond to the vector that the axis is pointing at.
1,0,0
0,1,0
0,0,1
As you rotate them at 90 degree intervals (and assuming Scale =1), you will see those numbers changing between 1 and 1. So maybe:
1 > 0 > 1 > 0 > 1 or maybe
0 > 1 > 0 > 1 > 0 or
0 > 1 > 0 > 1 > 0. That's the Cosine and Sin at work for ya.......
It is SOOOOOOO much easier to grasp this stuff when you can visualize changes thru ICE!!!!
Please try first in ICE, and then report back.
1,0,0
0,1,0
0,0,1
As you rotate them at 90 degree intervals (and assuming Scale =1), you will see those numbers changing between 1 and 1. So maybe:
1 > 0 > 1 > 0 > 1 or maybe
0 > 1 > 0 > 1 > 0 or
0 > 1 > 0 > 1 > 0. That's the Cosine and Sin at work for ya.......
It is SOOOOOOO much easier to grasp this stuff when you can visualize changes thru ICE!!!!
Please try first in ICE, and then report back.
Re: Why SRT In Matrix ?
I did try in ICE before asking the question, I wanted to know how Softimage solves a matrix, that I have an understanding for. Surprising that rotations are just SIN and COSINE curves.

 Posts: 395
 Joined: 17 Nov 2009, 17:46
Re: Why SRT In Matrix ?
Makes sense when think about it. How do you calculate points moving around a circle... Cos and sin. ;)

 Posts: 864
 Joined: 18 Mar 2010, 23:38
 Location: St. Thomas, Ontario
Re: Why SRT In Matrix ?
http://mathworld.wolfram.com/RotationMatrix.html'
Watch also these videos on KhanAcademy
https://www.khanacademy.org/math/linear ... thexaxis
Watch also these videos on KhanAcademy
https://www.khanacademy.org/math/linear ... thexaxis
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
Re: Why SRT In Matrix ?
I have to do some of my own studying on this, I see what is going on when I visual in ICE, still not understanding, for the thread here is what I did.

 Posts: 864
 Joined: 18 Mar 2010, 23:38
 Location: St. Thomas, Ontario
Re: Why SRT In Matrix ?
Also read this, may be useful to understand transformation in Softimage. An oldy but still good.
http://www.isner.com/Transform/IsnerTra ... nip_04.htm
http://www.isner.com/Transform/IsnerTra ... nip_04.htm
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
Re: Why SRT In Matrix ?
Daniel  I have those papers
I do believe once you figure out matrices, you may not be at an advanced level, but heading in that direction at a good speed
I do believe once you figure out matrices, you may not be at an advanced level, but heading in that direction at a good speed

 Posts: 864
 Joined: 18 Mar 2010, 23:38
 Location: St. Thomas, Ontario
Re: Why SRT In Matrix ?
You do not have the required permissions to view the files attached to this post.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif