Arm twist problem

hey friends…

I have always found problem in wrist twist.

i make 3 joints between the elbow and wrist joint for maintain the arm falloff, but when wrist rotate more then 90 degree then in between joints of wrist and elbow is start moving in opposite direction.

please send solution of this .

You have a couple options depending upon your needs and your setup.

I assume you’re using a quaternion-based interpolation for the intermediate twist joints (e.g., an orientConstraint in Maya, such as this basic approach). There will always be one “flip” point on your arc and it’s a problem of basic quaternion algebra. The only way to work around it is to build up a cache of rotation values to essentially override the flip when it would otherwise happen (e.g., basically use the opposite interpolation when the delta arc from an ordinary slerp is unreasonable). In Maya, you can achieve this by using the “No Flip” interpolation mode on an orientation constraint.

1 Like

On the assumption you’re driving the foreArm twist joints directly from the rotation of the wrist…

You can set up a reasonably stable twist system by doing this but you have to pick the rotation order of your wrist joint extremely carefully to give you a clean rotation value with no flipping to drive the twist from. Assuming your wrist joint axis is Y down the joint length you should try either yzx or yxz depending on the orientation of your X and Z axis.

Adam absolutely correct about the standard slerp implementation doing a neighborhood check in order to get the shortest path around the unit sphere. For a single axis rotational constraint like a twist setting your constraint interpolation type to Longest would usually solve the problem assuming your rest poses are very clean.
Alternatively you need to extract the twist information out of your rotation. Without writing you own node the easiest way to implement that is with an aim constraint and no up vector option. What you’ll get is a quaternion base aim vector solve which is in fact the rotation without any spin around the target axis. Then just diff that with the full rotation and you get your twist! A custom implementation of this can give you up to -360/+360 degrees of movement!

1 Like

I use a variation of what Serguei is doing and it works great for wrist or shoulder hips etc. stable and you can then drive sub twist joints with regular constraints or math nodes with out problem

Wow, I never knew aim constraints could be so useful, I still don’t see how you would set that up. I usually use a ribbon setup for the rotation but still run into issues when rotating the wrist in gimbal mode.

Ok, first post. I want to set up a stretchy arm that has a forearm twist bone between the elbow and wrist (where else would it be? Durr). The twist is being driven by the wrist controller, but I would like to know what would be the best way to have the stretch function work with the twist bone (making it stretch as well). The initial setup is the same as the CG toolkit setup with orientation constraints for the forearm twist and palm rotation. The IK was moved from the forearm to the wrist. Was thinking that I should plug the x scale of the forearm into an expression that is contolling the position of the wrist joint/ik. How do any of you guys get around this issue. Pointers very welcome.

Thankyou

When I make mine, There is the elbow, the wrist parented to the elbow, and the hand joint parented to the wrist. Then any twisting joints are usually parented under the elbow as well (Doesn’t matter how many, parent them all under the elbow. You could parent them in a chain but then you have to deal with making sure the multiplied twist works out well, and I find it easier to just use some basic multiplication to get a good fall off.)

Then, to avoid the problems they were talking about, I don’t use orient constraints for that any more. I do a direct connection from the twist attribute (lets assume rotateX) to a multiply node with something like 0.5 as the second input so it’s rotating half as much or how ever much you want for the fall off, when then connects to the forearm twist joint which should have the same LRA orientation as the wrist.

Then I just have the math coming out of the arclen node (through what ever math pipeline you use to get your stretch) driving the scaling of the shoulder and the elbow.

Also, on a note, I will sometimes do something similar for the shoulder where it has at least one twist joint in the center, and then the shoulder it’s self can only rotate in Y,Z and the twist joint does the twist part. (Yes, the IK it’s self will twist on the shoulder, but I set up the skinning skeleton to follow that way.)

It’s really great posts.

Hi everyone!

I’m bring this back from the dead: I’ve read through all the posts and have tried to create my own twist setup with an aim constraint which has it’s world up type set to none and then take a difference in local space rotations to get the twist but I can’t seem to get it to be stable, I’m seeing flipping when I rotate my hand in the local -Y direction can anyone help me out?

Here’s a link to my scene file: https://mega.nz/#!oNQXgTjI!0moQYh2U1ZpOr34ojh3tOb9Y2IivDRNaY_7vsJ3VoL8 (it was too large to attach to a post supposedly so I had to upload it to MEGA)

Thanks,
-Harry

1 Like

if you’re using local rotations to derive twist you need to make sure the twist axis is the first one in the rotation order…

I am; I have a hand control with a child gimbal control which is on of the objects we want to read rotational values from, to do this I have a empty group orient constrained to it in the same level of the hierarchy that the aim constrained empty group is in, so the local Y and Z rotational values should be the same so that when we do the subtraction what we’re left with is the X twist rotation.

At some point when the hand or hand gimbal control is rotated the orient and aim constraint change their rotational values but keep their orientation (for example -90 becomes +270), this isn’t unexpected but the problem is that the they don’t both change at the same orientation, so everything will be stable but then one of the constraints will change its rotational values while the other stays the same, that’s what’s causing the flipping.

-Harry

Unfortunately I don’t have a solution but I often struggle with extracting stable twist as well, hence I wanted to express my interest as well.
As long as there is an orient / aim constraint involved it is going to flip at 180/-180 degrees…

If you use an aim constraint with some sort of “up” information then the constrained object will flip in one direction at +/-90 degrees, at least using an aim constraint with no “up” information (quaternion) should allow us to extend that to +/-180 in, for example, both Y- and Z-axis’.

Yes, but where is the advantage in having infinite twist capabilities like in a ribbon rig if you can only drive a +/-180 range. Of course an animator could always have a single attribute to control the twist or a dedicated controller which uses a direct connection but in the end is there really no way to extract more than ±180 twist rotation?

It appears to be possible as you can see in this video, but it’s difficult to say without having a proper explanation or exploring the scene.

You can only go past 180 reliably by using a single value to represent the twist – which usually means either eulers or a two-object solution using a child bone to hold the twist. Matrices and quats are orientations rather than rotations – there is no concept of ‘720 degrees’ in either of those representations.