The character setup outlined below delivers a simplistic character "rig" geared towards run time performance first and control to the animator second. The limitations of the engine dictate the structure of the setup and therefore the functionality intended for the animator must be worked around these restrictions.
Basic Setup Workflow:
The generic workflow for getting a real-time character ready for animation is as follows:
Model character > Create skeleton > Skin model > Edit deformation > Texture > Create controls for skeleton
Modeling Considerations:
First, let¡¯s talk about modeling the character. The position the model should have before creating the skeleton is the "default modeling pose". This is the commonly seen "arms out feet shoulder width apart" pose.

One of the worst areas to work with when editing deformation is the shoulder (specifically the underarm area where the geometry is "compressed"). By modeling the arms half way down we take out some of the tedious weight editing while still retaining the spatial distance of joints needed during skinning.
Texturing Considerations:
The more traditional workflow (especially for NURBS characters) has the texturing occur before any setup begins. The reason is that during editing the deformation of a polygonal character some edges might need to be flipped in order to achieve the proper "look." This adds to the history of the character which for many engines is undesirable. The only history on the geometry itself should be the clusters from skinning.
So, once editing the deformation is finished duplicate the model and texture that. Once textured (again get rid of the history of all your projections) copy the skin weights over from the initial model to the textured model.
Creating the Skeleton:
Our first encounter with balancing the functionality of our setup with the restrictions of the run time starts with creating the skeleton. How many joints (DOF) can the engine take for each character? Can you include a toe joint or another forearm joint for the wrist rotation? Do you use joints for facial animation or will it be through some vertex morphing scheme? Does the skeleton have to be scalable so it can be applied to all characters regardless of body proportion/structure?
In my case we can only handle 19 joints per character. This is because we need over 20 plus entities along with a huge terrain and effects within a simulation running at 3200 X 880 at 60 fps. Ouch! There goes the toe joint along with the extra forearm joint.
Things to remember when drawing your joints:
* Draw your joints to match the mesh you¡¯ve created. Joints outside the mesh are undesirable ¨C remember the joints have an area of influence associated with them during the skinning process. Placement will determine which vertices will acquire weight and how much (weight is determined by proximity and dropoff).
* Draw the joints with a slight angle. The reasoning for this is twofold - anatomically speaking there are angles between joints. In Maya you are creating the Preferred Angle. This angle is used by the Inverse Kinematic Solver to determine which way to rotate the joints when you manipulate an IK Handle.
* The joints will be eventually controlled by other objects that the animator will keyframe. However, it is actually the rotation of the joints that are input into the engine for calculation. It is crucial then that the rotation axes of the joints are aligned as best as possible with the world coordinate system.
Build it and they will animate:
Construct the skeleton by building it in parts. I have the Auto Joint Orient on the default xyz. Start with the left leg first (hip > knee > ankle > ball). Position it then draw in the back joints all the way to the head of the character (root (hip) > lumbar > thoracic > cervical > cranium). Freeze transformations on the root joint ensuring the local axis is aligned with the world.
Now for arms. Create the arm structure ¨C for the purposes of gaming we will not include the ulna/radius joint in the skeleton and try to mimic that in other ways. Less joints means less transformations that the run-time system will have to handle increasing performance. Consult w/the programmer as far as how many joints should be within the character to allow it the maximum range of motion yet manageable as far as data size and computation (overhead) goes.
So, back to arm creation ¨C shoulder > elbow > wrist.
Since joints are in essence local axes of rotation let¡¯s ensure that they will rotate properly. To do that the joint must have a "primary" axis. Giving a joint a "primary" axis helps your software determine a priority or order of rotation for the joint. In Maya we can accomplish this by working with the Auto Joint Orient option within the Joint Tool. We can access this directly through MEL as well.
We are going to take the MEL approach to change the order of rotation of the joints. What we are trying to accomplish is to give the joint a "primary" axis ¨C an axis that will point down the length of the bone. In addition, we will try to align the axis as best we can with the world. This way, having the rotation of the joints "match" the world greatly increases the intuitiveness of the animation information an animator will be reading. If the knee joint was rotating on the Z axis during a run cycle yet the world axis of rotation for the same movement is the X there is no consistency. It might be confusing looking at the action curves of the character in relation to the world axis. No extra conversion of information is needed on my brain¡¯s overhead.
The MEL command to change a joints rotation order is outlined as follows:
joint -e -oj yzx -zso;
The xyz is the order of rotation and can be changed to any combination available. The ¨Coj flag stands for orient joints, -zso flag specifies that the local scale axes also be reoriented and the ¨Cch will include all children in the hierachy under that joint. Apply this command to the hip joint.
Now check the rotation manipulator for the hip. It should be closely related to the world axes. Now go through the skeleton working with the MEL command and changing the ordering of axes to match as best as possible the joints rotation order with the world. Leave the root, cervical and head joints alone.

Now connect the hip to the root using Connect Joint w/the parent option turned on.
Pick the left hip and Mirror Joint on the yz plane to create the other leg (NOTE: the order of rotation gets a little screwed up here because of the mirror so we will rebuild the leg).
Create a layer for your skeleton. Make that layer a reference. Using the joint tool again (along with vert snap) create the mirrored leg over again by creating new joints on top of the mirrored joints. Hide this new leg. Turning your skeleton layer back to standard Disconnect the hip joint on the mirrored side and remove the remaining joint. Unhide the new hip joint you just created. Make sure the local axes are correct for the joints. Use Connect joint to add the new leg to the skeleton. Now use the same process outlined above to rebuild the mirrored arm and attach that to the rest of the skeleton.

Now you should have a skeleton comprised of 19 joints that allow a solid range of motion with not a lot of overhead for your run-time transform computations. A nice balance.
Once that is finished be sure to Set Preferred Angle on the joints (RMB over the joint).

At this point we could go ahead and skin the character and edit the deformation. Instead, we will focus on giving the skeleton controls that the animator will use to pose the character. These are the objects that the animator will set keyframes on.
discuss this topic to forum
