Tuesday, January 06, 2009

(0) Comments

Double Rotation using Bones in 3D Studio Max v.9

welcome to infomix.blogspot.com

I think we should start with a little info about this tutorial. I created a rig for a character in a group project I was doing in a class, and once the rig was completed and we looked at the 3D animatic, we noticed there was a problem with the hand rotating around; double rotation in the forearm. We searched on the internet to try to find a solution to the problem, but since we couldn't we had to tackle it ourselves. My teacher wouldn't let me stop until I reached complete fetal position, so let's get down to how I solved this problem.

For those of you who don't know what double rotation is; it's the rotation of two bones inside your forearm--the radius and the ulna. As you rotate your hand those two bones rotate over one

another to allow us such motion.

click for larger version

click for larger version

When you have your model completed, make sure you have the right edge loops for where you place your bones. For the double rotation, you have to create another edge loop between the wrist and the elbow joint. Like that circled in this next photo.

click for larger version

The character I set this up in was called "Emo Boy." So, in his rig I attached his name to the bones which looked like this: (Note, red bones and controllers are for the right side of the rig, blue bones and controllers are for the left side, and yellow is for the spine, neck, and head. That is just my personal preference.)






Those are just the bones for the arm so that it's easier to follow along with this tutorial. If you didn't know, you should have the bones at the elbow joint at a slight angle so the IK chain can deform properly. Here is a picture of the arm bones placed in the Emo Boy model.

click for larger version

After the bones have been placed in the correct spot, you then create four dummy helper objects. You name them according to the names of the bones, for example;





click for larger version

Next, you have to align these Dummy objects to the bones, the dummy's are going to act as bones to apply the IK chain with, confused yet? I hope not, but hopefully things will get easier. I recommend aligning them from the hand bone up to the upperarm. For the Hand dummy, LowerArm dummy, and UpperArm dummy, align them using the following photo (Align XYZ position, and XYZ orientation)

click for larger version

With Bone_Emo_LowerArm01_Dummy_R align it the same way, BUT only align the XYZ position, not the XYZ orientation. This will help make sure the IK chain bends like a triangle, instead of a rectangle, which is what you don't want.

This next part is the MOST confusing part about setting this up, refer to the following picture.

click for larger version

Basically, you have your dummy's lined up with your bones and you begin linking them so thing start to move how they are supposed to. I'm going to list the names of the bones and what to link them to, but in the image you just have letters as reference for the linking information. Make sure you start with the big black arrows on the bottom; which would be:

Bone_Emo_Hand_Dummy_R linked to Bone_Emo_LowerArm_Dummy_R link that to Bone_Emo_UpperArm_Dummy_R.

Then link Bone_Emo_Hand_R to Bone_Emo_Hand_Dummy_R

Link Bone_Emo_LowerArm01_R to Bone_Emo_LowerArm01_Dummy_R then link to Bone_Emo_LowerArm_R and link that to Bone_Emo_LowerArm_Dummy_R

Link Bone_Emo_UpperArm_R to Bone_Emo_UpperArm_Dummy_R then link that to Bone_Emo_Clavicle_R

Like I said, check the previous photo for a simpler version of this linkage system.

The next step, with the UpperArm dummy object selected, go to Animation -> IK Solver -> HI Solver. When you get the rubberband, click on the Hand dummy object to create the IK Chain.

click for larger version

Check it to make sure it works, but make sure you Undo so that it goes back to the right spot. After creating the IK chain, you can create your Wrist controller; I renamed mine CTRL_Wrist_R.

Create a circle, then rotate it 90 degrees to the right while holding shift, and then select the original and rotate that one 90 degrees again while holding shift to have 3 circles. Then convert a circle to an Editable Spline, and then click on vertex sub-object mode, and then Attach Mult. and click the other 2 circles so you have one circle all together. Next, once you have your controller, you will align its position only to the IK chain, and then you will align its orientation to the Hand_Dummy_R object. Then, select the IK chain and link it to the CTRL_Wrist_R. Then, select the Hand_Dummy_R object and go to Animation -> Constraints -> Orientation Constraint and once the rubberband shows up click on the CTRL_Wrist_R. So pretty much, this is what you should have, and NOW, all you have left is to setup the Double Rotation.

click for larger version

Select both of the forearm bones (LowerArm01 and LowerArm) and select the CTRL_Wrist_R. Then hold down ALT and Right-Click to bring up the Animation Quad menu, and then click on Freeze Rotation.

click for larger version

Then select the LowerArm01 bone and Right-Click and click on Wire Parameter -> Transform -> Rotation -> Keyframe XYZ -> X Rotation to the CTRL_Wrist_R's Transform -> Rotation -> Keyframe XYZ -> X Rotation.

click for larger version

After that the Wire Parameter Dialogue box will pop up. If you followed the previous instruction, the CTRL_Wrist_R should be in the right window, you then click the arrow facing to the left and in the Expression for Bone_LowerArm01_R x-rotation type in X_Rotation/2 and then click Connect.

click for larger version

THAT'S IT!!! Finally, finished, take a look at the next picture and you'll notice that the hand bone has been rotated 90 degrees and the LowerArm01 bone has rotated half as much, so once you skin your model, that will help with stopping that ugly deformation in the wrist. Just make sure when you add the skin modifier to your model, make sure you add the BONES, not the DUMMY objects.

click for larger version

click for larger version

That is the skinned version of double rotation, if I had my model textured it would make much more sense, but please trust me, it's there and it helps out a lot. Again, a special thanks to my Instructors Alex Piejko and Scot Connor. Fellow students, Janelle Bruggeman for Character Design, Ryan Fox for the Model of the young Boy at the beginning, and Steve Montesano for helping me find images of the radius and ulna.