Support

  Tips & Techniques - MOCCA

MOCCA:
Advanced Arm Setup
Download:
Project
Works with:
MOCCA, XL, Studio
Requires:
Version 8.1 +
 


 
Making an arm of a character move realistically is quite difficult. It needs IK along with FK for this realistic motion. Keep in mind that the ulna and radial bones control the banking of the wrist. This tutorial will show you how to setup an arm that encompass' all of these motions.

 
Step 1: Create an arm bone chain as shown using the Bone Tool (Plugins=>MOCCA=>Bone Tool). Creating the fingers for this bone chain isn't really necessary. Make sure to add a Null Bone to the top of the bone chain, this is where the IK chain will be anchored from. You can do this by having the topmost bone selected and using the Add / Update Null Bone from the Active Tool Manager.

 
Step 2: With any rig you will want to have the bones uniquely named. Name the bones with the same naming as shown.

 
Step 3: Next you need to create a bone that will serve as the rotation for the wrist. To do this select the Forearm bone and Copy / Paste the object (Edit=>Copy / Edit=>Paste).

 
Expand the new copied object and delete the Wrist bone. Reselect the copied Forearm bone and use the Split Bone function in the Active Tool Manager.

 
After using the Split Bone function of the Bone Tool you will have two copies of the Forearm bone. Rename the parented Forearm to 'Forearm Twist' and move it out of any hierarchy. You can now delete the copied Forearm bone.

 
Step 4: Now place the Wrist bone as a child of the Forearm Twist. Your hierarchy should look like the hierarchy shown.

 
Step 5: Its time to start setting up the IK for the bones. Exit the Bone Tool by switching over to the Move Tool. This is just a precaution so the bones aren't accidently manipulated while setting up the IK. Select the Shoulder Null and use the Setup IK Chain function (Plugins=>MOCCA=>Setup IK Chain).

 
The Forearm Twist and Hand bones were not included into the IK chain. These bones were not included in the IK chain because they can more easily be controlled by FK or expressions. Place the Forearm Twist hierarchy as a child of the Forearm bone. Now these bones will inherit the correct motion from the IK chain but can still have their own controls.

 
Step 6: Now move the Forearm.Tip Goal out of the Shoulder Null hierarchy and zero out all rotation fields. To make selection of the rig controls easier switch over to the Object tab of the Attributes Manager and enter the following settings: Display = Cube, Radius = 15m, and Orientation = XY.

 
Step 7: To add a little stability to the rig, select the Forearm bone and add a Root Goal (Plugins=>MOCCA=>Add Root Goal). This will help the IK decipher what side the bones should rotate inversely on. Move the Forearm.Root Goal out of the Shoulder Null hierarchy and zero out its rotation fields.

 
Much like with the Forearm.Tip Goal, change the Display settings of the Forearm.Root Goal to the following: Display = Point, Radius = 15m, and Orientation to XY. Move this object out from the elbow area as shown.

 
NOTE: The Display properties that are being used for the goals are just a personal preference and are by no means set in stone. Feel free to experiment to see what you like the best for displaying goals.

 
Step 8: Upvectors lock the orienation of a bone to prevent bones from spinning around their Z-axis. Select the Bicep bone and add an UpVector (Plugins=>MOCCA=>Add UpVector). Move the Bicep.Up out of the Shoulder Null hierarchy.

 
Move the Bicep.Up object closer to the bones as shown. Repeat this process for the Forearm bone as well.

 
Step 9: Now you need to adjust some of the parameters located within the Soft IK tags. Select the Soft IK tag applied to the Shoulder Null bone. In the Tag properties of the Attributes Manager increase the Strength to 100%. This will give the IK chain a more rigid movement.

 
Select the Soft IK tag applied to the Forearm bone. In the Constraint tab of the Attributes Manager lower the Goal Strength to 30%. Remember that this goal is to help out the IK and not completely control the IK chain.

 
Also select the Soft IK tag applied to the Forearm.Tip Effector. In the Constraint tab increase the Goal Strength to 100%. This is the goal that will ultimately be controlling the majority of the IK chain.

 
Step 10: Now is probably the best time to specify the rest state of the IK. Do this by selecting the Shoulder Null and using Set Rest Position and Set Rest Rotation from Plugins=>MOCCA=>Set Rest Position / Rotation. These positions and rotations are the starting point for the IK calculations.

 
Step 11: The IK part of the arm is now setup. What needs to be created now is a switch to switch between IK and FK for this arm. The FK IK Switch tutorial will show you how to do this.

 
Step 12: With the FK IK switch setup you will still need to make a couple of adjustments to the arm rig. If you rotate the Bicep and Forearm while using FK, the upvectors will not rotate with them. This will cause the bones to snap to a different orientation once IK is turned back on. Open the Xpresso tag on the FK - IK Switch object.

 
Drag and drop the Forearm and Forearm.Up objects into the Xpresso Editor. Make a copy of the Forearm.Up node by holding Ctrl and dragging it to a new location. Also create a Condition node from the X-Pool (System Operators=>Xpresso=>Logic=>Condition).

 
Create a Global Matrix output for the Forearm node. Also create a Matrix2Vectors node (Xpresso=>Adapter=>Matrix2Vectors). While you are in the Adapter group, create a Vectors2Matrix node which will be used in a little while.

 
Now connect the Global Matrix output of the Forearm node to the Matrix input of the Matrix2Vectors node. Also connect the V1 V2 V3 outputs to the corresponding inputs on the Vectors2Matrix.

 
A matrix stores all Position, Scale and Rotation data into one data type. You are using a matrix because the upvector needs both Position and Rotation data. The Offset is the actual position of the object, which currently is the Forearm bone. The Forearm.Up rests exactly 100 units above the Forearm, so you will need to add 100 to the Y field of the Offset. Create a Math node from the Calculate group.

 
With the Math node selected make sure that its Data Type is set to Vector and its Function is set to Add. When switching the Data Type to Vector three fields will now be available for both Inputs. Enter 100 into the middle field for the Input [2] parameter.

 
Connect the Offset output to the topmost input of the Math node. Now connect the Output of the Math node to the Offset input of the Vectors2Matrix node.

 
You now need to define what type of data the Condition node will switch between. Select the Condition node and set its Data Type to Matrix. Now connect the Matrix output of the Vectors2Matrix to the first Input of the Condition node.

 
When enabling IK you want the upvectors to move independently and not with the bones. To do this create a Global Matrix output for one of the Forearm.Up nodes. Connect that output to the remaining Input of the Condition node. On the remaining Forearm.Up node create a Global Matrix input and connect that with the Condition node.

 
The last thing you need to do for this expression is connect the IK On output of the FK IK Switch node to the Switch input of the Condition node. Now when you move the arm with FK the upvectors will move with the bones. When you move the arm with IK the upvectors will only move when you do so.

 
Step 13: This same expression needs to be copied to the Bicep and Bicep.Up objects. To do this select all of the nodes that you just created and Ctrl + drag them to a new location in the Xpresso Editor. This will automatically Copy and Paste then nodes.

 
Now you need to swap the Forearm and Forearm.Up nodes with the Bicep and Bicep.Up objects respectively. You can do this by drag and dropping the Bicep object onto the Forearm node; this will automatically change the Forearm node into a Bicep node. Do this with the Bicep.Up object and the Forearm.Up nodes as well.

 
NOTE: You will need to connect the IK On output to the Switch input of the Condition node for all the newly copied nodes.

 
Step 14: There is still a couple of last things to do for this arm rig. Multi select all of the Soft IK tags except for the one applied to the Shoulder Null bone. In the Rest tab of the Atributes Manager enable Force Position. This will make it so the bones do not stretch apart from one another.

 
Step 15: The last thing you need to do is create an object to control the rotation of the Forearm Twist bone. Create a Null Object by going to Objects=>Null Object. Rename this object to 'Wrist Rotator'.

 
Transfer the Wrist Rotater object to the Forearm Twist bone. Make sure the Wrist Rotator is selected and go to Functions=>Transfer. In the Search For field enter 'Forearm Twist'. Be sure to enable the Position and Rotation checkboxes so that data is transferred to the Wrist Rotator.

 
To make the selection process of the Wrist Rotator easier, enter 100 in the P.Y field for the Coord. tab of the Attributes Manager. This will place the Wrist Rotator around the same elevation as the upvectors.

 
Switch over to the Object tab of the Attributes Manager and change its properties to the following: Display to Rectangle, Radius to 15m, Aspect Ratio to 0.5, and Orientation to XZ.

 
Step 16: You are going to want the Wrist Rotator to move with the Forearm. This will make controlling the twist of the forearm easier since the control will keep its same distance from the bone. Place the Wrist Rotator as a child of the Forearm bone. Make sure this object is the absolute lowest child of the Forearm hierarchy just as shown.

 
Step 17: Now you need to drive the B rotation of the Forearm Twist with the X movement of the Wrist Rotator. To do this go into the Coord. tab for the Wrist Rotator and right + click (PC) or Cmnd + click (MAC) on the 'X' of the P.X text. Set this parameter as the driver by using Set Driver from the Animation sub menu.

 
Select the Forearm Twist and right + click (PC) or Cmnd + click (MAC) on the 'B' of the R.B text. Set this as the driven parameter by using Set Driven (Relative) from the Animation sub menu.

 
With the Wrist Rotator still selected add a Stop tag to it (File=>New Tag=>Stop Tag). In the Tag tab of the Attributes Manager make sure that only Stop Deformer is enabled. This will guarantee that the bones will not deform this object.

 
NOTE: The arm at this point is setup. Keep in mind that you may have to adjust where the goals and upvectors are placed in the hierarchy for your character so it moves how you want it to.


© 2004 All rights reserved. For the personal and/or professional use of Cinema 4D users only. Reprint without permission is strictly prohibited.

© 2010 All rights reserved
Copyright Information |
Privacy Policy | Terms of Use