Disclaimer: These tutorials were written in 2011. Many of the methods used here may no longer be accurate, but I keeping the information available to hopefully steer people in the right direction.

Adding Custom Animations to a Source Model

This is a short guide on how to add a custom animation to an existing character model. This does not go over how to animate, and assumes you have an animation completed and ready in 3D Studio Max.

1) Export your completed animations as SMD files to a new directory.

2) Copy the (name)_definebones.qci file to the new directory (example: F:\Steam\steamapps\username\sourcesdk_content\tf\modelsrc\player\pyro\scripts\pyro_definebones.qci).
3) Copy the toolbox folder to the directory.
4) Run compile_smd_animations.bat.
You should now be able to preview your animation in the SDK Model Viewer.

5) To play the animation in-game, create a VCD file using Faceposer.

Old Manual Method

1) Export your completed animation as an SMD file. [Pic] – Make sure the Valve bones are not hidden when exporting. 2) Using GCFSCape, find the original animation file for the model (example: pyro_animations.mdl), extract it to the local directory, then rename it (example: pyro_animations_original.mdl). [Pic] 3) You will need a definebone file. For TF2 characters these are included in the SDK directory (example: pyro_definebones.qci), for other games see this reference. 4) Create a QC file for the animation, mine looks like so. – It’s a good idea to use a prefix for your animation so they’re easy to find, in this example I’ve used a z_ prefix.

$modelname "player/pyro_animations.mdl"

$includemodel "player/pyro_animations_original.mdl"

$include "pyro_definebones.qci"

$sequence z_taunt_1 "z_taunt_1.SMD" fps 30.00

5) Compile the animation using GUIStudioMDL. [Pic]
You should now be able to preview your animation in the SDK Model Viewer. [Pic]

Problems and Fixes
1) How can I hide weapons during an animation sequence?
– Move the weapon bone under the model when creating the animation in 3DS Max.
2) When running the compiler I get a “filesystem.dll” error.
– This is usually caused by not having the SDK open when running the compiler.
3) Some of my in-game animations no longer work.
Some animations such as taunts will no longer display from player actions. This can be reverted by switching back to the original animation file.

Related Tutorials
Creating a CAT rig for a TF2 character
Basic animation of a TF2 character
Creating VTA files with 3DS Max
TF2 custom animation tutorial

Examples


Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.