SFM Compile: The Complete Guide to Compiling Custom Models for Source Filmmaker
You found a model you want to use in Source Filmmaker. You drop it into your scene and instead of your character, you get a T-posing gray mannequin, a purple and black checkerboard texture, or nothing at all. This is the single most common wall new SFM users hit, and the fix always comes back to one word: compiling.
This guide covers what SFM compile actually means, the exact files involved, a real QC file you can copy, the tools you need (all free), and the errors that trip up almost everyone the first time. No filler, no vague advice — just what actually gets a model working.
What Is SFM Compile?
SFM compile is the process of turning raw 3D files — a mesh exported from Blender or Maya, plus texture and animation data — into a .mdl file that Source Filmmaker can load. Source Filmmaker doesn’t read Blender files, FBX files, or OBJ files directly. It only understands compiled Source engine model formats.
Compiling is done by a program called studiomdl.exe, guided by a plain-text script called a QC file. The QC file tells studiomdl where your mesh is, where your textures are, what animations to include, and how the model’s physics should behave.
Here’s the short version of the pipeline:
3D software (Blender/Maya) → SMD or DMX export → QC file → studiomdl.exe → MDL, VVD, VTX, PHY files → Source Filmmaker
Once compiled, those output files work together as one model: the MDL holds the skeleton and mesh reference, the VVD holds vertex data, the VTX holds triangle strip data for rendering, and the PHY holds collision data for physics.
Why You Can’t Skip Compiling
Source Filmmaker runs on a version of the Source engine that dates back to 2012. Valve never ported SFM to Source 2, so the compile pipeline hasn’t changed in over a decade. That’s actually good news — every QC command and every fix that worked in 2015 still works today.
But it also means there’s no drag-and-drop import for raw 3D files, the way you’d expect in Blender or Unreal. Every custom model, every reskin, every prop has to go through studiomdl first. Skip it, and SFM either won’t load the file at all, or it’ll load a broken version with missing textures, no animation, or no collision.
Tools You Need (All Free)
You need five things, and none of them cost money:
- Blender with the Blender Source Tools add-on, for exporting SMD or DMX files
- Crowbar, a free GUI compiler built by community developer ZeqMacaw
- studiomdl.exe, the actual compiler, included with the Source SDK
- VTFEdit, for converting PNG or TGA textures into the VTF format Source uses
- Notepad++, for writing and editing your QC file
Crowbar is the tool most people use day to day. It wraps studiomdl in a simple interface: you point it at your QC file, pick your game, and click Compile. You can still use studiomdl.exe directly through Command Prompt if you want raw, unfiltered logs — useful once you’re comfortable reading errors.
The QC File, Explained With a Real Example
The QC file is the instruction sheet for the whole compile. Here’s a minimal but working example for a static prop:
$modelname "myprops/coffee_mug.mdl"
$body "body" "coffee_mug_ref.smd"
$cdmaterials "models/myprops/"
$surfaceprop "plastic"
$staticprop
$sequence "idle" "coffee_mug_ref.smd"
$collisionmodel "coffee_mug_phys.smd" {
$mass 200
$concave
}
What each line actually does:
- $modelname sets the output path and filename for your finished MDL. This path is relative to your
models/folder, not your desktop. - $body points to your reference mesh — the SMD or DMX file with the actual visible geometry.
- $cdmaterials tells the compiler where to find your VMT/VTF texture files, relative to the
materials/folder. - $surfaceprop defines what the model sounds and behaves like physically (wood, metal, plastic, flesh).
- $sequence adds an animation. Even static props need at least one idle sequence to register correctly.
- $collisionmodel defines the physics mesh, separate from your visible mesh. Skip this and your model won’t collide with anything or won’t have simulated physics.
For a rigged character, you’ll also see $definebone (custom bone setup), $poseparameter (blend controls like eye movement or facial sliders), and $bodygroup (swappable mesh parts, like different outfits or hats on the same skeleton).
Step-by-Step: Compiling With Crowbar
- Export your mesh. In Blender, use the Source Tools add-on to export your reference mesh and any animations as SMD or DMX files.
- Prepare your textures. Convert your image files to VTF using VTFEdit, and write a matching VMT file for each material.
- Write your QC file. Use Notepad++, save it with a
.qcextension, in the same folder as your SMD files. - Open Crowbar and go to the Compile tab.
- Set the game path to your SFM install, usually
Steam\steamapps\common\SourceFilmmaker\game\usermod. - Browse to your QC file and click Compile. Watch the log window.
- Check the output folder for your new MDL, VVD, VTX, and PHY files.
- Test in Half-Life Model Viewer (HLMV) before opening SFM. HLMV loads faster and shows you texture, bone, and animation problems in isolation, so you’re not troubleshooting inside a full SFM scene.
- Import into Source Filmmaker and confirm it looks right.
If you’d rather use the command line: open Command Prompt or PowerShell in the Source SDK bin folder, and drag your QC file onto studiomdl.exe, or run studiomdl.exe path\to\yourfile.qc directly. It’s the same compiler Crowbar calls in the background — Crowbar just handles the syntax for you.
Common SFM Compile Errors and How to Fix Them
Purple and black checkerboard texture This is Source’s “missing material” placeholder. Almost always caused by an incorrect $cdmaterials path, a VMT pointing to the wrong VTF filename, or textures that were never converted from PNG/TGA to VTF in the first place.
Model loads as a T-pose Your animation sequence either failed to export or wasn’t referenced correctly in the QC. Check that your $sequence line points to the right SMD, and that the animation was actually baked before export in Blender.
“Error opening qc file” or nothing happens Usually a path problem, not a model problem. Check for spaces or special characters in your folder path — C:\Users\Your Name\Downloads\ will break studiomdl. Keep working folders short and simple, like C:\sfm_work\.
Model won’t appear at all in SFM Check your $modelname path against where SFM is actually looking. Studiomdl does not create folders that don’t exist — if the destination folder is missing, the compile can succeed but the file won’t land where you expect.
Physics don’t work / model falls through the floor You’re missing a $collisionmodel block, or your collision mesh has bad smoothing groups. The compiler log will usually flag this directly with a warning about the collision model.
Compile crashes with no error code (EXCEPTION_ACCESS_VIOLATION) This is a known studiomdl quirk. Try running the compile with HLMV already open in the background — it sometimes resolves the crash, particularly on older SDK builds.
What Most Guides Leave Out
A few things trip people up that rarely get mentioned:
Case sensitivity matters. Source’s file system on Windows is forgiving, but any texture pack designed with Linux/Proton compatibility in mind, or any addon meant for the Steam Workshop, can break if your QC references Model.vmt and the actual file is model.vmt. Keep everything lowercase.
Compiling for a game isn’t the same as compiling for SFM. studiomdl needs to know which game’s engine build it’s compiling for — a model compiled against Team Fortress 2’s studiomdl won’t always behave identically to one compiled against SFM’s own. If Crowbar doesn’t list Source Filmmaker in its game dropdown, point it manually to your SFM directory instead of picking the closest-sounding game.
You don’t need to compile everything. If you’re only using assets that already ship with SFM or a game you own (like Half-Life 2 or TF2 content already mounted in SFM), you don’t need to touch studiomdl at all. Compiling is only required for new, custom, or modified assets.
Decompiling teaches you more than tutorials do. Crowbar can decompile existing MDL files — including Valve’s own — back into SMD and QC files. Pulling apart a working model from an official game is one of the fastest ways to understand correct QC structure, because you’re reading a file that’s guaranteed to work.
LODs and bodygroups aren’t optional extras for serious work. If you’re building anything meant to look good at a distance or need outfit variants on one skeleton, $lod (level of detail) and $bodygroup commands belong in your QC from the start, not bolted on later. Retrofitting them into a finished model usually means a full recompile anyway.
Practical Tips for Fewer Failed Compiles
- Change one thing at a time before recompiling. If it works, you know what fixed it. If it fails, you know what broke it.
- Keep models, textures, exports, and QC files in separate, clearly named folders.
- Always test in HLMV before loading a new model in SFM.
- Keep a backup of any QC file before editing it, especially once it’s working.
- Read the full compile log, not just the last line. The actual cause of a failure is often several lines above the final error message.
- Keep polygon counts reasonable for props — under roughly 60,000 triangles keeps compile times and in-viewport performance manageable.
Conclusion
SFM compile isn’t complicated once you see the actual pipeline: your mesh and textures go in, studiomdl.exe processes them against instructions in your QC file, and a working MDL comes out. Most failed compiles trace back to one of a handful of causes — a bad file path, missing textures, a skipped collision model, or a folder name with a space in it. Learn to read the compile log, test in HLMV before SFM, and change one variable at a time, and the whole process stops feeling like guesswork.
FAQs
What does “SFM compile” actually mean?
It’s the process of converting raw 3D model files (mesh, textures, animations) into the MDL, VVD, VTX, and PHY files that Source Filmmaker can load and render.
Do I need Crowbar, or can I compile without it?
You can compile using only studiomdl.exe from the command line. Crowbar is optional but makes the process much faster and shows readable error logs instead of raw console output.
Why is my compiled model purple and black?
That’s Source’s missing-texture placeholder. Check your $cdmaterials path in the QC file and confirm your textures were converted to VTF format.
Can I use models from other Source games in SFM without compiling?
Yes, if the game is already mounted in SFM and the model wasn’t modified. Compiling is only needed for new or edited assets.
What’s the difference between SMD and DMX files?
Both store mesh and animation data for export into studiomdl. DMX supports more advanced data (like flex/shape keys for facial animation), while SMD is the older, simpler, and more universally supported format.
Why does my model load as a T-pose?
Your $sequence reference in the QC is either missing, pointing to the wrong file, or the animation wasn’t baked before export from your 3D software.
Is SFM compile free?
Yes. Blender, Blender Source Tools, Crowbar, VTFEdit, Notepad++, and studiomdl.exe (via the Source SDK) are all free.