http://www.newtek.com/3d/tutorial/character1/skeleton.html (Amiga Plus Extra No. 5/97, 05/1997)
Building the Skeleton
For this tutorial, we are going to build a skeleton inside of a simple leg and animate it using multiple IK goals. The first step is to load the object and build the skeleton.
Loading the object
- To load the leg object, select Objects Panel -> Load Object and select the Leg.lwo object. Select continue at the bottom of the Objects Panel. If you are using OpenGL, you should see a blocky leg object in your Layout display. It is difficult to place bones inside of an object when it is being displayed as a full solid object.
- To change the object to wireframe display, open the Scene Panel and select Show -> Show All Object as Front Face Wireframes. Select continue to go back to Layout
Note: If you have multiple objects in a scene that you want to be displayed in different refresh modes, the second column in Scene Overview allows you to cycle through the possible refresh modes for individual objects. (See page 23 of the Reference Manual.)
- Select View -> Side from Layout to change to the side view and zoom in on the leg object using the period key < . > on the keyboard to zoom in, and the ALT Key + Left Mouse Drag to position the view. Adjust it so you get a full screen view of the leg. If you get into trouble, the comma key < , > zooms out.
- Select Edit -> Objects and check to make sure that the Leg.lwo object is listed under Selected Item at the bottom of the screen. The leg object will also be hi-lighted yellow.
- We can use a couple of keyboard shortcuts to create a quick skeleton for this leg. To do this, select Edit -> Bones and hit the plus key < + > on the keyboard. This creates a parent bone for the currently selected object, places it at the pivot point of object, and names it Bone.
- Select Mouse -> Move and move the bone up to the top, center part of the leg.
- Select Mouse -> Rotate and then lock the Heading ( H ) and Bank ( B ) rotation channels listed under the mouse items in Layout. This will allow us to rotate the bone along the pitch axis so that it is pointing downwards towards the knee without affecting the other angles of rotation. Rotate the bone until the pitch reads about 100 degrees.
- Select Mouse -> Rest Length to make the bone long enough to reach the middle of the knee.
- Use Move, Rotate, and Rest Length on the bone until it looks like Figure 1. Create a keyframe for the bone at frame 0.
- To create the lower leg bone, hit the equals key < = > on the keyboard. This will create a child bone of the currently selected bone and name it Bone (2).
- This lower leg bone is too large for the object, to adjust it use Rotate and Rest Length until it points just a little below the ankle. Create a keyframe at frame 0 for Bone (2). See Figure 2.
- With Bone (2) still selected, hit the equals key < = > again to create a child of that bone. This creates the foot bone, Bone (3) .
- Use the Rotate and Rest Length functions to modify the foot bone until it fits inside of the objects foot. It should look like Figure 3. Create a keyframe at frame 0 for Bone (3).
- With Bone (3) still selected, hit the equals key < = > one last time to create a bone at the end of the foot. What is the purpose of this bone? "Is it a toe?" No, Sorry. This bone will be used as place holder at the end of the foot when we create our IK chain. It will help us control the foot rotation when we move the leg or the legs goal object. (We will get to that in a few minutes.) To avoid confusing this with a toe, Adjust the Rest Length on this bone until it is 0.002 and create a keyframe for it at frame 0. Since this bone is as small as possible and does not deform any geometry, we sometimes call this a "Null Bone".
- Select Bone (1) from the Selected Item Pop-Up and hit the R key (Rest) on the keyboard. This will set the Rest Position and Rest Rotation for the Bone and make it active. You will notice that Bone (1) changes from a dotted line to a solid line when it is activated. Do this for all bones in the chain.
Tip: The up and down arrows on the keyboard cycle through the selected item list. To quickly turn all of the bones on, hit the down arrow key and then the r key until all of the bones have been cycled through.
- The bones are now active and can deform the object. If you want to try the bones out, select Mouse Item -> Rotate and play around with bending the leg and ankle. When you get tired of this, hit Shift + Right Arrow (Next KeyFrame) to reset the bones back to their first keyframe. This is why we turned off AutoKeyAdjust and AutoKeyCreate. If both of these were on, anytime you rotated one of the bones, it would stay in that position. Both of these functions are usually kept off during the set-up phase and then turned on for the animation phase.
Note: If you got yourself into trouble by having Auto Key Adjust and Auto Key Create turned on , you can fix this by turning off both items and then for each bone select reset and create a keyframe at frame 0.
- You might have noticed that when the lower leg was bent backwards, the knee joint compressed down. To fix this, select Bone (2) and hit the P key to bring up the Skeleton Panel. On the lower part of the panel select Joint Compensation and Joint Compensation for Parent. See Figure 4. Leave the values at 100%, this will work fine for our leg. These functions will help keep a "volume" in the area of the knee and keep it from crimping like a bent water hose. While we're in this panel select Bone (3) and also turn on Joint Compensation and Joint Compensation for Parent for the foot bone. This will help retain volume in the ankle area
- Close the Skeleton Panel and rotate the lower leg and foot bones again. You should notice an improvement over the previous settings.