Can someone please explain the following ... pleaseeeeeeeee
Matrix
Inverse Matrix
Parent Matrix
Parent Inverse Matrix
World Matrix
World Inverse Matrix
XForm Matrix
What values these Matrix store?
Thanks.
07202013, 02:12 PM  #2 
Where's my pony?
David Johnson
vfx & creature td
Melbourne,
Australia
Join Date: Jun 2003
Posts: 3,389

What is your math skill level? Did you have a specific interest in those attributes?
This might be of interest: http://www.macaronikazoo.com/?page_id=413 David __________________
http://www.djx.com.au 
07212013, 05:53 AM  #4 
Where's my pony?
David Johnson
vfx & creature td
Melbourne,
Australia
Join Date: Jun 2003
Posts: 3,389

Hmm. Did you try the docs?
In the "nodes" section (under technical documentation) look up "transform" and you'll get some nice info about the transform matrix, but since it inherits from the "dagNode", you'll need to look that one up as well. And of course you should also look up the "joint", since they have a couple of extras also worth knowing about. David __________________
http://www.djx.com.au 
07212013, 10:19 AM  #5 
MOBeratorX
portfolio Raffaele Fragapane
That Creature Dude
Animal Logic
Sydney,
Australia
Join Date: Jul 2002
Posts: 10,954

If you want to know what a matrix does you should seriously consider reading about matrices in first place. Xform is for transform, the rest is all normal matrix related terminology, and it's not Maya specific, nor it can be explained sufficiently in a single post.
In short: A Matrix is how a transform is described. You can start from here: http://en.wikipedia.org/wiki/Matrix_(mathematics) __________________
"As an online CG discussion grows longer, the probability of the topic being shifted to subsidies approaches 1" Free Maya Nodes 
07222013, 03:59 AM  #7 
MOBeratorX
portfolio Raffaele Fragapane
That Creature Dude
Animal Logic
Sydney,
Australia
Join Date: Jul 2002
Posts: 10,954

If that's still a problem:
Angle between in Maya takes vectors, think of them as arrows. If you want the angle between first and second in a 3joint chain (say the elbow angle), you can take the vector between first and second, and the vector between second and third, and feed those two into angle between. Attached how you could do it nodesonly on a 3j chain with output to a locator's rotation (just to show the effect). If you work in world space when doing those subtractions you always get the "natural roll axis" between the joints, and spare yourself a hierarchy sensitive setup. The +//Avg nodes are set to sub. __________________
"As an online CG discussion grows longer, the probability of the topic being shifted to subsidies approaches 1" Free Maya Nodes Last edited by ThE_JacO : 07222013 at 04:03 AM. 
07222013, 05:16 AM  #9 
MOBeratorX
portfolio Raffaele Fragapane
That Creature Dude
Animal Logic
Sydney,
Australia
Join Date: Jul 2002
Posts: 10,954

You're welcome, I would still, however, strongly encourage you to look into the basics of linear algebra (vectors and matrix maths).
__________________
"As an online CG discussion grows longer, the probability of the topic being shifted to subsidies approaches 1" Free Maya Nodes 
07262013, 06:39 AM  #10 
New Member
portfolio
The CGKid
USA
Join Date: Jul 2013
Posts: 9

Vector Product Utility Node
The JackO please help. According to Maya documentation:
Given an input vector (a, b, c) and an input matrix: A B C D E F G H I J K L M N O P Then Vector Matrix Product is defined as follows: x = (a*A) + (b*B) + (c*C) y = (a*E) + (b*F) + (c*G) z = (a*I) + (b*J) + (c*K) I have connected Sampler Info > Normal Camera to vectorProduct1 > Input1 and Cube > xForm Matrix to vectorProduct1 > Matrix. The operation is set to Vector matrix Product. Below are the values that Maya generates: getAttr samplerInfo1.normalCamera; // 0 0 1 // getAttr pCube1.xformMatrix; // 0.828906 0.336418 0.44692 0 0.236082 0.934695 0.265726 0 0.507129 0.114752 0.854197 0 1.864228 1.752258 4.159013 1 // I think it will be like this: 0.828906 0.336418 0.446920 0 0.236082 0.934695 0.265726 0 0.507129 0.114752 0.854197 0 1.864228 1.752258 4.159013 1 According to documentation, the output should be 0.44692, 0.26573, 0.85420 but actual output is: getAttr vectorProduct1.output; // 0.507129 0.114752 0.854197 // Am I doing something wrong? 
07302013, 10:51 AM  #12 
MOBeratorX
portfolio Raffaele Fragapane
That Creature Dude
Animal Logic
Sydney,
Australia
Join Date: Jul 2002
Posts: 10,954

Multiplying a world axis unit vector such as 0,0,1 (world Z) by an object's matrix will result in the same exact (Z in this case) axis of that object after its transform.
Given that, your result, and the magnitues of the numbers it becomes pretty obvious that Maya's output when printing the matrix is: [0.828906 0.336418 0.44692 0] X axis of the object's xform [0.236082 0.934695 0.265726 0] Y axis of the object's xform [0.507129 0.114752 0.854197 0] Z axis of the object's xform [1.864228 1.752258 4.159013 1] translation of the object. Which looks like an object translated to 1.864228 1.752258 4.159013 with a slight orientation offset but still fairly well aligned to world (each axis' dominant scalar is the same as the axis "label" itself, so X component dominant for the X axis, Y for the Y axis and Z for the Z axis). Your only mistake was assuming that the text representation of an object that isn't text in itself must have been unequivocally just the scalars serialized the way you thought they would have been, but the pattern to figure out what is being printed is actually quite obvious. Again I would suggest you look into matrices and vectors and try to get a little bit more of an intuitive understanding of the subject before making assumptions about their arithmetic decomposition, printing and so on No offense implied, purely a suggestion to get through your learning in an optimal fashion. If you decide not to, at least try to think more openly and always do multiple tests to figure out how things work when you're trying to reverse engineer your way back through a problem or a new subject. Just the one is not a great way to draw conclusions and get stuck. __________________
"As an online CG discussion grows longer, the probability of the topic being shifted to subsidies approaches 1" Free Maya Nodes 
07312013, 07:17 AM  #13  
A newbie
portfolio
Zohar
Wellington,
New Zealand
Join Date: Mar 2009
Posts: 1,820

Guys, I lost you here:
Quote:
The dimensions of the vector and matrix are incompatible, and the formula is wrong. You need to convert the vector to homogenous coordinates (google), then multiply, then convert back. Also, please provide a full code that reproduces your scene/problem, since I'm not familiar with these nodes or problem (unless you got your answer already). 

07312013, 11:33 AM  #14 
MOBeratorX
portfolio Raffaele Fragapane
That Creature Dude
Animal Logic
Sydney,
Australia
Join Date: Jul 2002
Posts: 10,954

Nah, given convention the dimensions are perfectly compatible
More apps than not (and this includes Maya, Soft, and Nuke for sure) given a 3D vector and a 4x4 matrix assume the classic prehomogenized vector and matrix, you practically suppress a a lot if you can assume matrix normality, and turn it into a 4x3 * 3x1 (or 4x1 with w at 0 or 1 if it makes you more comfortable). The actual operation you can actually even consider 3x3 * 3x1 with the last row (displacement) added later if the vector is a displacement (w= 1), or suppressed if it's a normal (w= 0). Notice how the last column is 0,0,0,1 (or last row if you think in terms of row matrices). Lastly: if you prefer this thinking you can think of the 3D vector as a quadrivector with W assumed by context (see above). __________________
"As an online CG discussion grows longer, the probability of the topic being shifted to subsidies approaches 1" Free Maya Nodes Last edited by ThE_JacO : 07312013 at 11:43 AM. 
07312013, 11:33 AM  #15 
Lord of the posts
Join Date: Sep 2003
Posts: 1,066,481

Thread automatically closed
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities Note that as CGTalk Members, you agree to the terms and conditions of using this website. 
Thread Closed share thread 
«
Previous Thread

Next Thread
»

Thread Tools  Search this Thread 
Display Modes  

