How to Compile an Animation from Blender to Source/SFM (HWM-TF2 characters)

Source Filmmaker37 views1 favorites4 min readby Palatable PaintingUpdated Jan 16View on Steam ↗

Introduction

Introduction
This guide explains a reliable, deformation-safe workflow for transferring animations from Blender into the Source Engine and Source Filmmaker (SFM).

It is aimed at users who:
  • Animate in Blender (Rigify, custom rigs, etc.)
  • Export animations to DMX
  • Experience broken poses, twisted bones, or deformed HWM / TF2 models in SFM

If your animation imports but looks wrong, this guide is for you.

What You Will Need

Required Software
  • Blender
  • Source Filmmaker (Steam)
  • Crowbar (Source model decompiler)

Required Add-ons
  • Blender Source Tools (get it from the dev wiki)

The Procedure

1. Installing Blender Source Tools
  • Download Blender Source Tools from the official Valve Developer Wiki
  • Open Blender → Edit → Preferences → Add-ons
  • Click Install… and select the downloaded .zip
  • Enable Import–Export: Blender Source Tools

If installed correctly, Source Engine export options will appear under File → Export.


2. Preparing a Proper Animation Rig
This guide assumes you already have a finished animation in Blender. You may use:
  • Rigify-based rigs
  • Custom control rigs
  • Any animator-friendly setup

Recommended: My Blender Rigs
Available on my Gumroad page https://palatablepainting.gumroad,com/ Replace the comma with a dot cause Steam is removing my link[/url] Key Features:
  • Correct Source bone naming
  • Separated control and deformation bones
  • Easy baking to Source armatures
  • Designed to avoid Source export issues
  • Custom PBR materials
  • If your PC is slow I added a proxy set up that makes it run as smoothly as reasonably possible
3. Creating a Compatible Rig (Advanced)
Scripts available here: https://github.com/apetezible/SourceBlenderRiggingScripts
Script 1 – Bone Marking
  • Object Mode
  • Select two armatures:
    • Your control / animation rig / Rigify Armature...
    • The decompiled Source armature
  • Script marks Source bones already in your custom rig for further deletion and accommodation of the original bones

After this step, merge both armatures manually. Tip: Use bone layers to separate generated control bones from Source bones.
Script 2 – Reparenting
Fixes hierarchy while preserving Source bone names.
Script 3 – Constraint Helper
Adds constraints from the animated rig to the Source armature for baking (We are not running this yet)


4. Transferring the Animation
IMPORTANT: Back up your file before continuing.
  • Append a fresh, unmodified Source armature
  • Parent the animated armature to an Empty
  • Scale the Empty for Source scale

Source Scale (TF2)
  • Real world → Source scale: 52.4934
  • Source → real world: 0.01905

Scale the Empty uniformly (X, Y, Z = 52.4934) you can use the shortcut alt+ drag select the channels and type in the number, you will see it typing xyz at the same time. Do NOT apply transforms yet. Ensure both armatures share:
  • Same origin
  • Same rotation
  • Perfect alignment


5. Baking the Animation
  • Run Script 3
  • In object mode, select first the animated armature and second the fresh one
  • Run the Script, if everything went well, you should see the fresh armature animated!
  • Select the fresh Source armature
  • Enter Pose Mode
  • Bake Action with:
    • Pose ✔
    • Object ✔
    • Clear Constraints

You may overwrite an existing action or create a new one.


6. Exporting to DMX
  • Select the fresh Source armature
  • File → Export → Source Engine (.dmx)
  • Export a single animation selecting it in the exportables tab, deselcting the other objects
  • Use correct game path (your working folder) and DMX version by selecting the bin folder of SFM or the game you want this for


7. Importing into SFM (Critical Step)
Do NOT import animations directly onto HWM models.

Original HWM models deform or break when importing custom animations.

Solution: No-HWM Models
Download my No-HWM models from the Steam Workshop. They are located under:
/no_hwm/

These models:
  • Accept custom animations safely
  • Preserve bone integrity
  • Act as animation carriers

Import the animation onto the No-HWM model via SFM menus. Select the model (all of it), right-click > import animation.


8. Applying the Animation to the Final Model
  • Add the original HWM or game model
  • Lock corresponding bones to the No-HWM animated model
  • Select all locked bones
  • Apply the Zero preset

The animation should now play correctly.


Common Problems & Fixes
  • Deformed mesh → scale mismatch
  • Exploding bones or SFM crahses whem importing → animation imported directly to HWM
  • Offset motion → mismatched armature origins
  • SFM crahses whem importing → animation not exported correctly from blender (I've noticed in the last version of blender, I had to append the animated baked armature animation to my source file where I first imported the .qc into blender and then export it cleanly, without any subfolders. This didn't happen in other older versions of Blender)


Final Notes
This workflow is:
You can do with it:
  • Custom TF2 taunts
  • In-game custom animations for TF2 or other games
  • High-quality SFM shorts animated in Blender

In this video I used a taunt animation test made in blender and imported using the steps in this guide

This guide was created by its original author on the Steam Community. Are you the author and want it removed? Request removal.