control twisting arms, rolling bones in IK chain?

I’m trying to setup a decent arm rig, well a whole rig actually but the arm is my current problem… lol
I have some nice IK effect and a way to control direction the elbow points. Several ways actually, but only one or two actually act like they should.
from this link the second setup in the middle of the page is the one I currently like best.
However, there is no way I can control the twisting of the arm, not without the elbow locking up at some place. When I set rotation limits on the upper and forearm, they twitch then jump back to original position most of the time, when I give them copy rotation constraints and assign that to just the (local or global) y(whatever axis twists the arm), the arm most of the times just locks up. It still follows the IK bone, but it neither twists or follows the elbow control bone.

I’ve tried a lot of different setting and setups, like the first example or a LOT of variations of both, but most of the time> IF I get the twist to work, the elbowcontrol doesn’t work or vice versa.
With a working elbow direction control, it is most of the times still possible to rotate the arm bones along the twist axis manually when you align the view carefully, but that is just not what I’m after.
I use segmented Bbones, rather than additional twist bones, it’s quite possible to get the twist result when you use FK and all, but I want a simpler to use IK setup.

Does anyone have any suggestions?

It sounds like your Min and Max values are not set properly. Be sure to also do Ctrl-N with all bones selected in Edit mode to set Roll Angles.


I don’t think that’s it, I’ve tried a LOT of different settings already. I do wonder: when would you use a limit rotation constraint on bones when bones already have one build in(if you choose to limit or lock the rotation).
I can give you a few files with experiments to look through if you like.

One more thing: why would you need to reset bone roll angles for every bone? I’ve noticed this sometimes borks up the armature, why is that? where can I find more info about the roll angles?

I’ve noticed this sometimes borks up the armature, why is that? where can I find more info about the roll angles?

No, it may bork the Action (because one IPO Chanel is out of sync with its neighbor(s)), but that’s because the Roll Angle was changed after the bone was posed).

Unfortunately there’s nothing much been written about Roll Angle. It’s a difficult concept to illustrate (write or draw pics), but not so difficult to understand.

If you look at your left hand, palm down, from above, and assume for this exercise that all four fingers have their X-Axis pointing towards the thumb and have a Roll Angle of zero (same as if you created an Armature in Top View), but the thumb would need a Roll Angle of about 90. So if you rotate the first digit of the fingers around their Local X (R-XX) they would go down perpendicular to the back of the hand, but if you rotate the thumb (Roll Angle 90 and again around the Local X) it would go Left, towards the fingers.

Ahh… but who bothers to pose bones like that? You just grab the IK Target and move it!. Well the Transform Matrix is divided into four chunks (I think? I’m not sure of this but it helps to think of it [or look at it] this way and if you actually test it in Blender it works), Bone Space (the structure of the bone including Roll Angle), Armature Space (the structure of the Armature = the sum of all BoneSpace), Pose Space (transforms relative to Rest Position = recorded changes in BoneSpace within ArmatureSpace) and World Space (the sum of all the above relative to the (transforms of) the Armature Object.

If all Bone Transforms were done in Local Space (G,R,S XX or ZZ) it would be a simple matter of setting the Roll Angle (YY) and making Axis Constrained transforms relative to that Roll Angle. Of course this would be a nightmare to set up and would completely fail as soon as Constraints (or Modifiers) were added.

Constraints are evaluated in Pose Space, so they can only evaluate (constrain) whatever came before (ArmatureSpace, which, in turn gets its info from BoneSpace, where Roll Angle resides). Roll Angle for every bone doesn’t have to be zero, but, at a minimum, the first (FK) bone in a constrained chain should be the only bone in that chain with a non-zero roll angle. A chain of (say) three bones, each with different roll angles will work fine with a simple IK Constraint, but as soon as you put (Locks or) Limits on, then those values are relative to the Zero Point of the Y-Axis, the Roll Angle (where the X-Axis is pointing to as it is rolled around Y). And then, when you add any other Constraint (PoseSpace again), especially if the Target is another Bone, it has to evaluate the BoneSpace (Roll Angle) and ArmatureSpace (where X and Z are relative to Y) of both Bones, check out what’s happened to them both in PoseSpace and only then write them to the Action (I’m not sure that it actually writes anything so let’s just say “draws them in the display”).

There was something else I was going to write but I forgot it; I’ll add it if I remember.


HOOOO BOY thank you!! I don’t want to cheer too hard but I think I found it, and boy was it SIMPLE!! the 4 transform matrixes seemed logical enough, but it was that local stuff and the swapping constraints that made me look towards the ROT button in the IK constraint. It makes the constrained bones local rotation space follow the IK targets local rotation space. SO I can control both the twisting and positioning of the arm by moving and rotating the IK target at the wrist. using local AND global coordinates. And to an extent I can lock some axes, but eeeeeeeeeeeeeeerrrr…

No it doesn’t fully work, the twisting and the locks do, but unfortunately this causes the arm to look at the IK target AFTER the rotations have been done. Which means they don’t really follow the IK target anymore.
Still doable, but hey…

All in all it’s probably easier to just have this armIK do it’s magic, then do a local rotate to control the twist. That’s the gimmick I wanted automated, but I didn’t know about the shortcut RYY for local locks… I thought it was something that oughta be under mmb when manipulating, only relative to the transform orientation you have active at the time.
Plus I never thought about something this simple…
I COULD fake it by giving the upper arm a copy rotation, set to localY, so it copied it from another controller bone such as the IK target…
Either way, the arm thing should be solved now, on to revisit the rest!

Still a few problems with it… with normal IK and rotation limits I have no elbow control, I can sort of point the elbow by rotating the upper arm.
If I set an IK target or a track to constraint.
I think I’ve come round circle, deciding which initial setup I should go for…

Edit: think I have it… chose an ik for the forearm to guide the hand, chainlength 2, and 1 for the upperarm chainlength 2, so I affect the shoulder (which has rotation limits) as well. behaves good enough… now the rest again.

got into the leg rigging. The one on the right is the rig example made after Calvins leg tutorial, the one on the left is my version. It has 3 bones less, 4 if you count the masterbone for the upperbody, the other rig doesn’t have it yet. It uses other kinds of constraints.
But it has a few limitations… the foot is not attached to the leg, but that is solved by linking the hip and footroot to the masterbone, so moving it up will move the foot along as well. Then reposition the foot afterwards. floorbone acts as a floor.
and “bugs”, I can’t get the foot to bend downwards yet, the ankle mechanism works, but I haven’t figured out yet how to make everything follow some kind of foot masterbone. image:
Aarh, what the hell, I’ll probably use Calvins legrig setup anyway, since it doesn’t appear to have any bugs, I just liked the idea of another setup with different constraints and less bones…

I actually updated my foot rig, take a look here:

thanks mate, done it, and aside from it being a kickass leg rig, It also helped me in finding that annoying don’t-follow-the-footroots-rotation-bug in my version. twas the limit LOCAL option I needed… LOL, it’s basically the same now as your leg rig up to the point where you add the toedeform and footdeform bones. I then parent the footroot bone to the lowerbody bone, so it moves up with the legs. I add a footbone underneath it so it can’t stretch so far as to pull the foot off from the leg when you move the footroot. It’s a cheat, but it also works.
Thanks man!

I have a new problem with the arms and hand, I can’t get it puzzled out right.
The problem is the bone roll. Every now and then I select all bones and recalculate the bone roll when I’ve done a number of changes. If you set up your bones correct this shouldn’t cause any problems right?
Well they do now… because the arms twist a little bit and the fingers twist as well, they should all have the localX axis pointing either up or down(in global YZ space, NOT XZ space) when you look at mancandy, all the fingerbones are twisted, the arms are slightly twisted, but the bones are not rotated along their local y axis, not even when you recalculate them. My fingerbones have their X and Z axes jumping all over the place.
I have this problem in the arms (and it gets noticable when I weight the mesh) and in the fingers, which I was gonna set up like mancandy’s fingers…

I think I’ll recreate the bones in em, but they start to bend as well. even when I redo the fingers! If they don’t do that in mancandy, why can’t I mimick this?

SO basically: How do you setup/build your bones so the recalculating doesn’t cause problems? how do you alter the bone roll(edit mode rot around local axis doesn’t work.)
And why does it cause my bones to bend as they do?

image: top bones above arms is as it should be(untill a recalculate), arm bones and finger bones are twisted.
Shot at 2007-08-07

A question hidden in a “bump”
First off, about the bone roll recalculate thing, I’ve slightly modified the arm so that the bones can stay flat and don’t change the roll anymore, it’s a cheat but it works.
I found this demoreel today
and if you look at the gorilla, that is EXACTLY the functionality I am trying to get into my rig. If I find out how I’ll surely implement it. It will probably not make in in my current rig, I’ve gone back to keeping it as simple as possible, because the more bones I put in, the worse it deforms…

BUT please do look at this demoreel, and tell me, HOW would you replicate this in blender? preferably only with bones and constraints and stiffnes and locks?


how do you alter the bone roll(edit mode rot around local axis doesn’t work.)
Have you tried using the “Normal” setting? In pose mode, this appears to be equivalent to “bone space” and lets you adjust the roll angle of each bone.

I am just starting out on this myself and I am rather confused about the coordinate systems being used and the nomenclature. Here’s what I think I have understood so far:

Global - This is just the global coordinate system.
Local - This seems to be “armature space” in pose mode. However, in the “copy loc” and “copy rot” constraints, if “local” is enabled, it seems to be “bone space” (which makes sense).
Normal - Seems to be “armature space” in edit mode, “bone space” in pose mode

I have currently no idea what space the rotation constraints for IK are in. I think it should be “bone space” of the parent bone, but I do not think that is the case (which is unfortunate - I am not sure how to properly use them).

Now, as to the roll angle of bones in an IK chain, rolling one bone (using “Normal” setting) sometimes influences the roll angle of another bone. I don’t know why this is, since two axes should be enough to just point a bone somewhere. But then again, I don’t know how exactly the IK solver derives roll angles.

It’s all quite confusing. :eek: