Animation in XSI for Source
This page is under construction! Estimated completion date is 15 March 2009. -RigorMortis 10:56, 6 March 2009 (UTC)
This tutorial takes you from just knowing how to make models with XSI to being able to create an animated model that will work in Hammer.
Creating animated models for Hammer
For our example here, we will be using a mechanical system - in our case, a prison cell with many mechanical parts that move separately.
There will be several independent animations in this model.
Preparing your model
Chances are that you already have a model made that you want to animate if you're reading this page.
It's easier to animate a model before you merge its meshes.
Create a Central Bone
First, you will need to create a central bone.
All of the bones in this system will be parented to this central bone. Source requires that all bones be parented to a single bone, which will be the central bone'. You can have as many bones and animations as you like, but they all must be parented to the central bone.
Choose a location for your central bone that will not animate. We placed it in the ceiling of the prison cell. This bone must not get edited, as it is the reference for all other animations.
In XSI, select the Animate toolbar, under the Create section, select Skeleton > Draw 2D Chain
I find it easiest to draw this bone in one of the 2D views. We will be using the Top view.
Click on the desired start point for your bone, which will create Null in your Explorer Viewport.
Click on the desired end point for your bone, which will create bone and effector in the Explorer Viewport, which will be children of the Null you just created, which is now named root.
Right click to stop making bones.
In the Explorer Viewport click on root.
This will display the coordinate location data on the Transform toolbar.
Many times when you create a bone, the coordinates will not be whole numbers. It is a good practice to change the locations to be whole numbers for ease of use. For example, if the editor placed your bone at 79.0032252, you might want to change it to 79.
Do this for the root, bone, and effector.
Because this particular bone is not going to be animated, this is not as important of a step, but this will become very important when you are creating bones for animation!
Once you are satisfied that your central bone is located where you want it, Ctrl+Click the root, bone, and eff to select all three.
Select the tab KP/L on the right hand toolbar, which will bring up the keying panel and animation layers toolbars.
Select Transform > Set Neutral Pose then select Transform > Freeze All Transforms
- If you miss this step, crazy things will happen later on!
Adding bones for Animation
Our first animation will be to get one of our meshes to rotate along an axis. Specifically, this is a shutter to open and close a window.
Select Skeleton > Create 2D Chain
Click where you want this bone to start, then click where you want it to terminate. Right click to stop bone creation.
Make certain that this bone is located exactly where you want it! If you plan on rotating an object, the bone will be the axis, and thus must be positioned exactly where you want the axis of rotation.
Our axis of rotation needs to be vertical, so we place the bone vertically down the center of the hinge of our shutter.
Make sure to view the bone from several different angles to ensure that it is in the proper position. Our bone was created mistakenly in the middle of our model, so we had to translate it along the z-axis to where it should be.
Once the bone is positioned exactly where you want it, KP/L > Transform > Set Neutral Pose and Freeze All Transforms
You will need to repeat this step for each animation you want in your model.
Parenting to Parent Bone
Each of your animated bones must be children of a single bone we will be calling the Parent Bone.
- Stay tuned for more modeling in XSI!
Spigot 37 Development Team