Arm and Hand Controls

A good rig should have both FK/IK built in to the arms. Also a hand controller to switch on and off the influence of the rotation from the lower arm. And there should be a "twist" bone.
The reason why we need a ON/OFF switch for the hand is to have control over the hand if it's placed on a table or grabbing somthing to hold on to.
Remeber to always use the "lock_object.js" script on all ZERONULL's. It's described in "spine" tutorial on how to use it.
I use the mesh and spine setup I talked about in the Spine tutorial. First I create a two jointed chain for the left arm (create it in the top viewport).
Move it up and to the correct placement. You might also have to rotate the root a little.



To not bore you with me drawing all the hand chains I'm just going to use the palm bone. So draw the palm chain in the front viewport and then move it to the correct position. Also in the front viewpost draw a single chain from the spine to the root of the arm chains. Move it into place. Name it
  • L_shoulder_ROOT
    • L_Shoulder
      • L_Shoulder_Eff



Make the end effector of the shoulder chain the parent for the Arm root. And make the last Spine chains end effector the parent for the shoulder root.

Now we need tp prepare for the ON/OFF switch for the hand rotation. Create a null, rename it "LH_NULL". Then postition constrain it to the end effector of the arm. And then also orientation constrain it to the end effector of the arm.
Then make the "LH_NULL" the parent of the palm root.



If you now grab the upper arm's chain and rotate it the "hand" should follow. Undo the rotation.

Now for the twist bone. Create a chain that is half the lenght of the lower arm (draw the chain in the top viewport). Position and Orientation constraint the root to the lower arm, then remove the constraints.
Move the chain in local mode so that it's placed at the lower half of the lower arm. Then make the lower arm the parent for the twist arm root.



We now need an expression to control the twist arm. And the controling chain should of course be the palm chain. And we want half of the rotation to be effected. Open up the kinematic properties for the twist bone (select the bone and press CTRL-K). Right click on the key button for the X rotation and chose "set expression"



In the expression editor you need to add the palm chain values of it's X rotation. In my case the expression becames this:

0 + (bone5.kine.local.rotx / 2)
The "0" is added in front to make sure the expression starts with that value and nothing else. Then it adds the value of the palm chain and divide it by 2. So if you now rotate your hand in X the "twist" arm should follow with half the value.

Now is the time to duplicate this to the right side. Branch Select the "L_shoulder_Root" and also branch select the "LH_NULL". Then use the symmetry option to duplicate this:
  • Edit-> Duplicate/Instance-> Duplicate Symmetry
Also check the box "Share Parent" so that you don't need to parent the new chains to the spine.

You should now have to working sides with arms and twist bone.



The next step is to create the IK and sliders for the extra controls. So to make the controller we need a Custom Parameter Set. And also a object to place it on. The easiest is to create a text from curves. If you are on Linux® you don't have the text option in XSI (in current version 3.01). So you just have to be creative with the curves.
Place the curves over the head and make the spine effector the parent for that object (same as the shoulders).

With the curve selected you now create a Custom Parameter Set
  • Parameter-> New Custom Parameter Set
Name the set Arm_Controls. Still Selected you now add a Parameter
  • Parameter-> New Custom Parameter
Name the control LeftHand_Influence. Set the default value to 1, and also check the box UI Range and the default values are already correct (see image below).



Now add three more parameter exactly the same but with these names (in that order).
  • RightHand_Influence
  • LeftArm_FK-IK
  • RightArm_FK-IK
You should now have a parameter set that looks like this one:



Lock the parameter set so that it's always open (click the keyhole icon on the window).

Next is to create the IK. Use the Puppet Master toolbar (that you should have downloaded from the Spine tutorial). And create an object of your choice which you name "LeftHand". Select the ZERO null and position constrain it to the end effector of the left arm. Then remove the constraint. Instead, constraint the end effector to the Object you named "LeftHand". Do the same with the right arm but name the object "RightHand" (quite obvious eh?).

Now create a "Puppet Cube" that you name "Left_UPV_ARM", and make the lenght 0.5 or something you would feel is small. position constrain the ZERONULL of the "Left_UPV_ARM" to the lower left arm. Then remove the constraint. And move the ZERONULL (branch selected) behind the character in a negative Z. Make a similar one for the right arm, call it "Right_UPV_ARM".
Both UPV's ZERONULL should have the same parent as the shoulders.



Now select the left upper arm and set the "Left_UPV_ARM" object to be the upvector constraint
  • Skeleton-> Chain Up Vector
Do the same for the right arm. And now a little trick. To avoid that the arms snapp, or behaves strangely when you switch off the IK for the first time we now set a keyframe on both upper arms. So select both upper arms, make sure your transform tool is set to rotation and press K to set a keyframe on the first frame.

Now for the more tricky part of connecting. Select the left upper arm and hit enter. Under the tab/section Kinematic Chain you can find the slider "Blend FK/IK". If you now have your Custom Parameter set still open you can drag the "LeftArm_FK-IK" key button to the keybutton of the "Blend FK/IK". See image below.



Do the same with the right arm. This one will only disable the UP Vectors. So now we need to do this with the end effectors as well. Select the left arms end effector. On the right side of the UI click on the botton "Selection", find the Position CNS (located in the Constraints 'folder') and double click on it.
With the properties open for the position constraint do the same as you did with the "Blend FK/IK". Drag the "LeftArm_FK-IK" key button to the "Blend Weights" key button. Do the same for the right arm.

Exacly the same thing we are now going to do with the "Right/LeftHand_Influence". Select the "LH_NULL" and find the orientation constraint. Do the same and drag the "LeftHand_Influence" to the "Blend Weight" key button. Then do the same for the right hand.

You should now have a IK/FK rig with also the possibility to change the influence for the hand rotation.

As the extra little trick we are also going to turn visibility on and off for the arm chains, depending on if we are in FK or IK mode.
Select the upperleft arm, find the Visibility and double click on it. There you'll see "View Visibility, Render Visibility and Selectability". The only one we need to work with is the "View Visibility". Right click on the key button and chose "Set Expression". Then write this expression
cond( crvlist.Arm_Controls.LeftArm_FK-IK < 0.8, True, False )
depending on what you named your curve/text above the characters name this one should work. Just drag 'n drop one of the sliders down in the expression editor window and you'll notice what name it has. This expression turns the visibility value off when the slider is below 0.8
This last this is just optional. But play around with it and see how you like it. You can download the finished scene here I hope you enjoyed this tutorial.


©2003, Stefan Andersson
"lock_object.js"©2003, Bradley Gabe, ILM