Click to go Home  
Render times
User Profiles
Macros / Scripts
Materials / VSL
User images
Image Contest
Realsoft images
VRgrafix images
By Ted Galvin

Mr Sock takes a walk

Mr Sock Takes a Walk: a tutorial using Realsoft3D

   Part 1: Character Set-up
By Thomas Dow - 05/12/01

Character animation with Realsoft3D works very well, but there are certain rules and procedures that should be observed in order to do it successfully. In this tutorial I will show how to create a bipedal character skeleton and map it to a modeled figure. In the second part, I will show how to create a simple walk cycle.

The purpose of part one will be to demonstrate some successful skeleton building techniques and to make the user aware of some of the pitfalls and limitations of the skeleton system. The purpose of part two will be to demonstrate some elementary animation principles and to show how to use the choreography editor.

Modelling for Animation
For symmetrical figures like human beings, it is easier to model half of the figure, then duplicate, mirror, and stitch the halves together. Create your model in a neutral pose with all the limbs spaced well apart. This will ensure that the skeleton mapping volumes do not overlap onto areas where they are not wanted. Try also to make the pose as natural as possible. In this figure, for instance, I have the palms facing downwards. Since that hand position is the midpoint between the hand's extremes (prone and supine), it minimizes the amount of twisting on the figure when it is mapped to a skeleton.
The mesh should have enough resolution in order to deform properly when mapped to the skeleton. In this image the foot does not have the proper geometry to bend at the toe.
When a skeleton is mapped to the mesh, it is easy to see the effect of insufficient resolution.
Here, additional vertices have been added at the bend point of the toe. The vertices at the bottom of the foot have a greater point weight, those at the top have less. This makes the top of the foot more compressible than the bottom. Point weight can be adjusted (using alt+LMB on the point) after the skeleton has been mapped.
Rigging the Character
In this section I will outline some of the peculiarities of Realsoft's skeleton system. It is essential to follow the skeleton construction rules if you want to avoid frustrating problems further on. Here is what you need to know about skeletons:
  1. Hierarchical skeletons always follow a tree-like propagation pattern. The parent skeleton can have one or more root joints from which sub skeletons branch off.

  2. Skeletons always branch off the main tree from head to tail. Always in that order. In other words, you should not attach tails to tails or heads to heads. Only the head of a sub skeleton should be attached to the parent, and then only to a tail or middle joint of the parent. This ensures proper IK inheritance.

  3. Attached child joints always inherit the transformations of the parent joints to which they are attached. This is a key concept in skeleton construction.

I will illustrate each of these concepts visually, of course.
Here is a properly constructed bipedal hierarchical skeleton. Notice how there are hip and shoulder skeletons, though it might not seem necessary to build them. Also notice that the skeleton has a tail. The hip and shoulder skeletons are needed in order to properly "bend" the directionality of the joint angles from the upward thrust of the spine towards the downward thrust of the arms and legs. More on that later.
This is a view of the tail from above. The tail is the root of the skeleton. It provides the initial direction to the skeleton and gives us a convenient grab point for moving the entire figure. Never attach sub skeletons to the initial joint, only to joint 2 and below.
It is clear to see how the skeleton has basically a tree-like structure, even though it is bent into humanoid form.
Now lets take an unstructured approach to building a simple skeleton, to illustrate what can go wrong. First, create a spine, then two legs as shown with the head (first joint) of the spine at the bottom, and the head of the legs at the top. In the select window drag the two legs into the spine object, making the spine the "parent" and the two legs "children".
Select the two legs and hit "Attach" in the control bar. This ensures that inverse kinematics propagate upward from the legs to the spine. Take a close look at the legs to see what has just happened. The top joint has become "twisted" as a result of an attachment that goes against the "flow" of the hierarchy.
Let's take a closer look at Joint0 (the head joint) from edit mode. Here it is before the leg is attached.

And here is the leg after it is attached. It is apparent from the constraint handles that joint0 has been rotated. In fact it has been given a new set of coordinates which will allow it to match the joint of the parent skeleton to which it is attached, in this case, the head. In the process, the heading has been moved from 3 to 147 in order to preserve the position of the skeleton.

Open the "spec" tab of the Property Window and you can see the change. The problem now is that the constraints have changed. In order to get the constraints back to where they ought to be, both min and max heading have to be increased. For the min this is no problem, but for the max the heading will have to be increased beyond 180. The max constraint is user-definable (hilight the 180 and enter a new max), but you run into problems when you actually try to move the heading this high. Set the max heading to a point beyond 180, then interactively move one of the joints towards the max constraint. The joint will snap back to its minimum once it crosses the 180 threshold. Even if you move the joint beyond 180 using the joint heading slider, it will snap back during animation playback.

So the lesson, after all that, is to KEEP ALL JOINT CONSTRAINTS BETWEEN 180 and -180. I believe that the "tree structure" approach which I explained above is the best way to accomplish this. It requires that the artist use some tricks and workarounds, and above all to be aware of the flow of the skeleton hierarchy. Let's start by building a proper hip. Start with two five joint skeletons: one for the spine and one for the left leg. Remember to start your spine with a "tail handle". In the Select Window label the spine "Spine" and the left leg "Left_Leg".

Move the leg over to the left side of the spine. Now zoom in on the hip area. Draw a new skeleton starting at the second joint of the spine and ending at the first joint of the leg. The new skeleton should have three bones: the first one at 45 degrees horizontal relative to the first bone of the spine, the second one 90 degrees horizontal relative to the first bone, and the last one 90 degrees vertical relative to the second bone. The effect will be to nudge the hierarchy's directional flow from the horizontal spine joint to the vertical leg joint.

With a 3 joint intermediate skeleton like this it is possible to connect just about any two skeletons and have an animatable hierarchy that does not break the 180 rule. I find that it is easier to build skeletons by first drawing the complete skeletons and then moving the joints into place. To do this, open the "spec / skeleton" tab of your new skeleton. Change the "Default Joint Action" from "Inverse Kinematics" to "Move joints". It is now easy to position the joints without having to worry about kinematic effects. When finished, be sure to reset the default joint action.

Name the new skeleton "Left_Hip" and drag it under the "Spine" object. Drag "Left_Leg" under "Left_Hip" so that there is a parent-child hierarchy from spine to hip to leg. Select "Left_Hip" and click "Attach" in the Control Bar. You will probably notice some twisting in the hip skeleton. This is OK. Select "Left_Hip", turn on "Move Joints" in the Property Window, and untwist the skeleton. Use the red control dot in the center of the bone to perform the un-twisting, then move the joints back into place.
Select the leg and attach it to the hip (using the "attach" button). There may be twisting in the leg skeleton. If so, untwist the leg using the same procedure as with the hip. Notice how with the attached hierarchy the plane of the head joint has moved to reflect the heading, pitch and bearing of the parent joint.
A Skeleton for Mr. Sock
So now that the principles of skeleton construction are clear, let's build a new skeleton for an existing subdivision surface character. For the mesh I've created a body and attached dear old Mr. Sock as its head. Create 3 new skeletons: a 5 joint spine, a 5 joint leg, and a 3 joint neck/head. Name the spine "Spine", the leg "Leg_L", and the arm "Arm_L".
The spine should have a horizontal "handle", then three bones. A minimum of three is needed in order to give the spine a naturalistic compression when it is animated.
The leg should have joints at the hip, knee, heel and toe (middle of foot), as well as a terminating joint. Be sure to move the mouse throughout the range of the leg in order to create the constraints. You can either do this while constructing or afterwards, using "Move Joints" as your default joint action (Property Window, Spec tab).
The neck/head skeleton has an extra joint in the middle of the head, connecting to an angled bone. There are two reasons for this: first, it allows for an additional control point which makes it easier to animate head turns, and second, it will hopefully fill enough space within the head so that the mapping volumes do not become overwhelmingly huge. If there were only one skeleton controlling the neck and head the mapping volume would have to be large enough to encompass the head. On the neck portion of the skeleton this would make it influence a large part of the shoulders, which we do not want.
Switch to the front view. Select the leg and set the "Default Joint Action" to "Move Joints". Move the individual points so that they line up with the leg, while constraining the motion to the X-axis (hold down the "x" key). Then return "Default Joint Action" to "Inverse Kinematics".
Still in front view, create a new skeleton for the arm with joints at the shoulder, elbow, wrist, knuckle and end. Switch to side view and move the joints into place, as with the leg.
Create a connecting hip joint as described in the last section. Name it "Hip_L".
Create a similar connecting skeleton from joint3 of the spine to the base of the arm. This skeleton serves the same purpose as the hip skeleton, but only two bones are needed. Name this skeleton "Shldr_L".
In the Select Window, drag the head, shoulder, and hip under the spine. Then drag the arm under the shoulder and the leg under the hip.
Select the head, shoulder and hip, then hit the "Attach" button. Untwist any bones which might have become twisted in the attachment process.
Select the arm and leg and hit "Attach". You will notice that the blue constraint arcs of the arm and leg joints do not line up with the world coordinates (the XYZ axis, or front and side views). If left in this state, when you animate the figure you will have to move the arm along two local axes in order to get a front to back swing. This will end up complicating your animation unnecessarily, especially when it comes to editing the animation curves. Better to set things up now so that animation is easier later on. To make the local axes of the arm and leg correspond to the world coordinates, we need to align the constraint axes.
Step one in aligning the arm axes is to select the shoulder. Since Joint0 of the arm inherits the alignment of the tail joint of the shoulder, we need to rotate the tail joint of the shoulder. This is done by moving the red dot in the middle of the end bone in the shoulder skeleton. That red dot is called the banking control. Make sure you are in front or back view when you do this, with perspective turned off. Once Joint0 of the arm is aligned, select the arm and align the remaining joints by using the banking control of the preceding bone. Of course this will make the skeleton's position become misaligned from the mesh, so once the joints are aligned with the world axis, set "Move Joints" as the default joint action and move the joints back into place. Repeat this process with the leg.
Select the spine and hit "DupMir". Delete the second head skeleton that is created and rename the new skeletons Shldr_R, Arm_R, Hip_R, and Leg_R. Select the spine and visually center the skeleton over the mesh. Select the head, arms and legs individually and center the coordinate handles over Joint0, the head joint, of each skeleton using the move tool, "target: handles".
Mapping the Skeleton to the Mesh
Now let's prepare the mapping volumes. The first thing to do is to take another look at the mesh. Select the mesh, and in the Property Window / Spec tab, under "rendering", change "type" to "Polygonal" A subdivision mesh is actually an interpolated polygonal mesh. This means that skeleton mapping will affect the polygon vertices, which generally lie outside the boundary of the subdivided mesh itself. For accurate mapping it is necessary to work from the un-subdivided polygon shape.
Select the mesh, and in the Property Window / Wire tab set "Forced Visibility" to around "0.3". This will allow you to see the model more easily with mapping volumes in place using OpenGL. Select each skeleton and turn on "Map Volume". Use "Adj. Radius" to increase the mapping volume until it surrounds the mesh. On this model it becomes apparent that there is a mapping problem around the neck area. Because the neck skeleton mapping volume overlaps onto the shoulder it will cause the shoulders to move awkwardly whenever the head is moved. I had hoped that the extra bone in the head would have prevented this. Apparently not.
The solution is to add two new skeletons (mirrored) attached to the tail joint of the head skeleton. Label these "skull_L" and "skull_R". Select the head joint of each skeleton, the part that attaches to the tail of the head, and select the "tail" option in the control bar. The purpose of this strange procedure, calling a head a tail, is to prevent IK propagation along the new skull skeletons. If the skeletons were not made rigid like this the head would squash and deform unpleasantly.
With the new skull in place, you can now decrease the mapping volume of the head skeleton to get it clear of the shoulders. Increase the mapping volume of the skull until it encompasses the rest of the head.

Turn the mapping volumes back on for all skeletons and adjust each radius until the mesh is surrounded. It might be necessary to move the skeleton joints with mapping volumes on or, as a last resort, adjust your mesh vertices. it is absolutely necessary, though, to get every last vertex inside the map volume, or else the figure cannot be animated.

Finally, select all the skeletons together and check the spec tab of the Property Window. If "default joint Action" shows up as "Inverse Kinematics" in red letters, or as anything other than "Inverse Kinematics", then re-select "Inverse Kinematics" from the pull-down menu. This is very easy to overlook. Do the same with the "Map Volume" option. Each skeleton in your hierarchy must have "Map Volume" selected, otherwise Realsoft will not properly map the mesh to the skeleton. On my system Realsoft crashed when this happened.

And now for the moment of truth. Select your mesh, then the spine. Go to "Lattice Mapping" in the Tool Bar and hit "Multi Map", then "Accept". The mesh should now be mapped to the skeleton. Select the skeletons and turn off the map volumes. Give a little tug on the spine. If the mesh moves without distorting, you have a fully posable, animatable character!

One topic I have not covered is joint constraints. As you pose your character, you may notice that limbs begin to twist if they are moved too far. This is a result of the limb hitting a joint constraint. You may want to open up the constraint and expand the range of motion either by moving it in the View or the Property Window. Another useful feature are joint anchors. Anchoring a joint allows you to move lower joints more easily. Both anchors and constraints can be manipulated without having to re-map the skeleton.


In the next section, I will show how to animate this character using the choreography features of Realsoft 3D.

Get the R3D file for part 1 of this tutorial here.


The Real3D animation tutorials by Rob Dollase and Dave Corcoran provided some excellent clues about the skeleton system of Realsoft V4. While you are there, check out the Real3D masterwork: Spike's Saga.

I hope Hellmut Tümmler will forgive me for using Mr. Sock

AUTHOR: Tom Dow - email:

Page updated on Tuesday, 25 February, 2003 . For feedback / model submissions or articles - please email us.
Site proudly sponsored by VR.grafix
Goto Sponsors Site (VRgrafix)