A custom model can look perfect in Blender and still refuse to work in Source Filmmaker. It may appear invisible, show purple-and-black textures, stay frozen in a T-pose, or generate a wall of compiler errors.
If you searched for smf compile, the dominant topic behind the query is Source Filmmaker (SFM) compilation: preparing models and related assets so Valve’s Source engine can load them correctly. The process usually involves SMD or DMX source files, a QC script, and StudioMDL, often accessed through Crowbar.
Quick answer: smf compile is the workflow used to convert source assets into formats that Source Filmmaker understands. For a model, you typically export geometry and animations as SMD or DMX, define them in a QC file, and compile that QC with StudioMDL or Crowbar. The result includes an MDL model and supporting files such as VVD and VTX; a PHY file may also be generated when collision geometry is defined.
Once you understand what each file does, the workflow becomes far easier to troubleshoot.
What Does smf compile Actually Mean?
Compilation is essentially a translation step between your content-creation software and the Source engine.
You might build a character in Blender, Maya, or 3ds Max. That application understands its own project files and common interchange formats, but Source Filmmaker ultimately expects assets prepared for the Source engine.
A typical model pipeline looks like this:
3D model → SMD/DMX → QC → StudioMDL → MDL/VVD/VTX/PHY → Source Filmmaker
The QC file is especially important. Think of it as the set of instructions telling the compiler what geometry to use, where the finished model belongs, where its materials are located, and which animation sequences or collision models should be included.
Source Filmmaker itself is built on Valve’s Source technology and is designed to work with models, maps, animations, particles, cameras, lights, and other Source assets.
Compiling Is Not the Same as Rendering
This distinction causes considerable confusion.
Compiling a model prepares an asset for the engine.
Rendering or exporting a movie turns your finished SFM scene into visual output.
Likewise, map compilation is another related but separate workflow. A map starts as a VMF and goes through Source map tools to produce a BSP.
So when someone says “compile SFM,” first determine what is being compiled:
| Task | Input | Main Process/Tool | Typical Output |
|---|---|---|---|
| Model compilation | SMD/DMX + QC | StudioMDL/Crowbar | MDL, VVD, VTX, PHY |
| Texture preparation | Source image/material | Texture tools | VTF/VMT |
| Map compilation | VMF | VBSP, VVIS, VRAD | BSP |
| Movie export | SFM session | SFM rendering/export | Movie or image output |
For smf compile searches, model compilation is generally the most useful place to start.
Files You Need Before an smf compile
A successful compile is much easier when you know the role of each file rather than simply copying commands from a tutorial.
SMD Files
SMD is a long-established Source model format used for geometry, skeletons, and animation data.
Depending on the asset, you might have separate files such as:
character_reference.smd
character_idle.smd
character_walk.smd
character_physics.smd
The reference file normally contains the primary mesh and skeleton, while additional SMD files can contain animation sequences or collision geometry.
DMX Files
DMX is another format used in Source workflows.
Modern Blender-based Source workflows can work with both SMD and DMX. The Blender Source Tools, for example, provide Source engine integration and support SMD and DMX import/export.
You therefore do not always have to use SMD. Your choice depends on the asset, exporter, target engine branch, and workflow.
QC Files
A QC is a text-based model compilation script.
It tells StudioMDL how the model should be constructed.
A minimal example might look like:
$modelname "custom/character.mdl"
$body "body" "character_reference.smd"
$surfaceprop "flesh"
$cdmaterials "models/custom/character"
$sequence "idle" "character_idle.smd" fps 30 loop
This small file provides several critical instructions.
$modelname specifies the compiled model’s path and filename.
$body identifies the primary mesh.
$surfaceprop defines a surface property.
$cdmaterials points the model toward its material location.
$sequence defines an animation sequence.
More sophisticated characters may require bodygroups, flexes, attachments, hitboxes, inverse kinematics, LOD definitions, multiple animations, collision data, and other QC commands.
MDL Files
MDL is the main compiled model file.
However, a common beginner mistake is assuming that the .mdl is completely self-contained.
It isn’t.
Valve’s StudioMDL documentation describes the MDL as containing information such as the skeleton, animations, bounding or hit boxes, surface materials, LOD indices, contents, and model flags, while other data is stored in supporting files.
VVD Files
The VVD stores hardware-independent vertex data.
Valve’s documentation notes that this includes vertex information such as UV mapping data.
If you copy an MDL while leaving its required VVD behind, the model may fail even though the main .mdl appears to be in the correct folder.
VTX Files
VTX files contain optimized model data for different rendering targets.
Depending on the model and Source branch, you may encounter names such as:
model.dx80.vtx
model.dx90.vtx
model.sw.vtx
StudioMDL can produce multiple VTX variants alongside the MDL.
PHY Files
A PHY file contains collision mesh information.
It is not automatically required for every model. Valve’s StudioMDL documentation states that the PHY output is omitted when no $collisionmodel is defined.
That distinction matters when troubleshooting. A missing PHY does not automatically mean your compilation failed.
VTF and VMT Materials
Model compilation and material setup are connected, but they are not the same process.
In a classic Source workflow, you will commonly encounter:
- VTF — Valve Texture Format
- VMT — Valve Material Type/material script
The VTF contains texture data, while the VMT describes how the material should behave and references the appropriate texture.
Source’s normal directory structure separates compiled models under models from their materials under materials.
Quick Takeaway: An MDL alone is not necessarily a complete working model. Keep its supporting VVD/VTX files together and make sure its VMT/VTF material paths match what the model expects.
Tools Used for smf compile
You do not need a huge software stack. A few tools handle most of the workflow.
Blender
Blender is commonly used to create, edit, rig, and prepare custom 3D models before exporting them into a Source-compatible format.
A Blender project itself is not your final SFM model. You still need to export suitable source data and compile it.
Blender Source Tools
Blender Source Tools add Source engine functionality to Blender.
The project’s documentation lists support for SMD and DMX, multiple-object exporting, QC compilation, and importing complicated models through QC files.
This can make Blender-to-SFM workflows considerably more manageable.
StudioMDL
StudioMDL is the core Source model compiler.
It reads the instructions in your QC file and creates the engine-ready model files. Valve documents its various inputs and outputs, including MDL, VVD, VTX, PHY, and optional animation-related files.
For many users, this is the actual compiler doing the work even when another application provides the graphical interface.
Crowbar
Crowbar project is a popular GoldSource and Source Engine modding utility that supports workflows including model compilation and decompilation.
Its biggest advantage for beginners is convenience.
Instead of manually constructing command-line instructions every time, you can configure your Source Filmmaker game setup, choose a QC, run the compile, and inspect the resulting log.
That log is extremely useful when something goes wrong.
How to smf compile a Model Step by Step
The cleanest approach is to treat compilation as a pipeline. Do not jump straight to the Compile button before verifying the source files.
1. Prepare the Model
Start with a clean model in your 3D application.
Before exporting, inspect:
- Mesh geometry
- UV mapping
- Skeleton
- Bone hierarchy
- Bone weights
- Material assignments
- Object names
- Transform/orientation
- Animation sequences
For a character, pay particular attention to the armature and vertex weights. A model can compile successfully while still being unusable because the rig itself was prepared incorrectly.
A compiler cannot repair fundamentally bad source data.
2. Export the Source Model
Export the model using an appropriate Source-compatible format, normally SMD or DMX.
With Blender, Blender Source Tools provides dedicated Source support.
For a simple prop, you might only need a reference mesh.
A character could require several source files:
hero_reference.smd
hero_idle.smd
hero_walk.smd
hero_run.smd
hero_physics.smd
Keeping names predictable makes the QC much easier to maintain.
3. Organize the Working Directory
Do not scatter files across your desktop.
A simple project layout could be:
my_character/
├── model/
│ ├── character_reference.smd
│ ├── character_idle.smd
│ └── character_physics.smd
├── materials/
│ ├── character_body.vtf
│ └── character_body.vmt
└── character.qc
The exact layout can vary. Consistency matters more than copying one particular folder arrangement.
Use simple filenames and avoid changing paths halfway through the project.
4. Create the QC Script
Now define how StudioMDL should build the asset.
For example:
$modelname "custom/hero/hero.mdl"
$body "hero" "character_reference.smd"
$surfaceprop "flesh"
$cdmaterials "models/custom/hero"
$sequence "idle" "character_idle.smd" fps 30 loop
If you need collision geometry, you can add a collision model:
$collisionmodel "character_physics.smd"
{
$mass 70
}
Remember that the compiler follows the QC instructions literally.
A wrong filename, missing source file, or incorrect material path can therefore break an otherwise valid model.
5. Configure Crowbar
If you use Crowbar, configure it for Source Filmmaker before compiling.
Select the appropriate game setup and make sure it points toward your Source Filmmaker installation and the correct model compiler.
Then open the compile section and select your QC file.
Crowbar ultimately works with the Source compilation process while giving you a friendlier interface for controlling the input and output. Its source code also demonstrates how it handles $modelname and model output paths.
6. Run the Compile
Start compilation.
Do not immediately close the output window when it finishes.
Read the log.
A successful run should produce the model files expected by the QC and compiler. Depending on your configuration, this may include:
hero.mdl
hero.vvd
hero.dx90.vtx
hero.sw.vtx
hero.phy
The exact output can differ based on the model and compiler options.
7. Put the Model in the Correct SFM Directory
The compiled model belongs under a Source Filmmaker model search path, commonly within a mod/content folder’s models directory.
For example, if the QC contains:
$modelname "custom/hero/hero.mdl"
your model’s final relative path should correspond to:
models/custom/hero/hero.mdl
Do not arbitrarily change that directory after compiling unless you also understand the model’s expected path structure.
8. Install the Materials
Materials are separate from the model files.
If the QC contains something like:
$cdmaterials "models/custom/hero"
the corresponding material directory should match that reference under the game’s materials structure.
For example:
materials/models/custom/hero/
It could contain:
hero_body.vmt
hero_body.vtf
This separation between compiled model files and materials is part of the normal Source asset structure.
9. Test the Model in Source Filmmaker
Launch SFM and search for your model.
Do not stop at “it appears.”
Test it.
Rotate it, inspect the materials, manipulate bones, try animation sequences, check facial controls where applicable, and view it under different lighting.
A successful compile only means the compiler completed its job. It does not guarantee that the source model was configured perfectly.
Understanding the QC File in More Detail
If you plan to work with custom Source Filmmaker assets regularly, learning QC syntax is one of the best investments you can make.
Copying someone else’s QC can get your first model running, but understanding it makes troubleshooting much faster.
$modelname
Example:
$modelname "custom/robot/robot.mdl"
This determines the compiled model’s name and relative model path.
If this path is wrong, you may spend time searching SFM for a model that was compiled somewhere you did not expect.
$body
Example:
$body "body" "robot_reference.smd"
This associates model geometry with the compiled asset.
A typo in the source filename can stop compilation.
$cdmaterials
Example:
$cdmaterials "models/custom/robot"
This tells the model where its material references should resolve.
If your model appears purple and black, investigate this directive alongside your VMT and VTF paths.
$sequence
Example:
$sequence "idle" "robot_idle.smd" fps 30 loop
Sequences define animation data.
You can create separate sequences for actions such as:
idle
walk
run
attack
jump
For a static prop, you may only need a simple sequence depending on the particular model setup.
$collisionmodel
Example:
$collisionmodel "robot_physics.smd"
{
$mass 100
}
This defines collision geometry.
When StudioMDL has appropriate collision-model data, it can produce a PHY file. If no $collisionmodel is defined, Valve notes that a PHY file may simply be omitted.
Why Does an smf compile Fail?
Compile errors become much less frustrating when you divide them into categories.
Wrong File Paths
This is one of the first things to check.
Your QC may reference:
character_body.smd
while the actual file is:
characterbody.smd
To you, the difference looks trivial.
To the compiler, they are different paths.
Check every reference before changing advanced settings.
Missing Source Files
If your QC expects a mesh, animation, or collision file that does not exist where expected, StudioMDL cannot build the model correctly.
Before compiling, confirm that every source filename referenced by the QC exists.
Model Compiles but Does Not Appear
This is different from a compiler failure.
If the compile finishes successfully but the model does not appear in SFM, inspect:
$modelname- The compiled output directory
- SFM’s active content/search paths
- Whether all MDL/VVD/VTX components were copied
- Whether you are searching for the correct relative model name
Do not keep recompiling an unchanged QC if compilation already succeeds. The problem may be installation rather than compilation.
Purple-and-Black Checkerboard
The famous Source checkerboard usually points toward a material or texture problem.
Check:
- VMT file exists
- VTF exists
- VMT references the intended texture
$cdmaterialsis correct- Folder hierarchy matches the material path
- Material name assigned to the mesh matches the intended material
A model can compile perfectly while its textures are completely broken because model compilation and material resolution are separate concerns.
T-Pose or Broken Animation
A T-pose often indicates an animation or skeleton problem rather than a texture problem.
Inspect:
- Armature
- Bone hierarchy
- Bone names
- Vertex weights
- Export settings
- Animation SMD/DMX
$sequencedeclarations- Reference pose
If you are porting an existing Source model, be especially careful about changing bone structures.
Model Is Distorted
Severely stretched limbs or exploded vertices usually point back toward the source mesh, skeleton, or weighting.
Return to Blender or your other 3D application and inspect the model there.
Compilation packages your data; it does not magically correct broken skinning.
Collision Behaves Incorrectly
Visual geometry and collision geometry are separate concepts.
A beautiful high-detail mesh does not automatically make a good physics mesh.
For many props, simpler collision geometry is preferable because it reduces complexity while still approximating the object’s physical shape.
Check your $collisionmodel, physics mesh, and related QC configuration.
Crowbar Reports Errors
Read the complete compile log rather than focusing only on the final line.
Look for the first meaningful error.
Later messages can be consequences of an earlier failure. Fixing the root error often clears several subsequent messages at once.
This troubleshooting habit saves enormous amounts of time.
How to Compile Textures for SFM
Textures deserve their own workflow because putting an image beside an MDL does not automatically make Source use it.
Classic Source assets commonly use VTF texture files paired with VMT material definitions.
A simplified material might resemble:
"VertexLitGeneric"
{
"$basetexture" "models/custom/hero/hero_body"
}
The material tells Source which base texture to use.
Your corresponding files might be organized as:
materials/
└── models/
└── custom/
└── hero/
├── hero_body.vmt
└── hero_body.vtf
Meanwhile, the compiled model files live separately:
models/
└── custom/
└── hero/
├── hero.mdl
├── hero.vvd
└── hero.dx90.vtx
Valve’s Source SDK directory documentation similarly distinguishes model content from compiled model materials.
Quick Takeaway: When a model’s shape appears correctly but its surface is purple and black, investigate materials before recompiling the entire mesh.
How Map Compilation Differs From Model Compilation
Custom maps follow a different pipeline.
A Source map generally starts with a VMF file and is compiled into a BSP.
Three familiar Source map tools are:
VBSP — processes the basic map geometry and BSP structure.
VVIS — performs visibility calculations used by the engine.
VRAD — handles lighting calculations.
VVIS is part of the Source 1 BSP compilation toolchain, while StudioMDL belongs to the model compilation toolset.
So the conceptual pipeline is:
VMF
↓
VBSP
↓
VVIS
↓
VRAD
↓
BSP
The finished BSP then belongs under the appropriate maps directory.
Do not try to solve a map compile problem using the model workflow. They are related Source-development tasks but use different inputs and compilers.
SFM Compile vs. Source 2 Workflows
Another source of confusion is mixing Source and Source 2 instructions.
Source Filmmaker is associated with the original Source toolchain. Valve’s documentation describes SFM as running on the Alien Swarm branch of Source.
Source 2 uses a newer asset pipeline and different tools.
That means a tutorial for Source 2 Filmmaker or newer Valve Workshop Tools may not apply directly to classic Source Filmmaker.
Before following any compilation guide, check which engine and application it targets.
If the instructions discuss QC, SMD, StudioMDL, MDL, VVD, VTX, VMT, and VTF, you are generally looking at the classic Source-style pipeline.
A Better smf compile Workflow for Beginners
The easiest way to learn compilation is not by starting with a complicated character.
Start with a simple prop.
Use something like a cube, crate, cup, or other static object. Give it one material and avoid complex animation initially.
Then work through this sequence:
- Create a simple mesh.
- UV unwrap it.
- Assign one material.
- Export it to SMD or DMX.
- Write a minimal QC.
- Compile it with StudioMDL/Crowbar.
- Install the model files.
- Prepare its material.
- Open it in SFM.
- Fix any path or material errors.
Once that works, move on to skeletons, animations, bodygroups, flexes, physics, and more complex materials.
This approach isolates problems. If your first project contains 70 bones, facial flexes, six materials, multiple bodygroups, custom physics, and 15 animation sequences, a failed compile gives you far too many possible causes.
Practical Checklist Before Compiling
Before clicking Compile, verify these items:
- Source mesh exports successfully
- Skeleton and weights are correct
- SMD or DMX files exist
- QC filename is correct
$modelnameuses the intended path$bodyreferences an existing file$cdmaterialsmatches the planned material directory$sequencefiles exist- Collision source exists if
$collisionmodelis used - Crowbar targets the correct Source Filmmaker setup
- Output path is known
- Material names match the model’s assignments
After compiling, verify:
- MDL exists
- VVD exists where required
- VTX files are present
- PHY exists if collision data should have produced one
- VMT/VTF files are in the correct material location
- SFM can find the model
- Materials render correctly
- Bones behave correctly
- Animation sequences work
This checklist catches most beginner mistakes before they turn into hours of troubleshooting.
What Actually Makes SFM Compilation Easier?
The biggest improvement comes from treating compilation as a predictable build process rather than trial and error.
Keep source files separate from compiled output.
Use consistent names.
Change one thing at a time when troubleshooting.
Keep known-working versions of your QC.
Most importantly, read compiler logs.
Crowbar is valuable not because it removes the Source compilation process, but because it makes that process easier to control and inspect. The underlying concepts—QC instructions, model paths, source meshes, material references, and StudioMDL output—still matter.
For Blender users, dedicated Blender Source Tools can also simplify SMD/DMX exporting and related Source workflows.
smf compile: Final Takeaway
smf compile is best understood as the process of preparing custom assets for Source Filmmaker’s Source-engine pipeline. For models, the usual workflow starts in a 3D application such as Blender, exports model or animation data as SMD or DMX, defines the build through a QC script, and runs that script through StudioMDL—often using Crowbar as the interface.
A successful model compile can generate an MDL plus supporting VVD and VTX files, while models with defined collision geometry may also produce PHY data. Valve’s StudioMDL documentation confirms these distinct output roles, which is why copying only an MDL is not always enough.
If something goes wrong, diagnose the stage rather than rebuilding everything. An invisible model often points toward paths or installation, purple-and-black surfaces usually suggest material references, a T-pose suggests skeleton or animation configuration, and an actual compile failure should send you straight to the StudioMDL/Crowbar log.
Once you can compile a simple prop reliably, move to rigged characters, animation sequences, physics, bodygroups, and more advanced QC features. That progression turns smf compile from a confusing collection of file extensions into a repeatable Source Filmmaker asset pipeline.