# Matrix

THREAD CLOSED
 Thread Tools Display Modes
 07 July 2013 pixols New Member   portfolio The CGKid USA Matrix 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. share quote
 07 July 2013 djx Where's my pony?   David Johnson vfx & creature td Melbourne, Australia 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 share quote
 07 July 2013 pixols New Member   portfolio The CGKid USA Hi djx, I want to know definitions in following format: The Matrix node is used to .................... share quote
 07 July 2013 djx Where's my pony?   David Johnson vfx & creature td Melbourne, Australia 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 share quote
 07 July 2013 ThE_JacO Cultist   portfolio CGConnect Member Raffaele Fragapane Performance Technology Supervisor Animal Logic Sydney, Australia 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) __________________ Come, Join the Cult http://www.cultofrig.com - Rigging from First Principles share quote
 07 July 2013 pixols New Member   portfolio The CGKid USA Thanks ThE_JacO and David. Actually I was trying to calculate angle between two joints and I was quite confused which matrix to to connect to the Decompose Matrix and angleBetween nodes. Thanks. share quote
07 July 2013
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 nodes-only 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.
Attached Images
 Screenshot-Node Editor.jpg (76.6 KB, 87 views)
__________________
Come, Join the Cult http://www.cultofrig.com - Rigging from First Principles

Last edited by ThE_JacO : 07 July 2013 at 04:03 AM.

 07 July 2013 pixols New Member   portfolio The CGKid USA Thanks The JacO, this is what I was looking for. Thanks again. share quote
 07 July 2013 ThE_JacO Cultist   portfolio CGConnect Member Raffaele Fragapane Performance Technology Supervisor Animal Logic Sydney, Australia You're welcome, I would still, however, strongly encourage you to look into the basics of linear algebra (vectors and matrix maths). __________________ Come, Join the Cult http://www.cultofrig.com - Rigging from First Principles share quote
 07 July 2013 pixols New Member   portfolio The CGKid USA 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? share quote
 07 July 2013 pixols New Member   portfolio The CGKid USA Can someone help please share quote
 07 July 2013 ThE_JacO Cultist   portfolio CGConnect Member Raffaele Fragapane Performance Technology Supervisor Animal Logic Sydney, Australia 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. __________________ Come, Join the Cult http://www.cultofrig.com - Rigging from First Principles share quote
 07 July 2013 zoharl A newbie   portfolio Zohar Wellington, New Zealand Guys, I lost you here: Originally Posted by pixols: 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) 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). share quote
 07 July 2013 ThE_JacO Cultist   portfolio CGConnect Member Raffaele Fragapane Performance Technology Supervisor Animal Logic Sydney, Australia 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 pre-homogenized 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). __________________ Come, Join the Cult http://www.cultofrig.com - Rigging from First Principles Last edited by ThE_JacO : 07 July 2013 at 11:43 AM. share quote
 07 July 2013 CGTalk Moderation Expert 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. share quote
 Thread Closed share thread

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
 Please select one User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home -------------------- Gallery     Latest Entries     Featured 2D     Featured 3D     CG Awards     Community Awards Main     News     General Discussion     Off Topic     Recruitment         Temp Job Board Challenges     Rival Crimson X Chaos     Education     Demo Reel     Portfolio Review GROUPS WIP ADVICE     Pro Select     Art Direction and Interviews     New 2D/3D Sketchbooks 2018     WIP 2D/3D & Animation         WIP/Critique: 3D         WIP/Critique: 2D             Speedpaints & Sketchbooks         WIP/Critique: Animation     Partners and Groups         Kitbash 3D Thunderdome         Collaborative Projects Autodesk     Autodesk Maya         Maya Dynamics         Maya Rendering         Maya Character Setup         Maya Programming     Autodesk Miscellaneous         Autodesk MotionBuilder         Autodesk Mudbox         Autodesk Softimage             XSI: Programming             ICE: Interactive Creative Environment     Autodesk 3ds max         3dsMax Tutorials & Tips         3dsMax Resources         3dsMax SDK and MaxScript         Plugins & Add-ons         Particle Flow     Mudbox Featured Gallery ZBrush     Featured Zbrush Gallery     Pixologic ZBrush     Keyshot     Marvelous Designer Texturing     Allegorithmic Substance         Substance Designer         Substance Painter         Substance Featured Gallery     Texturing XYZ     Mari     Marmoset Toolbag Software     Maxon Cinema 4D         Cinema 4D Resources     Side Effects Houdini     Compositing Software         The Foundry Nuke         Adobe After Effects         Autodesk Effects and Compositing         Eyeon Software Digital Fusion     Additional Software         Lightwave 3D             LW Resources             LW Tutorials         The Foundry Modo             The Foundry Time Travel Challenge         E-on Software Vue         Photoshop / Painter         Blender         3DCoat Techniques     Art Techniques and Theories     Digital Matte Painting         Digital Matte Painting Mini-Challenge     Modeling         Modeling Challenge             Member Model Collection     Texturing and Surfacing     Character Rigging     Animation     Lighting and Shaders         Lighting Challenges     Compositing and Editing     Anatomy and Figurative Art         SPOTLIGHT: Best of the Artistic Anatomy and Figurative Art Forum         Tutorials and Workshops         Personal Anatomy & Sketchbook Threads         References, Resources, and Supplies Technical     VR/AR     Master Virtual Reality with BrioVR     Workstation Builds     Game Engine     Graphics Programming     Technical and Hardware CGS Labs     Sketchbooks     Hardcore Crit     Discussions and Meet Ups
Miscellaneous

All times are GMT. The time now is 11:40 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.