Skeletons and Rigging

From Valve Developer Community
Jump to: navigation, search


Custom vs Canned

Most of the time, Mod creators will want to start their work with an existing skeleton that has a working animation set, and start their modeling and gameplay prototyping from there. This approach has lots of benefits, and some constraints. Firstly, using an existing skeleton with animation lets you see your model in game faster, which then lets you refine and modify your design in the proper context. Using an existing skeleton also lets you preview your enveloping. But the biggest time saver is having a basic set of animation to start with, so that you can begin to prototype gameplay. Once you have a character up an running in the engine, you can then modify, expand upon, or completely replace any or all of the animations as needed.

Making Your Own

Some designs will demand a custom skeleton here are some guidelines for creating a custom rig. (XSI is mentioned, but these guidelines are applicable to just about any 3D package)

When building/rigging a character for the game it helps to make a distinction in XSI between the Skeleton and the Rig. The Skeleton is a hierarchy of deformers, as simple as possible and with one parent bone (usually the hips) that we use to deform the mesh. This is what gets exported and is the skeleton we see in game. The Rig is a separate hierarchy of controls that we use to animate the Skeleton (as needed) -- often the skeleton is constrained or somehow attached to the rig; but is not in the same hierarchy. One benefit of keeping this distinction is that you will always have a valid Skeleton hierarchy that'll get into the game, plus you are able to change the Rig hierarchy per scene if you wanted, to give you specific controls for specific animations without changing the Skeleton at all.

Rigging Considerations

When setting up your skeleton, it needs to be robust and easy to animate. The following considerations can hopefully save you some time and trouble on your production.

When creating your Skeleton, just about any object can be used as a deformer. You don’t have to use only “Bone�? objects. However, your Skeleton should be only one hierarchy. (all deformers are eventual children of the Hips, for example)

It pays to be organized from the start. This is especially true of your Skeleton bone names – All bone names must be consistent throughout all of your scenes, or else animation on misnamed bones wont be applied when the model is compiled. (all bone names must match the Reference scene/smd)

Testing Your Rig

You’ll need to thoroughly test your skeleton before you start doing animations. Once you’ve created your Reference scene and are happy with the Skeleton and Rig you want to compile the model and view it in HLMV to confirm that it’s working as needed, and is efficient. It also helps to export a quick test animation to verify that the character deforms correctly in HLMV.

When viewing your character in HLMV you want to take note of the following:

  • In the Render tab, turn on the Bones checkbox. Verify that the Skeleton looks to be in the correct place with respect to the mesh, and that the hierarchy looks correct.
  • In the Render tab, turn on the Normals checkbox and Verify that the normals are correct, and the character will light correctly. If the normals are incorrect, and you're using XSI, be sure to Freeze All Transforms of your mesh before you apply your envelope and re-export the reference SMD.
  • View your test animation, and verify that it looks correct with respect to your XSI scene.
  • In the Bones tab, look at the Bone dropdown to see a list of bones in the Skeleton. Verify that there aren’t extra or unused bones in your character.

Creating a ValveBiped


ValveBiped is the name of the standard human rig that was developed in XSI for animating human/biped characters in Half Life 2.

It consists of a skeleton hierarchy and a control rig. The skeleton hierarchy is used to deform the character’s mesh, and is what gets exported into the game. The control rig is used solely to animate the skeleton hierarchy in XSI, and does not get exported into the game. The skeleton hierarchy and control rig are two separate hierarchies, but the control rig controls the skeleton hierarchy by the use of constraints.

The ValveBiped skeleton hierarchy is very similar to that of Character Studio’s Biped, as the ValveBiped was developed initially as a way to port existing animations from 3DSMax into XSI.

A ValveBiped can be created very quickly in XSI, and can be created to any proportions.

Creating a ValveBiped using the XSI Mod Tool

Dominic Laflamme of Softimage wrote a great tutorial Rigging your Custom Character. Additional information on skeletons and rigging can be found in the Rigging A Character - From Scratch section of that tutorial.