Rolls and other rolls

Most CGI riggers are taught about a thing called a forearm roll. It’s in many books.  Someone likely teaches them some kind of simple way to build it into their rigs.

They think they’ve got it. But when it goes through production, it breaks. And usually, they then put in a switch to “turn it off” so that animators can fix/animate it manually.

Then, maybe, they reach another level of enlightenment when they learn about a thing called a quaternion. And in particular, about a thing called spherical linear interpolation (SLERP). And if they’re REALLY on the ball, they figure out that Maya’s “shortest” interpolation is in-fact, a SLERP.  They then figure out how to get their constraint targets set up to utilize this, to put the “joint flip” where it should be… 180 degrees away from the wrist’s rest position.  If they don’t realize this, they end up in expression hell… trying to figure out how to make a set of Euler angles do something they just can’t do on their own.

They may realize there is a shin roll… and that it’s identical.

Then comes the really fun part.  Where the rigger begins trying to create rolls for biceps and thighs.  Because, they know there are rolls on those joints too.  And the bicep one in particular, is really important and severe when it’s not accounted for.

They may come to the conclusion that those rolls are different.  They are “unrolls.”  But they figure, they’ve got the magic cure-all… the quaternion SLERP.  And they build something and integrate it.

And it breaks.  Specifically, it flips.  Because the range of motion for the shoulder joint is much larger with more degrees of freedom.  So the SLERP’s flip ends up either showing up when the elbow tucks into the side, or when the hand reaches out in front and crosses the body.  Basically, it’s just choosing if it flips when crossing the Y or Z axes.

There is a solution though.  Here’s a hint: you can always compare the elevation of your hand to your shoulder…

I’ve never encountered a single rig that had a solution figured out correctly.  It’s something I’ve integrated into my own rigs for years.  Though animation that passes through MotionBuilder’s retargeting engine does get it right.  I believe the HumanIK system does it right, but it’s hidden in code.  Every rig I encounter, I check it.  And most often, I find a flip in their solution.  Often I find a switch to turn it off incase it’s flipping.  Sometimes, I find a switch to choose between the Y and Z flip.

This problem doesn’t actually show up when you move onward and upward to proper muscle system rigging.  In those systems, the muscles themselves do the right thing. They get twisted around like rubber bands as the humorous spins but the attachments to the collar bone and ribcage keep them anchored higher up.