Copyright 1998 LOGICBit
Corp. Frank A Rivera. Used with permission.
(This tutorial is copyright and
may not be reproduced without author's permission)

trueSpace4's
Bones features (skeletons and deformable skin) allow you to create and animate
characters like never before possible. By now you have heard of bones and what
they do. We know that they can be used to bring inanimate objects to life, unfortunately
at the time of this writing a lot of trueSpace users find them a little intimidating.
Believe it or not, trueSpace bones are easier to use then you might think.
In
this chapter we will be looking at the mechanics involved in creating a skeleton
for your bipedal humanoid characters. We will cover:
- Building
a skeleton
- The
Build Skeleton panels
- Creating
a bone structure for bipedal humanoids
- Editing
joints
- Attaching
a skeleton to an object
- Editing
tendons
- Editing
muscles
- Adding
and removing vertices from muscle groups
Bones
and Humanoid Characters
In the Animation pre-cursor tutorial I skimmed
over the Bones panels because all the functionality built into the Bones features
wasn't needed for animating simple objects with bones. Here we will be creating
more complex skeletal structures therefore a review of the panels and tools involved
is in order. As soon as we get the panels out of the way we will look at the practical
applications of trueSpace bones.
To
animate a character with bones, you first must link several bones together with
joints. This creates a hierarchy called a skeleton. Bones (a skeletal deformation
tool) perform the same basic tasks as other deformation tools in trueSpace, they
deform a mesh's vertices, except in a controlled manner so the vertices move and
flex like skin. Joints are just a method of linking two objects together (in this
case bones) with the ability to adjust the amount of rotational freedom of the
link itself. Like everything else in life, when using bones you have to have a
good structure to build upon, so let's look at what's involved in building a bones
structure.
Building
a Skeletal Structure
There are three ways to build a skeleton in trueSpace4.
You can:
- Extract
a skeleton from an existing IK object.
- Manually
create each bone and create each joint to construct the skeleton.
- Build
the skeleton by clicking your mouse where the joints should appear.
The
Extract Skeleton from IK Object tool allows you to create a skeleton from an existing
object with an IK structure by replacing the IK linked polyhedra with bones. An
extracted skeleton retains the animation information of the original object. The
original IK object remains unchanged, but the new skeleton can then be applied
to another polyhedron by selecting the Attach Skin to Skeleton tool. When you
load any object with an IK structure, trueSpace converts the IK structure to a
bones structure for you automatically. There is something interesting about this
tool. Let's try a short experiment:
Step
1. Load up the CaliBot.scn file. (Click here to get it).
Step 2.
Click the Extract Skeleton from IK Object tool.
Step 3. Select the
Caligari robot, and drag him to your left.
This
should reveal a second bone structure[mf]an identical copy of the robot's skeleton.
As you can see, Extract Skeleton from IK Object is a nifty skeleton copy tool.
With
the Add New Bone tool you can create individual bones and use them to build a
skeleton. You can then attach the bones to each other using the Add Custom Joint
tool by clicking each of the bones.
The
third choice, the Build Skeleton tool, is the one you will most likely use to
construct your bone structures for your characters. The Build Skeleton tool makes
it possible to construct a skeleton directly in 3D space or inside an object.
You can use the
Build Skeleton tool to create a whole new skeleton from scratch, edit an existing
skeleton, or make changes to a skeleton that has been skinned. Once in Build Skeleton
mode, you can manipulate or delete existing joints, or add more joints and bones
to the skeleton. To exit the Build Skeleton mode, click the Build Skeleton tool
again.
If
a object that has had a skeleton attached is selected, clicking the Build Skeleton
tool reverts the skeletal structure to its original state when it was attached
to the skin. All the keyframes associated with the bone structure (skeleton) will
be deleted.
You
can construct your skeleton in an orthogonal or perspective view window. In the
Perspective view, if there is no object under the cursor while placing bones and
joints, the skeleton will be built in the X-Y plane parallel to the Grid. In a
orthogonal view, it is built in a plane perpendicular to the selected view[md]Front,
Left, or Top. If there is an object under the cursor, however, the skeleton is
built inside of that object.
Let's
take a closer look at the Build Skeleton tool and the panels associated with it.
The skeleton
panels are vital in the creation of a workable skeleton that can be applied to
a character. There are two panels involved, the Build Skeleton panel and the Build
Skeleton Properties panel, as shown in Figure AB.1.

Figure AB.1 - The Build Skeleton and Build Skeleton Properties panels.
The
Build Skeleton Panel
You will spend a lot of time in the Build Skeleton
panel when constructing skeletons or what I like to call bone structures. The
Build Skeleton panel consist of six buttons and three check boxes. Here is a rundown
of each.
Move
Joint
Clicking and dragging on a joint moves the individual joint. If
the Add Joint tool is active (button depressed) the newly created joint can be
immediately moved as long as you don't release the mouse button. When the Move
Joint button is activated, holding down the Ctrl key while dragging a joint moves
the branch which makes up the joint and the two bones connected to it. This has
the same effect as enabling the Move Branch option in this same panel. You will
grasp this better with a short exercise.
Step
1. Open a new scene and Switch to the Front view. Click the Build Skeleton
tool to open the Build Skeleton panel.
Step
2. Click in the lower-left corner of the workspace. Working your way up to
the upper-right corner, left-click five times.
Step
3. Deselect the Add Joint button in the Build Skeleton panel. If for some
reason the Move Joint button isn't depressed, click it now.
Step
4. Select the center joint and drag it up and down. Notice the rubber band
effect as you move the joint. Release the joint and press the Undo button.
Step
5. While pressing the Ctrl key, reselect the center joint and move it as you
did before. Notice anything different about the Bones movement? The entire branch
moves instead of just the joint and two bones attached to it.
Move
Joint is extremely handy when you want to resize a bone that is part of a branch
without affecting any of the other bones. This has the same effect on an attached
Bone and its size as enabling the Move Branch option. I find that using the Ctrl
key is easier to work with and it's nice not having to remember to disable it
when your done, just release the Ctrl key.
Add
Joint and Add Branch
Add Joint creates a new joint and adds a bone connected
to the most recently added branch of the skeleton (bone structure). Here is the
neat part: By clicking on an existing bone with the Add Joint tool active, a new
joint is created dividing the existing bone in two.
When
Add Branch is checked, a left-click with the Add Joint tool active adds an extra
joint to the bone nearest the cursor. If the nearest bone is a leaf bone the new
joint will become attached to the Leaf Bone's end. The new joint becomes the active
branch. That means if the Add Joint tool is enabled as well joints and bones will
be added from this new branch. This is interesting, let's try it out.
Step 1. Open a new
scene and Switch to the Front view. Click the Build Skeleton tool.
Step
2. The Add Joint button should be depressed as well as the Move Joint button.
Click in the lower left corner of the workspace. Working your way up to the upper
right corner left-click three times.
Step
3. Click the area between the middle joint and the first joint. A new joint
should appear splitting the bone in half. Let's try adding a branch.
Step
4. Select the Add Branch option in the Build Skeleton panel.
Step
5. Click anywhere above the bone structure in between two joints. Be sure
not to click on any of the bones. A new branch should appear attached to the center
of the closest bone where you clicked.
Normally
if the Add Branch option was disabled and you clicked outside the bone structure
a new joint would have been added in that spot with a bone leading back to the
last joint that was selected.
The
Add Joint and Move Joint functions can be used together (enabled/disabled), to
prevent moving a joint when you want to add a joint or from adding a joint when
you want to move one.
Move
Branch
When Move Branch is enabled, clicking and dragging on one joint
in a branch moves all joints from the selected joint away from the nail in tandem.
Remember, while the Move Joint tool is active, holding the Ctrl key while dragging
a joint does the same thing as the Move Branch Option without having to remember
to disable it.
Delete
Joint
In the last exercise, we added new joints to a skeleton. Let's
assume that we didn't want one of the joints in our new bone structure. This is
where the Delete Joint tool comes in. When Delete Joint is active, clicking on
a target joint deletes it. trueSpace4 then reverts to Add Joint mode. If the joint
you want to delete was created as the last operation, selecting Undo will accomplish
the same thing.
Edit
Joints Directly
The Edit Joints Directly button allows you to edit the
joint rotation and constraints directly. Clicking this tool will display the joint's
control handles. They appear as a circular object resembling the Pac-Man video
game character in the center of the joint called the joint's radial indicator,
which is used to adjust a joint's pitch, roll, and yaw. (See Figure AB.2.) In
plain English, it's a wonderful device for adjusting the resistance to rotation
and the amount of free movement (swing) the attached bones will have.

Figure AB.2 - You can interactively change the pitch, roll and yaw of a joint
via the joint's control handles.
Let's
take this opportunity to discuss rotating joints and controlling the swing of
the bones attached to the joint.
Step
1. Open a new scene, and Switch to the Front view. Click the Build Skeleton
tool.
Step
2. The Move Joint and Add Joint buttons should be depressed. Click in the
lower-left corner of the workspace. Working your way up to the upper-right corner,
left-click three times.
Step
3. Click the second joint. This makes it the active joint.
Step
4. Click the Edit Joints Directly button. The joint's radial indicator should
appear as depicted in Figure AB.2.
Step
5. Select the outer edge of the radial indicator. Drag your mouse out and
away from the joint. This controls the resistance to rotation. The larger the
value, the more resistance, making it harder to move the bones attached to this
joint.
Step
6. Select either of the two handles that run from the outer edge of the radial
indicator to its center (where a piece of pie looks like it has been cut from
it). If you drag your mouse you can define the degree of rotational freedom the
attached bones will have.
Step
7. Right-clicking the far end of either of the two control handles running
through the center of the radial indicator and dragging your mouse will rotate
the joint. If you left-click and drag this area the bone attached can be moved.
As
you can see, working with trueSpace allows a lot of freedom. Now on to two very
interesting buttons.
Build
Skeleton
Inside Skin and Link IK Object Build Skeleton Inside Skin is
a toggle button. When the Build Skeleton Inside Skin button is depressed, the
Link IK Object button is disabled. The Build Skeleton Inside Skin tool is the
default mode of building a skeleton and allows you to build the skeleton freely
by adding joints anywhere in the workspace, a different approach to what Link
IK Object does.
When
enabled, Link IK Object disables the Build Skeleton Inside Skin button. It allows
the creation of a skeleton from an object with hierarchies. To use this tool,
select the object made up of glued parts and enable the tool. Click one of the
subobjects belonging to the hierarchical object. The tool finds the two closest
objects and links them with a joint.
If
it seems as though this is a lot too absorb at first don't worry, you will have
a chance to use many of the Build Skeleton panel's tools in the upcoming exercises.
Now, let's look at the second panel.
The
Build Skeleton Properties Panel
Right-clicking the Build Skeleton tool
opens the Build Skeleton Properties panel (as well as the Build Skeleton panel).
This panel (in my opinion) is where you separate the well built skeletons from
the weak, hard-to-work-with kind. The first item on the panel is the Link With
button. This is where you choose which kind of joint to use when constructing
your skeletons. The Caligari documentation states basically this:
Link
with: Use this pop-up menu to determine the type of joint to be used by the Build
Skeleton tool. The default type is 1D Hinge. You can adjust the properties of
a joint at any time using the Edit Joints Directly tool in the Build Skeleton
panel."
That
is a generic statement that doesn't tell us much. It doesn't mention that this
is the secret to good skeletal motion. That it is the most important button in
the whole mix of Bones tools. Here is my take on this panel. Follow along with
me in Figure AB.3.
When
constructing your skeletons, keep the Build Skeleton Properties panel open. As
you construct your skeletons you will want to switch to different types of joints
at different points of the construction process. For example, take the human arm,
starting at the wrist a 2D Spherical Joint would be used because our wrists rotate
in two directions. At the elbow a 1D Hinge Joint should be used because our elbows
swing in one direction (with a limited amount of movement). Our arms swing at
the shoulder basically in two directions, so a 2D spherical Joint should be used
at the shoulder. If you were to use the default 1D Hinge Joint throughout the
skeletal build process you will find that your character becomes difficult to
pose naturally.
So,
a rule of thumb should be to keep the Build Skeleton Properties panel open during
the skeletal build process. We will discuss selecting the right joint a little
later in this chapter for now let's continue to look at the other items in the
Build Skeleton Properties panel.

Figure AB.3 - Two types of joints should be used when creating a skeleton for
a humanoid character.
Build
Vertically: This option only pertains to the Perspective view. Use this option
to build the skeleton from the ground up (or vice versa). With this item unchecked,
the bones will be placed parallel to the ground.
Hide
Leaf Bones: A joint links two bones. One or both of these bones can act as a leaf
bone. A leaf bone isn't connected to other bones. The direction the leaf bone
will face is extrapolated from the direction of the previous bone. You can hide
leaf bones during the skeletal build process by clicking Hide Leaf Bones in the
Build Skeleton Properties panel. If the leaf bones are visible, you can alter
their direction by clicking and dragging the unattached end. If you hide the leaf
bones, they will appear after exiting the Build Skeleton mode.

Figure AB.4 - The anatomy of a simple skeleton (bone structure).
Nail,
Joint, and Bone Color: These three buttons allow you to choose a color for the
three visible elements of a skeleton, the nail, joints, and bones. Click and hold
the color buttons to view a popup menu with a selection of colors to choose from.
That
just about covers the panels. As I promised, now that the panels are out of the
way we can actually construct a skeleton for a bipedal humanoid character.
Creating
a Bone Structure for Bipedal Humanoids
Let's put the skeleton panels
to work. For this next exercise we will construct a skeleton for the superhero
character we built in Chapter 4. Before you tackle this exercise please review
figure AB.4. Get familiar with the names of these basic components of a skeleton
because I will refer to them throughout this chapter.
Step 1. Load the
AniHero.scn (Get It) file located on the resource CD. You might remember this
guy from the character modeling tutorial. He was created using trueSpace metaballs.
I converted him into a solid polyhedron for this exercise.
Step
2. Right-click the Build Skeleton tool to open the Build Skeleton panel and
Build Skeleton Properties panels.
Step
3. We are going to start with the head of the character and work our way down
creating the character's spine. Can you guess what kind of joints should be used
for the character's spine? If you said 2D Spherical joints, you are correct. In
the Build Skeleton Properties panel, set the Link With option to a 2D Spherical
Joint. In the Build Skeleton panel make sure the Move Joint and Add Joint options
are enabled (depressed) as well as the Build Skeleton Inside Skin button. I like
a clean workspace free of unnecessary clutter, so click the Hide Leaf Bones option
in the Build Skeleton Properties panel.
Step
4. Starting with the character's head, click the top of the skull and click
at the neck. This will create one bone that extends from the top of the skull
to the neck. Try to keep the joins lined up vertically.
Step
5. To complete the character's spine, click the center of the chest, the center
of the abdomen, and the crotch area where the legs meet. Figure AB.5 illustrates
the locations.

Figure AB.5 - The locations of the 2D Spherical joints that make up the character's
spine.
Step
6. For the arms we will have to create two branches to create the shoulders.
In the Build Skeleton panel, click the Add Branch option. Click on the left side
of the second bone (from the top) near its center. This should add a branch to
the second bone to form the left shoulder. Click on the right side as you did
before to form the right shoulder. Click the Add Branch option in the Build Skeleton
panel to disable it.
Step
7. The joints that make up the shoulder need to be moved into place. To do
this without adding unnecessary joints, disable the Add Joint button in the Build
Skeleton panel. Click the left shoulder joint and drag it near the top of the
shoulder where the arms connect to the torso. Do the same for the right shoulder.
Enable the Add Joint button in the Build Skeleton panel.
Step
8. Up to this point, we have used 2D Spherical joints for the spine and shoulders.
For the character's elbow we need to change the type of joint from a 2D Spherical
joint to a 1D Hinge joint because elbows swing 90 degrees in one direction, any
other type of rotation would be painful. In the Build Skeleton Properties panel,
set Link With to 1D Hinge Joint.
Step
9. Starting with the arm on your left (character's right arm), click where
the elbow should be. A guess is okay. You can move the joint later if you need
to. To construct the character's left elbow (on your right) click the center of
the joint that makes up the character's left shoulder. This won't do anything
at this point. All you have done is make that joint the active joint. Unfortunately,
there is no way to tell if a joint is the active joint. Click where the character's
left elbow should be.
Step
10. For the remainder of the character's arms we will need to change the type
of joint from a 1D Hinge joint to a 2D Spherical joint because our wrist rotates
along more than one axis. In the Build Skeleton Properties panel, set Link With
to 2D Spherical Joint.
Step
11. Click the wrist area of the character's left arm (your right) remember,
that the left elbow was the last joint we added therefore it should be the active
joint. To finish the character left arm, click the end of the character's fist.
For the character's right arm, click the character's right elbow to make this
joint the active joint. Click the right wrist and the tip of the right fist. Use
Figure AB.6 as a guide.

Figure AB.6 - The location of the joints that make up the character's arms. The
character's
shoulder and wrist are 2D Spherical joints while the character's
elbow is a 1D Hinge joint.
Step
12. Creating the hips of the character will require a branch at the last bone
of the spine. In the Build Skeleton panel, click Add Branch. Click the left side
of last bone of the character's spine near its center. This will create the branch
where the thigh bone and waist will meet. Disable the Add Joint button and Add
Branch option in the Build Skeleton panel. Click the newly created joint and drag
it where the thigh and torso meet. Click and drag the last joint in the spine
and place it where the character's left thigh and torso meet.
Step
13. To create the character's knees and ankles we will need to change from
the present 2D Spherical joint to a 1D Hinge joint. In the Build Skeleton Properties
panel, set Link with to a 1D Hinge Joint. In the Build Skeleton panel, enable
the Add Joint button.
Step
14 . Click the knee, the ankle, and the bottom of the character's foot to
complete the character's left leg. Click the joint in the character's right hip
to make it the active joint. Repeat the previous steps clicking the knee, the
ankle, and the bottom of the character's right foot to complete the character's
skeleton (bone structure). Take a look at Figure AB.7 to see the finished character's
skeleton.
Step
15. Click the Object tool to close the Build Skeleton panel.

Figure AB.7 - The complete skeleton. The character's legs consist of a 2D
Spherical joint at the hips and a three 1D Hinge joints for the knees and ankles.
Always
Test Your Work
That covers creating the basic skeleton but it isn't ready
to be attached to an object just yet. We have to test our bone structure before
attaching it to a character. Save the scene locally on your drive and call it
HeroBones.scn. During the next few steps if anything flakes out on you simply
reload the scene and start over. In the next discussion I will refer to parts
of the skeleton as belonging to the character. What I am referring to is the area
of the character mesh where a joint or bone is located. Because we haven't attached
the skeleton to the character yet the two are still separate individual objects.
In
the animation pre-cursor tutorial we briefly discussed bones and we practiced
using the nail. If you are familiar with using the nail go ahead and skip this
paragraph. For those of you that may have skipped ahead, let me recap. The nail
is used to anchor a bone so you can manipulate the other portions of the bone
structure. You can move the nail by dragging it onto a different bone.
When creating characters
that will be later animated with bones it is best to model the character in the
"neutral pose" prior to building and attaching bone structures to your character's.
This makes the attaching skin to bones easier and eliminates vertices from different
parts of body becoming attached to a limb. The neutral pose is depicted in Figure
AB.7.
What
I would like you to do now is drag the nail to the character's waist. With the
skeleton's center of gravity anchored click the left or right fist and manipulate
the skeleton. Bones uses inverse kinematics so moving the character's fist should
move the forearm which moves the bicep, which pulls at the character's shoulder's
making him bend at the waist. When you're done fooling around, click Undo to restore
the skeleton to its original pose.
The
reason I had you do this is to get a feel for how the joints are orientated. By
manipulating the skeleton before attaching it to an object we can check the orientation
of the joints and make any adjustments necessary. This is good practice and can
save you some headaches later.
Reset
the skeleton to it's original position (pose) by clicking Undo. Let's take a look
at the joints of our bone structure and how we can manage their placement, orientation,
resistance to rotation and the freedom of movement of the bones attached.
Editing
Joints
You can use the Build Skeleton tool to edit a joint's degrees
of rotational freedom by double-clicking on any joint to display its control handles.
You can use the Pitch, Roll, and Yaw indicators to change the degree of freedom
for the selected joint. To adjust the Min/Max values for the selected joint, click
directly on the radial indicator and swing the joint around to set Min/Max to
the new values. When you release the mouse button, the branch will return to its
previous position. You can display the properties of any other joint simply by
clicking on the desired joint. A second double-click will exit Joint Edit mode.
Editing Joints
You can use the Build Skeleton tool to edit a joint's degrees of rotational freedom
by double-clicking on any joint to display its control handles. You can use the
Pitch, Roll, and Yaw indicators to change the degree of freedom for the selected
joint. To adjust the Min/Max values for the selected joint, click directly on
the radial indicator and swing the joint around to set Min/Max to the new values.
When you release the mouse button, the branch will return to its previous position.
You can display the properties of any other joint simply by clicking on the desired
joint. A second double-click will exit Joint Edit mode.
Step 1. Switch to
the Top view and zoom in on the character's right arm keeping the shoulder to
the fist within the view window.
Step
2. Right-click the Build Skeleton tool to open the Skeleton panels. In the
Build Skeleton panel, click the Edit Joints Directly button. Click the elbow joint
to reveal the joints control handles. You may notice that the elbow joint doesn't
seem to have a radial indicator to adjust the joint's pitch, roll, and yaw. It's
there, but it's facing the wrong way. To correct this problem, right-click the
tip of the red control handle and drag your mouse until the joint rotates 90 degrees
revealing the radial indicator.
Step
3. Select the Object tool to complete the operation. Now for the test, if
we positioned the elbow joint correctly the forearm should swing vertically in
the Top view. Open a smaller window and set it to the Front view. Position the
view so that the whole character is visible. Click and drag the nail from its
current position to the bone that runs through the character's right bicep. If
you attempt to do this and the eye of the camera moves, select the Object Move
tool then try it again. Close the smaller view window when done.
Step 4. In the large
view window, select the bone in the character's right fist and drag your mouse
down towards the bottom of the screen. The bones that make up the forearm should
move freely. Click Undo and drag the fist towards the top of the screen. Ouch!
That isn't natural is it? Our arms do not bend in that direction. Let's fix it
and while we are at it let's adjust the amount of resistance the forearm has to
movement.
Step
5. Click Undo to reset the forearm to its original position. Right-click the
Build Skeleton button to open the Skeleton panels if they aren't already open.
In the Build Skeleton panel, click the Edit Joints Directly button. Click the
elbow joint to reveal the joint's control handles and radial indicator.
Step
6. The radial indicator at the center of the joint has two functions. The
first is it can be used to adjust the amount of resistance the attached bones
will have to rotation. You change its value by clicking and dragging on its outer
surface. The radial indicator control handles will change color when under your
cursor control. A larger value (larger size) creates more resistance and therefore
it takes more force to rotate the forearm. Go ahead and increase its size, not
too much. You want to be able to swing the character's arms. The second function
the radial indicators provides is it can be used to limit the degree of movement.
In our case, we want to limit the forearm from bending backwards. To adjust the
amount of freedom the forearm has to swing, click and drag either of the two control
handles that connect the outer surface of the radial indicator and its center.
In our case we are concerned with the top one. Click and drag it, you will notice
that the forearm follows the control handle. This is what's so wonderful about
trueSpace, its feedback is above par. Drag the control handle until the forearm
is parallel to the character's arm.
Step
7. Select the Object tool to close all the panels. Click and drag the character's
right fist up towards the top of the screen. It won't budge and unlike you can
with the human elbow, you can't force it. Click and drag the fist down towards
the bottom of the screen. The arm bends but with a little more resistance than
before. If you are having a hard time bending the arm at the elbow it is probably
because you set the elbow joint's resistance a bit too high in the previous step.
You will have to go back and edit the joint directly and decrease the joints resistance
to rotation.
Not
all the joints will be out of whack but you should check each to insure that the
bones will react as expected. If it helps delete or move the character mesh out
of the way so you can see the joints better. Remember to use the nail to limit
movement to specific areas while testing your joints.
You do not have to use a
combination of 1D Hinge and 2D Spherical joints when constructing skeletons for
your characters. You can use 2D Spherical joints for every joint in your character,
but you will have to set each of the joint's degree of freedom accordingly via
its radial indicator. The orientation of the joints are totally dependent on the
type of character you are working with.
When
you have the skeleton to your liking, select the skeleton and click the Attach
Skin to Skeleton tool. Your mouse cursor will change to a glue bottle. Select
the character's mesh. After a few seconds the character can be posed using trueSpace
bones. Select the Object tool to end the process.
As
you can see there are a few details involved in setting up a workable skeleton
in trueSpace. After you have built a few you should be able to create a skeleton
in just a few minutes.
You
can adjust any of the joints of a skeleton after it has been attached to an object
in the same manner as performed above by right-clicking the Build Skeleton tool.
We have created
a bone structure and edited the joints of the bone structure, now let's look at
what's involved with attaching an object's skin to a skeleton. When we are done
we will get into trueSpace's tendon and muscles features.
Attaching
Skin (An Object's Mesh) to a Skeleal Structure
The Attach Skin to Skeleton
tool makes it possible to attach an object (skin) to a skeleton to aid in animating
your characters. trueSpace automatically assigns parts of the skin surface to
the skeleton to form muscles and tendons. You can later edit the degree of influence
a muscle or tendon has on a particular bone if needed. You can attach a skeleton
to a single object or to a group of objects that are glued together. You can also
attach a skeleton to several objects at once which can overlap each other. Portions
of the skin that extend beyond a leaf bone are deformed along with the surface
that is attached to this bone.
The
skeleton does not have to be completely contained within an object. Bones can
extend outside the object they are attached to.
The
skin surrounding a bone between two joints forms one muscle. This muscle can be
the contractor with respect to either of the two joints, but it cannot be the
contractor for both joints simultaneously. We will discuss the contractor muscle
further shortly.
It
may be a little confusing at first but the muscle performing the bulge is considered
the contractor muscle. It is being contracted, to shrink by drawing together.
On
a branch bone (a bone that has more than two joints linked to it), the portion
of the skin that encloses the bone is divided into as many muscles as there are
joints. Each of these muscles can be a contractor for a corresponding joint.
The
Attach Skin to Skeleton tool also allows you to separate the skin from the skeleton
so that you may change the position, rotation, or size of the skeleton within
the skin. When the Attach Skin to Object tool is active, you can click and drag
the selected object to move it into position. If the skeleton is dragged completely
away from the skin, the skeleton will become detached, allowing you to edit the
skin (object) without interference from the bone structure. Here's a step-by-step
look at some common Attach Skin to Skeleton procedures.
To
attach a skeleton to an object:
Step
1. Select the skeleton.
Step
2. Click the Attach Skin to Skeleton tool. The cursor will turn into a glue
bottle.
Step
3. Click the target object (skin).
Step
4. Click the Attach Skin to Skeleton tool again, or click the Object tool
to exit the Attach Skin to Skeleton tool.
To
detach a skeleton from its skin:
Step
1. Select the object that has been assigned a bone structure.
Step
2. Click the Attach Skin to Skeleton tool.
Step 3. Hold down the
Ctrl key and click, or you can hold the Ctrl key and drag the skin outside the
skeleton.
Step 4. Click the Attach Skin to Skeleton tool, or click
the Object tool to exit the tool.
To
re-orient or resize the skin:
Step
1. Select the object that has been assigned a bone structure.
Step
2. Click the Attach Skin to Skeleton tool and select Object Scale, Object
Move, or Object Rotate. You can now move, rotate, or scale the skin as you would
any other object.
Step 3. Click the Attach Skin to Skeleton tool, or
click the Object tool to exit the tool.
Once
the skin has been attached to the skeleton, you can begin to deform the object's
mesh (skin) by clicking and dragging on any part of the skin surface. You can
also place the nail anywhere on the skin to anchor that portion of the object.
We will revisit
bones again in the next tutorial "Character Animation" when we animate Frankie
our little skate boarding terror but first we must learn how tendons and muscles
are used.
Once
you have created a bone structure for your character you can edit the degree of
muscular contraction of your character's limbs. trueSpace4 has a full compliment
of tools that allow you to visually edit the muscles and tendons of your characters.
(See Figure AB.8.)

Figure AB.8 - You can add impressive muscle bulges to your character's with the
Muscle and Tendon tools.
Editing
Tendons
The Edit Tendons tool allows you to change the Tendon Rate of
the selected joint. When clicked, the bones structure will revert (temporarily)
to its original position (pose) when the skin was first attached. You will also
see two planes that define the selected limits of influence of the selected tendon.
Click on the control handle below the selected tendon and drag right to increase
the Tendon Rate, drag left to adjusts the proportions between the tendon and the
muscle. To select a different tendon click on a different joint.
The
Skinning Panel
Right-clicking on the Attach Skin to Skeleton tool or
the Edit Tendons tool opens the Skinning panel which is used to control how muscles
and tendons are assigned to the skin. Let's review this panel and each of its
options.
Tendon
Rate: Adjusts the proportions between the tendon and the muscle. Higher values
increase the influence of the tendon, the area between the two planes depicted
in Figure AB.AB. The arm at the top of Figure AB.9 has a tendon rate of 0.07,
the one below it has a Tendon Rate of 0.20. Notice how the planes visually define
the area of the tendon. The Tendon Rate can also be adjusted by clicking on the
control handles that appears just below the selected tendon. The acceptable range
is from 0.01 to 0.9AB. The default value is 0.20.

Figure
AB.9 - A model of a character's left arm. Once the bone structure was assigned
to the object,
clicking the Edit Tendons tool opens the Skinning panel. Clicking
the elbow joint displays
the muscle, contractor muscle and their influence
on the character's mesh.
Beyond
Last Bone: When checked, any area of the skin that is beyond a leaf bone is attached
to the selected bone. Otherwise, that portion of the skin will remain immobile.
By default this is selected.
Before
Nail: When enabled, any area of the skin that does not enclose any bone is attached
to the bone that has the nail attached. By default this is selected.
Contractor:
Switches which muscle will act as the contractor. On either side of the word Contractor
are two check boxes, if you wish to swap the muscle and contractor muscle click
the opposite checkbox.
Realtime
Update: This option is primarily used to disable the visual feedback of Tendon
Rate. With this option disabled, only the planes representing the tendon's edges
will be updated on screen. The update to the skin, tendon and neighboring muscles
will be performed after the mouse button is released. This is checked by default.
Tendon,
Muscle, and Contractor Color: Provides a choice of six colors for identifying
the vertices of the tendon. The default color is red.
Now
that we have looked at trueSpace tendons let's look at trueSpace muscles.
Editing
Muscles
To edit the muscles of your object, left-click the Edit Muscles
tool. This will place trueSpace4 in Muscle Edit mode and will open the Muscle
Properties panel. When you first use the Edit Muscles tool, the first muscle from
the nail will be selected, otherwise, the vertices of the last bone you edited
will become highlighted. You can select another muscle by clicking near the desired
bone.
The
vertices of the muscle contractor will become highlighted and a small control
handle will appear above the muscle. This control handle may or may not be visible
depending on the object you are working with. So, in the up coming exercise we
will use the Muscle Properties panel to make any adjustments, but for the sake
of clarity let's go over the Muscle Properties panel, the control handle, and
its hot spots.
The
Muscle Properties Control Handles and Panel
Left-clicking the Edit Muscle
tool opens the Muscle Properties panel and places trueSpace in Edit Muscle mode.
A control handle will appear above or below the selected area, either a tendon,
muscle or muscle contractor.
The
center point: Adjusts the volume of the muscle bulge (strength). A numeric value
can be manually entered in the Strength field located in the Muscle Properties
panel. To use the control handle, click and drag your mouse left to extend the
bulge, drag right to decrease the bulge.
When
adjusting muscle settings you should have the muscle you will be working with
contracted. This way you can see some visual feedback as you make your adjustments.
The
handles parallel to the bone: Adjusts the strength along the bone. (I prefer to
call this the muscle tone setting, I will show you what I mean in a second.) You
can enter a numeric value in the Length field located in the Muscle Properties
panel. To use the control handle, click and drag your mouse right to widen the
muscle bulge from the muscle's center outward along the bone, drag left to reduce
this value. Let's look at an example of this effect.
The
handles parallel to the bone: Adjusts the strength along the bone. (I prefer to
call this the muscle tone setting, I will show you what I mean in a second.) You
can enter a numeric value in the Length field located in the Muscle Properties
panel. To use the control handle, click and drag your mouse right to widen the
muscle bulge from the muscle's center outward along the bone, drag left to reduce
this value. Let's look at an example of this effect.

Figure AB.10 - Adjusting the muscles length along the bone separates the muscles
vertices around its center. I like to refer to this setting as the muscle tone
setting. Notice how the muscle flattens out with a higher setting.
Handle
perpendicular to the bone: Adjusts the width of the muscle bulge. You can enter
a numeric value in the Width field located in the Muscle Properties panel. Click
and drag your mouse to the right to increase the muscle's bulk perpendicular to
the bone, drag left to make the muscle less bulky. The difference can be seen
in Figure AB.11.

Figure AB.11 - Increasing the width of the muscle makes the muscle look more bulky
and more impressive.
The
handle extending toward the bone: Adjusts the falloff of the muscles bulge. A
low falloff value causes wider muscle bulging. A large value creates a sharper
bulge. Right clicking on the control handle turns the muscle into a bi-directional
flexor/extensor type. A blue and red line indicating the direction of the contraction
will appear running through the muscle. Dragging the line on either the red or
blue side will change the direction of muscle flex.
While
in this mode, the flexor and extensor get their own separate set of the parameters
described above, allowing you to specify independent values for each. Only one
of them can be contracted at a time, and the flexor/extensor line will adjust
the parameters of the contracted part of the muscle. To reset the muscle to omni-directional
right-click on the control handle again. You can also set this with a checkbox
in the Muscle Properties panel. The Flexor/Extensor checkbox allows switching
between all-directional and bi-directional contraction of the muscle. Figure AB.12
illustrates this setting.

Figure AB.12 - In this image the results of setting the Flexor/Extensor option
are visible.
As you can see, with this option unchecked the muscle bulges.
Sharpness:
This is related to the joining tendon. Clicking on or near a joint will select
a tendon. A small control handle appears above or below the tendon. Use this setting
to adjust the sharpening of the tendon when bent. Figure AB.13 illustrates this.

Figure AB.13 - In this image the tendon sharpness setting is visible around the
character's elbow.
Muscle
Exercise
To get your characters muscles to bulge realistically you must
learn how the relationships between muscles, tendons, and muscle contractors affect
the objects attached to a skeleton. In the above discussion we covered a lot of
ground and through illustrations saw how the muscle and tendon settings affect
the muscle bulge. It's now time to put this information to some practical use.
For our next exercise we will add a bone structure to a character's arm and adjust
the tendon and muscle settings. When we are done you will be able to flex the
character's arm and see its muscles bulge. Let's get started.
Step 1.
Open the file names HeroArm.scn - Click
here to download it. The arm used in the previous illustrations
will appear in the Front view window.
Step
2. Click the Build Skeleton tool, this will open the Skeleton panels.
Step
3. For this exercise we will only use 1D Hinge joints for the arm. Near the
edge of the fist click once. Continuing down the arm to the shoulder click the
center of the fist, the wrist, near the elbow area, and the center of the shoulder
area. This will create the basic skeleton we will need to flex the arm realistically.
Use Figure AB.14 as a guide.

Figure
AB.14 - The five areas of the arm you should click to create the arm's bone structure.
Step 4. Click the
Attach Skin to Skeleton tool. Your cursor will change to a glue bottle, click
the arm mesh. A dialog box will appear warning you that you are about to delete
a metaball structure, click yes to convert the arm (created with metaballs) to
a polyhedron.
Step
5. Click the Object tool to exit the Attach Skin to Skeleton tool. The skeleton
and mesh should be both appear to be selected.
Step
6. Click the nail and drag it to the bone in the bicep. Select tip of the
leaf bone sticking out of the fist and drag it to the shoulder in an arch over
the arm. The arm doesn't bend realistically and the bicep muscle doesn't bulge
like I illustrated earlier because only the bone structure and joints have been
defined so far. We need to tell trueSpace what the joints limitations as well
as how we want the muscle and tendons to be defined.
Step
7. Click the Build Skeleton tool to open the Build Skeleton panel. Make sure
the Add Joint button is disabled. Double-click the elbow joint to enter Joint
Edit mode. The joint's radial indicator will appear.
Step
8. Select the top control handle that runs from the center of the radial indicator
to the radial indicator's outer surface and drag it until the forearm points straight
up. Release your mouse, the forearm will revert back to its original position.
Click and drag the lower control handle until the forearm is horizontal, similar
to its present position. These two actions will limit the forearm's swing as we
manipulate it later during this exercise.
Step
9. Click the wrist joint and perform the same operations as you did for the
elbow joint. Set the wrist joint's rotational limits close to your own. Make a
fist and study how far it bends, do the same for the character's arm. When you're
satisfied with the wrist joint click the Object tool to exit Edit Joints mode.
Click and drag the tip of the leaf bone exiting the fist as you did before. It
should bend more realistically now that you have defined the joints rotational
limits. When you're done click Undo to reset the arm to its original pose.
Step
10. Click the Edit Tendons tool. The vertices that define the contractor muscle
and the muscle will change color. You can change the color of each by right-clicking
the Edit Joint tool. Click and drag the control handle below the elbow joint to
your left until the two planes move in close to the elbow joint as depicted in
the top half of Figure AB.15.

Figure AB.15 - Using the Edit Tendons tool make the arm bend at the elbow more
naturally.
Step
11. Click the wrist joint and draw the two planes in towards the joint as you
did with the elbow joint. Click the Object tool. Click and drag the leaf bone
(exiting the fist) left until the forearm won't move any more.
Step
12. Click the Edit Tendons tool (don't panic, the arm will be temporarily straightened
during this operation) and then right-click it to open the Skinning panel. In
the Tendon Rate field enter 0.06. Close the Skinning panel.
Step
13. Left-click the Edit Muscle button to open the Muscle Properties panel. Click
on the center of the bone running through the bicep. Drag the center of the bone
up to the shoulder near the shoulder joint. This will provide us with only one
set of vertices to worry about.
Step
14. In the Muscle Properties panel enter 0.1 in the Strength field, 0.1 in the
Length field, 0.2 in the Width field. Use these setting as a starting point when
working with muscles. Click the Object tool to close all the panels.
Step
15. Click and drag the tip of the leaf bone that exits the fist left and right.
The character's bicep muscle should flex impressively.
For those of you
who like to see how things work for yourselves you will find the finished
character's arm on the resource CD, complete with bone structure, tendon
settings and muscular bulges. The filename is LeftArm.scn.
Click here to download
Adding
and Removing Vertices to a Muscle
You now know that the Attach Skin to
Skeleton tool automatically assigns vertices to bones to make the muscles of your
characters. However, there is no guarantee that the vertices assigned will work
with your character.
You
can use the Muscle Properties panel to add or remove vertices using either the
Point, Lasso, or Rectangle selection tools. These work identically as the standard
Lasso and Rectangle selection tools. To add vertices to the selected muscle, use
either of the Point, Lasso, or Rectangle selection tools, click the sphere with
the plus sign and highlight the desired vertices. To remove vertices from a selected
muscle, use either the Point, Lasso, or Rectangle selection tools and click the
sphere with the minus sign. The vertices removed from the group will be automatically
reassigned to the nearest adjoining tendon.
When
you're done selecting vertices or wish to select another bone disable the selection
tool.
In Summary
Well we created a skeleton, edited its joints, muscles, and tendons,
and managed to flex a little muscle. In the next tutorial "Character Animation"
we will look at what's involved in animating a character with bones, the things
you should consider before getting started, and how to use saved skeletal animations
on other characters you create.
Frankly,
I think Caligari has given us a wonderfully powerful tool set for posing our characters.
Now it's time to turn these poses into animations.
Frank A. Rivera is the author of "Inside
trueSpace 4" that is in stores now. The above tutorial was pulled out of chapter
9 of "Inside trueSpace 4". If you enjoyed this tutorial, please consider purchasing
"Inside trueSpace 4" where you'll get many more detailed tutorials and techniques
for trueSpace 4. You can visit Frank A. Rivera's Web site by clicking
here
Return
to Animation Artist Magazine Home Page