Everything you thought you knew about Maya Joint Orient is wrong!

Rigging Dojo – Technical guide to Maya Joint Orients

A rig is the animators pencil, as such it has to allow the animator to get from pose A to B with out freaking out (aka wobbling). It should also be editable from the graph editor to create predictable results during the polish pass.

None of this is possible without firstly setting up a clean skeleton with proper joint orients (how the joints aim) and secondly, controlling the order that Maya applies the EULER rotation animation to the transform node (rotation order).

The Maya Joint Orient Problem! or Why you should care about Joint settings?

We at Rigging Dojo would like to warn you of a debilitating issue that could be lurking in your rigging pipeline at this very moment. What is this silent danger you ask?

BAD JOINT ORIENTS!!!! Spooky, we know. It is the silent and hidden destroyer of all animation including ik/fk switching issues, pole vector problems, gimble lock and much more.

The worst part is, you may think you are immune to such a terrible issue. You think to yourself “I know what I am doing” or “I am experienced” or “I work a big studio” or even that “I helped write Maya”. But as we will show none of these matter, you can still be infected. It infects 99% of Maya rigs, especially legacy assets.

How do we know? We’ve been fixing these problems in rigs across a wide range of studios for years, and we started off like you creating bad skeletons. We’ve been lucky enough to work with a lot of students over the last five years at Rigging Dojo and this is the number 1 rigging issue that almost every student has struggled with in Maya.

We’ve seen it cause endless frustration for artists. Especially people new to Maya, who are familiar with 3dsMax and XSI bone based systems. Animators also are on the receiving end of this often succumbing to fits of rage when they just want to animate their rig without it breaking or do something simple like cleanly switch from IK to FK and back.

Maya joints visually let you think an arm or leg or finger is “planar” but in reality the joint orients (how they aim at the next joint) might be all jacked up.

Lets dig in deeper and get to the bottom of all this, keep reading so this doesn’t become the look of your animation department. Tim Borrelli – animator just finding out his rig is broken and all the animations need to be redone.

angryAnimator

Vocabulary of a Maya Joint

Maya Joints have extra hidden transform values compared with regular Maya objects.

  • Joint Orient (JO) – this aims/rotates the joint but leaves the “rotation channels” at 0,0,0
  • Rotation Order (RO) – this is on all Maya objects but is more interdependent on joints due to the Joint Orients
  • Local Rotation Axis (LRA) – The visual axis showing how the joint is oriented/aiming due to the JO*

Autodesk Maya attribute editor showing the diffrent settings for the joint transform node

*Note: there is an option on a joint and in Maya to, by hand, select and rotate the LRA and this shows up as values in the “Rotate Axis“. This is not recommended as a way to edit or adjust the joint aim. This doesn’t export out of Maya correctly, it creates yet another layer of offset on the joint and can still create unstable skeletons even if your Joint orient looks sound. In summary, don’t touch it!

Do defaults matter?

The first question we usually get when teaching JO is “do the Maya tool defaults matter when creating the joints”?
Answer = no…..we have to fix it all later no matter what you do
For example depending on how you draw the joint Maya will flip the axis based on the angle of the next joint anyway. JO always has to be oriented after, for each joint depending on how it was drawn. So we never care what the defaults are.

The next question we get…why are some skeletons Y down the joint, some X, does it matter, one tutorial said do it this way, how should I do it?
Answer = legacy, it doesn’t matter, pipeline, software choice.
Note: Spline IK solvers as of Maya 2015 still require X down the joints for the “Advanced Twist” settings to work as well.

To expand on this the next question comes as “what do we do about the other axis, what way do they go”?
Answer = Don’t care, doesn’t matter, do what is required..
Why?  The direction of axis only matters for consistency of how you want the values to work for animators and your own sanity hooking up rig bits -+. Consistent action and expectation matters only, make + bend things – straiten things or switch it, much like aim axis (X down) legacy, pipeline, software used etc will have some say in the matter.

Rotation order explained

Once we understand that the direction of the joint doesn’t matter at all, the choice is arbitrary you might think that is all you have to do…aim the joints orient them and move on. But we have to pay attention to the rotation order if we change the defaults.

Think of every rotation order setting like a traditional parent child hierarchy except hidden in the joint node. When you change the order of what rotation axis is used first, second, and third: just imagine you are behind the scenes, re-parenting that hierarchy.

Rotate order is calculated as stated backward from the name so when you read the default order. XYZ it really looks like and animates like this
Z
-Y
X
Like a simple hierarchy of nodes.

eular rotation example displaying x then y then z in an offset parent child relationship

As we come back to the “do defaults matter” question, while we said no they don’t, lets explain why they are the way they are.

The defaults for rotation order are XYZ because, X (rotates last) and is default for a joint that also defaults to X aiming down the joint (twist). If it was any other order then the joint would wobble instead of twist cleanly once animated.
So if you leave defaults it is fine, chose to not put x down fine pick y? Then you need to set the twist axis rotate order also to YXZ or YZX.

How and When Maya Joints Break without you knowing

We know you might think this is crazy and out of hand and maybe even to much talking about this, but here we get to the real problem.

Maya has no tool that can work for joint orients on skeletons that are not world aligned. None!

Common tasks that break this when editing joints:

  • Using insert/D  to move a joint pivot
  • Drawing a skeleton at an angle
  • Moving or adjusting a joint with the “auto orient” setting turned on for the move tool
  • Freezing Transforms with the “joint orient” box checked

You might think you can just use the Maya orient joint tool or some other tool to easily fix this and you would be half right but..  Where Maya joint control breaks down is the fact that while visually you think an arm or leg or finger is “planer” the joint orients might be all jacked up making animation, IK snapping/pole vectors freak out and extra work for everyone, as we stated before.

What does that mean- Well, if you draw joints in an A pose or snap mesh center,run an auto rig /skeleton on Mixamo – the reality is no matter what it looks like, you will NOT have and can’t get planar clean joints at elbows and knees. You can not fix it with the orient joint tool. You have to rebuild the chain and jump through hoops to fix this all because Autodesk will not update their internal orient code to use parent space vs world space for the Up vector setting!

There are some scripts that can help you but if you are on a skinned mesh you have to save your weights, delete the skin cluster and reskin after you fix the orients.

*Comet cartoons cometJointOrient script is still a very good script and included in the http://www.cgmonks.com/tools/ this will allow you to fix a non-skinned skeleton

Now you know the problem, you understand the tools and joint settings and options, lets look at best practices to vaccinate your rigs.

Maya best practices for clean skeletons

Maya skeleton with basic good settings for elbow and knees for example - only one joint orient value and one translate value

We want to help and teach you to identify the symptoms to vaccinate yourself and your pipeline from this problem, with this simple visual guide and this lengthy post.

  • Root/top joint – this is a world space joint and for biped characters often we want them to be stable as they turn around and move through the world it is best to have it alined with the world and it has a rotation order (RO) that matches the global orientation. Y being the master then either x or z (zxy or xzy).
  • Top level joints can have joint orients in all axes. Areas where chains split are considered top level chains. For instance, hips, clavicles, finger[0].
  • Top nodes or single child nodes in a spoke like pattern can have any values in ORIENT and any TRANSLATE value
  • Rotations always need to be zero – regardless of where the joint is.
  • Subsequent children in chains have translation and jointOrient values in only one axis each. So elbow, wrist, knee, finger[1-x].
  • One translate value for child nodes in a single chain- because Maya doesn’t use bones that have length, this translate value is the “bone length” from parent joint to child joint.
    • Warning: if a child joint is in a chain like an arm or leg and a joint has 2 or 3 translate values this is a warning that the parent joint isn’t aiming at the child, the local rotation axis isn’t aiming down the chain to the child and this can cause scale problems as well if you are doing squash and stretch joints. (Scale axis can aim differently than rotation but 99% of the time you want them to match the rotation axis)
  • End joints (dummys, ends,null bones)- last joint in a single chain may or may not be used in the rig, are often there for visual length but we always set them to an orient of 0,0,0 and that means they align perfectly with the parent joint.

If you would like a video that covers a practical example of these concepts and will scale to cover joint placement and orientation across all parts of a character.

Rigging Dojo Course sneak peek 101: Thumb Joint and Finger Joint Placement from Rigging Dojo on Vimeo.

Future exploring and reading can be done over at the Maya rigging wiki  that is run by the talented Amy Hay (Alumna) and curated by Rigging Dojo.

Here is our handy infographic guide to clean skeleton building.

 

Rigging Dojo visual guide infographic on creating clean skeletons

 

Embed code:

<p><strong>Please include attribution to http://www.riggingdojo.com with this graphic.</strong><br /><br /><a href=’http://www.riggingdojo.com/?p=2286′><img src=’http://www.riggingdojo.com/wp-content/uploads/2014/10/Rigging-Dojo-Technical-guide-to-Maya-Joint-orients-infographic1.png’ alt=’Rigging Dojo Technical guide to Maya Joint orients infographic’ 540px border=’0′ /></a></p>

8 thoughts on “Everything you thought you knew about Maya Joint Orient is wrong!

  1. Epic insight into joints. Thanks! I really like the image of 3 stacked transforms to visualize rotation order. I never thought of doing that, and usually just experiment and wiggle the controls until it works properly.

  2. These are things I’ve learned after the years.
    People always asked me why I took forever with rigs and this is why. I was making sure rigs were SUPER CLEAN! Starting with the skeleton.

  3. I’m having some issues getting the coplaner joint orient tool working Ilya. In Maya 2014 it looks like the api call to MPlane returns a AttributeError: ‘module’ object has no attribute ‘MPlane’.

    In Maya 2016 I see a syntax error in PlaneMode.py. Are you doing something to your custom environment? I will keep digging around as time allows to see if I can pull up more useful information.

  4. It looks like I have it working in 2016 now with no modifications by tweaking some of my own environment. 2014 is still a bust. I will take my comments to Github as I play around with this. Good stuff.

  5. Oh yeah I know it works in 2016 for sure. I used the 2.0 version of the Python API. Maybe I should use 1.0 since just in case in a future update. I think all it takes is changing which imports and libraries I’m using.

Leave a Reply

Your email address will not be published. Required fields are marked *


*