has been shut down on the 6th of March 2021. You can read a bit more about it here.

You are currently reading an archived copy of the latest content, with all the usernames deleted.

Leg Twist

by user78 posted 22-11-2017 | 5 comments

Hi guys, first post around here. But I have a question. Theres always a simple way to do arm and leg twists, but as simple as they are, they're equally unstable when they reach certain poses (Thigh twists in particular). I've been struggling with that specific example myself, so what techniques do you guys use to make a stable thigh twist?


by user36 posted 23-11-2017

I've devoted a lot of the last year to trying to figure this out. A lot of it is just insulating your constraints from the rest of the rig, so that they only ever flip when you want them to. I highly recommend studying when and why orient/parent constraints flip. Other than that there are a lot of methods. If you just pull the X axis value with euler angles, the twist won't flip, but it doesn't always compute correctly. For instance, if you pull the x axis value directly from the control and rotate 90 in z and then 90 in y, no twisting happens. I've never tried using a parent constraint to fix that, and that might not be a bad easy solution, but you'll probably get the flipping problem again, and it won't be entirely accurate. I think the best solution is to somehow extract the twist value from the node's world orientation. These videos aren't hard to find, but in case you or anyone else reading has missed these, the simplest and most lightweight version I've found is here That one flips reliably at 180 deg, which is often enough all that's necessary. There's also the 360 twist extractor, but it's harder to understand and integrate, and only really works correctly when you're directly using the controls. If you applied the 360 deg extractor to an IK rig, it would still flip when twisting 180 degrees, because that's where the ik joints flip anyway, and if you applied the rig to a control that was also being affected by a constraint, you'd need to make some changes to this setup to get it to work. If you need even more twist, a good option is a plugin. Never tried this yet, but it seems promising: The plugin uses simulation data, which means that its state is dependent on the previous frame, so scrubbing the timeline can get a little funky. Still, this plugin is proof that there are solutions of which I know nothing. Other than that, you can add a separate twist attribute which is independent from the control's orientation, and use that to overdrive the twist past 180deg when needed.


by user77 posted 30-11-2017

hi Voxel, thanks for sharing. These are really good work around, especially using quarternion to calculate the twist. Cheers!


by user77 posted 23-11-2017

Hi MurleyBird, I had similar problem years ago. While doing research I found several ways to get around this, here's what work best for me:

one of the main problem with rotation in rigging is they rotate in Euler mode which always cause some weird problem at certain extreme pose. For example, two poses can looks identical but their rotational value are totally different and it's very hard to predict when Maya will decide to suddenly change value. When it come to rigging twisting, we normally only use one axis to drive the twist. And because of the Euler behavior, it's highly unstable if we just use directly the value from a joint or controller. Usually I will make a locator that help me lessen the Euler effect to minimum. I would:

  1. create a locator at the same point and same orientation as the joint (ankle for leg and wrist for arm), let's called this "loc_L_wrist_PRD"

  2. Make an offset group for the locator so it's value is 0 0 0

  3. Make an empty group at same point and same orientation as the joint also, let's called this "loc_L_wrist_PRDsource"

  4. Parent "loc_L_wrist_PRDsource" to my wrist joint (value will become 0 0 0).

  5. Parent "loc_L_wrist_PRD" offset group to elbow joint

  6. parent constraint "loc_L_wrist_PRD" to "loc_L_wrist_PRDsource"

By doing that, "loc_L_wrist_PRD" will follow the wrist, but driven by the wrist joint parentMatrix therefore the effect of Euler is kept to minimum. I now can use this "loc_L_wrist_PRD" to drive my twist. Hope this help :)


by user91 posted 29-11-2017

PNHuy: I think that solution can solve my problem ( so thanks! I'm afraid I don't understand exactly how it avoids the Euler problem of the wrist joint, though.


by user78 posted 23-11-2017

Thanks PNHuy, this helped in making it more stable! Still flips at one point but its having a better result so far, looking a bit more into it, see if I can figure it out!