Get SFM ↗
Home / How to Compile SFM Models
02 / MODEL PIPELINE

How to Compile SFM Models

Build a Source-compatible model from your own 3D assets.

Wireframe and textured crate model side by side on a monitor

Follow a reproducible Source 1 model build, from a clean mesh to a validated asset. The example uses a simple prop named studio_lamp and can be adapted to your own files.

Prepare geometry

Use a simple prop for your first compile. Apply the appropriate transforms, inspect normals and UVs, and assign clearly named materials. For a rigged model, inspect vertex weights and bone names before exporting.

Export SMD or DMX

Install a Source-compatible exporter for your modeling software. Export a reference mesh and, if needed, a separate idle animation. Keep the original project and exports in separate folders.

Create your QC script

The QC file defines output location, reference geometry, material search path and sequences. Use the QC builder on this site as a starting point, then edit it to match your real file names.

Configure the compiler

Crowbar can run StudioMDL. Select the original Source Filmmaker game configuration and confirm the compiler executable and gameinfo.txt location. The correct executable depends on your installation.

Compile and inspect output

Read the first meaningful error if the build fails. A typical model build includes MDL, VVD and VTX files; optional physics files depend on the QC setup. Keep companion files together.

Validate in the model viewer and SFM

Check scale, materials and idle animation before importing into a large scene. Test under different light conditions and save a working backup.

Plan a small test asset

Start with one mesh, one material and a single idle sequence. Keep the polygon count reasonable, remove unintended duplicate geometry and check the object’s origin. For a static prop, choose a predictable orientation and scale before export. A character is a different challenge because skeleton and animation data must remain compatible across source files.

Use a consistent naming convention. A unique namespace such as mywork/lamp avoids collisions with installed assets. Maintain a source folder outside the game’s models directory so a compile cannot overwrite your original project.

Prepare a source folder

Create a project containing the original blend file, a reference export, a QC file, and optional animation exports. Save texture source images separately. For a first compile keep the QC and SMD in the same directory to minimize ambiguity in relative paths. Confirm the exporter actually generated the expected file and not an empty or incorrectly named export.

Read the minimal QC example

The modelname command specifies the path relative to the models directory. The body command names the mesh source, while cdmaterials gives a material search directory relative to materials. The sequence provides a simple idle. Use the reference mesh as a placeholder only when the compiler accepts it as a valid sequence source. Otherwise export a separate idle SMD with matching skeleton data.

Set Crowbar to the correct game

In Crowbar, inspect the selected game configuration. The compiler is generally located in the original SFM installation under game/bin. The selected game directory needs the relevant gameinfo.txt. Do not use another Source game compiler merely because it accepts a QC file: compiled formats and supported commands can differ. Save the settings and record the selected output location.

Inspect and install the output

After compiling, read the log and verify that the expected output was created or updated. A successful Source 1 build often includes MDL, VVD and one or more VTX files; PHY is optional. Keep all matching files together in the same model folder. Copy your VMT and VTF files into the corresponding materials hierarchy if your build process did not install them.

Test the model in a compatible model viewer if available, then load it in a fresh SFM session. Check the material, size and orientation, and try the idle sequence. If a later edit introduces a failure, compare against your last working QC and source export.

Move from props to characters

For a rigged character, ensure every exported animation uses a compatible skeleton, including bone names, parent relationships and reference pose. Add bodygroups, attachments or flexes one feature at a time. A minimal working version provides a useful baseline for diagnosing advanced features. Do not blindly copy command blocks from a model made for a different Source branch.

Example QC for a simple prop

$modelname "mywork/lamp.mdl"
$body "body" "lamp_ref.smd"
$surfaceprop "metal"
$cdmaterials "models/mywork/lamp/"
$sequence "idle" "lamp_ref.smd" fps 1
Input or outputExample
Reference meshlamp_ref.smd
Build instructionslamp.qc
Output modelmodels/mywork/lamp.mdl
Materialmaterials/models/mywork/lamp/lamp.vmt
Texturematerials/models/mywork/lamp/lamp.vtf

Frequently asked questions

Can I compile FBX directly?

For the traditional workflow, use a compatible exporter to produce SMD or DMX instead.

Why is my model purple?

The geometry may be valid while the material or texture path is wrong.

Does Crowbar replace StudioMDL?

No. Crowbar is a front end that invokes the target compiler.

References and next steps

Generate a QC template · Troubleshoot the build · StudioMDL reference.