SFM Compile: How to Compile Models for Source Filmmaker (2026)
Quick answer: "SFM compile" means turning exported model files (SMD or DMX) into a .mdl model that Source Filmmaker can load. You write a small text file called a QC, then run Valve’s compiler studiomdl.exe on it, either directly from the command line or through the free tool Crowbar. The finished files go into SourceFilmmaker\game\usermod\models, and the model then shows up in SFM’s Model Browser.
This guide shows the full process for 2026: what you need, the folder layout, a working QC example, Crowbar and command-line steps, a table of common errors with fixes, and a short FAQ. If you meant exporting a video from SFM, see our guide on how to render in SFM.
What "compile" means in Source Filmmaker
The Source engine cannot read Blender, FBX or OBJ files. Every model you see in SFM is a compiled .mdl file plus a few companion files. Compiling is the step that builds those files.
| Input | Tool | Output |
|---|---|---|
Mesh and animation files (.smd or .dmx) | studiomdl.exe (directly or through Crowbar) | .mdl, .vvd, .vtx files, and .phy if you add collision |
QC script (.qc) | Read by studiomdl | Tells the compiler what to build and where |
Textures (.png / .tga) | VTFEdit | .vtf texture plus a .vmt material file |
Keep all output files together. An .mdl on its own will not load.
What you need
- Source Filmmaker (free on Steam). It already includes
studiomdl.exeinSourceFilmmaker\game\bin. - Blender with the Blender Source Tools add-on, to export SMD or DMX files.
- Crowbar (optional but easier) by ZeqMacaw. It is a free Windows front end for compiling, decompiling and viewing models.
- VTFEdit to convert images to
.vtftextures. - A plain text editor such as Notepad++ or VS Code for the QC file.
The SFM folder layout
The default install path is:
C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\
Inside game, these folders matter:
bin\studiomdl.exe– the compiler.usermod\– the default place for your own content.usermod\models\– compiled.mdlfiles go here.usermod\materials\–.vmtand.vtffiles go here.
Keep your source files (SMD, DMX, QC) in a separate work folder, for example C:\sfm_work\my_crate\. They do not need to be inside the SFM folder.
Step 1: Export SMD or DMX from Blender
- Install Blender Source Tools and enable it in Edit > Preferences > Add-ons.
- Apply scale and rotation to your object (Ctrl+A > All Transforms).
- In the Scene properties, open the Source Engine Export panel. Set the export folder to your work folder.
- Choose the format. Use DMX for characters with facial shape keys (flexes); SMD is fine for simple props.
- Click Export. You should now have a file such as
my_crate.smd.
Each material name in Blender becomes a material name the model looks for, so name it something simple like crate.
Step 2: Write the QC file
The QC is a text file with commands that start with $. Save it as my_crate.qc next to your SMD. Here is a minimal, working prop QC:
$modelname "yourname\props\my_crate.mdl"
$cdmaterials "models\yourname\props"
$body "body" "my_crate.smd"
$surfaceprop "wood"
$staticprop
$sequence "idle" "my_crate.smd"
$collisionmodel "my_crate.smd"
{
$mass 20
$concave
}
What each line does:
$modelname– output path, relative tousermod\models. This model ends up atusermod\models\yourname\props\my_crate.mdl.$cdmaterials– folder (relative tousermod\materials) where the model looks for its.vmtfiles.$body– the visible mesh.$surfaceprop– physics surface type (sound and impact effects).$staticprop– marks a prop with no moving bones. Leave it out for characters.$sequence– every model needs at least one, even a static prop. Pointing it at the mesh file works.$collisionmodel– optional physics mesh. It creates the.phyfile.
For characters, use $model instead of $body when the mesh has flexes, and add your animations as extra $sequence lines. The Valve Developer Community has a full list of QC commands.
Step 3: Compile with Crowbar (easiest)
- Download the latest Crowbar release from the Crowbar GitHub page and run
Crowbar.exe. - Open the Set Up Games tab. Choose Source Filmmaker from the game list (or add it). Check that the paths point to
...\SourceFilmmaker\game\usermod\gameinfo.txtand...\SourceFilmmaker\game\bin\studiomdl.exe. - Open the Compile tab. Select your
.qcfile. - Set Game that has the model compiler to Source Filmmaker.
- Tick Output to: Game’s "models" folder so the files land in
usermod\models. - Click Compile and read the log. A clean compile ends with a "Completed" line for your QC.
Crowbar does not replace studiomdl. It calls SFM’s own studiomdl.exe for you and shows the log in a readable window. Use SFM’s compiler, not one from TF2 or another game, because versions differ.
Alternative: compile from the command line
If you prefer not to use Crowbar, make a file called compile.bat in your work folder:
@echo off
set SFM=C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game
"%SFM%\bin\studiomdl.exe" -game "%SFM%\usermod" -nop4 "C:\sfm_work\my_crate\my_crate.qc"
pause
-game sets the target game folder, -nop4 turns off Perforce source control (you almost always want this), and the QC path goes last. pause keeps the window open so you can read errors. See the StudioMDL page on the Valve Developer Community for all options.
Step 4: Set up materials (VMT and VTF)
- Open your texture image in VTFEdit and save it as
crate.vtf. - Put it in
usermod\materials\models\yourname\props\(the$cdmaterialsfolder). - Create
crate.vmtin the same folder. The file name must match the material name from Blender:
"VertexLitGeneric"
{
"$basetexture" "models\yourname\props\crate"
}
Step 5: Load the model in SFM
- Restart SFM if it was open (it reads new models at startup).
- In the Animation Set Editor, click Create Animation Set for New Model.
- Browse to
yourname\props\my_crate.mdl. Use the search box if needed. - If it looks wrong, open it in HLMV (Half-Life Model Viewer) or Crowbar’s View tab first to check textures and bones.
Character QC starting point
A character needs bones, so it uses $model and real animation files. This is a simple starting point you can grow from:
$modelname "yourname\characters\hero.mdl"
$cdmaterials "models\yourname\characters\hero"
$model "body" "hero_body.dmx"
$surfaceprop "flesh"
$sequence "ref" "hero_body.dmx" fps 30
$sequence "idle" "anims\hero_idle.smd" fps 30 loop
$collisionjoints "hero_physics.smd"
{
$mass 70
$rootbone "pelvis"
}
- Do not use
$staticpropon characters; it removes the bones SFM needs to pose them. $collisionjointsbuilds a ragdoll-style physics model. It is optional for SFM posing but helps with physics tools.- Bone names in animation files must match the bones in the body mesh.
Tips that save time
- Compile a tiny test prop first. If that works, your tools and paths are correct and any later error is in the model itself.
- Use only lowercase letters, numbers and underscores in file, folder and material names. Spaces cause hard-to-find path errors.
- Read the whole compile log, not just the last line. Warnings about missing materials or bad weights show up early.
- Keep one work folder per model, with the QC, meshes and animations together. It makes recompiling and sharing much easier.
- Back up your QC. It is small, but it holds every decision about the model.
Common SFM compile errors and fixes
| Error or symptom | Likely cause | Fix |
|---|---|---|
ERROR: model has no sequences | QC has no $sequence | Add $sequence "idle" "your_mesh.smd" |
could not load file '...smd' | Wrong file name or path in QC | Check spelling, keep files next to the QC, use quotes around paths |
Too many bone influences per vertex | More than 3 bone weights on a vertex | In Blender, use Limit Total weights to 3, then re-export |
| Too many bones | Over the bone limit (SFM’s studiomdl is commonly reported to allow 256; most other Source games 128) | Remove unused bones or merge helper bones |
| Pink and black checkerboard | Missing or misplaced VMT/VTF | Match material names, check $cdmaterials and $basetexture paths |
| Model compiles but is not in SFM | Compiled into wrong game folder | Set -game or Crowbar output to SourceFilmmaker\game\usermod, then restart SFM |
| Compiler crashes / access violation | Broken mesh, bad QC or wrong studiomdl | Use SFM’s studiomdl, check for zero-area faces, compile a simple prop to test the setup |
For more errors with step-by-step fixes, read SFM compile errors and how to fix them.
Decompile and recompile an existing model
To edit a model from a game or the Workshop, use Crowbar’s Decompile tab. Select the .mdl, choose an output folder, and click Decompile. You get SMD files and a QC you can edit and compile again. Respect the original creator’s license when you share edited models.
If you only want to use a ready-made model, you do not need to compile anything. See how to import models into Source Filmmaker.
FAQ
What is SFM compile?
It is the process of converting SMD or DMX files into an .mdl model that Source Filmmaker can load, using a QC script and Valve’s studiomdl.exe.
Do I need Crowbar to compile SFM models?
No. Crowbar is a free front end that runs studiomdl for you. You can call studiomdl.exe from a batch file instead.
Where is studiomdl.exe for SFM?
By default it is at C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\bin\studiomdl.exe.
Should I use SMD or DMX?
SMD is simple and fine for props and animations. DMX is newer and needed for characters with facial flexes. Both compile the same way.
Why is my compiled model pink and black?
SFM cannot find the material. Make sure the .vmt file name matches the material name in your mesh and sits in the folder set by $cdmaterials under usermod\materials.
