SFM Compile

SFM Compile: The Complete Guide (2026)

You spent hours modeling a character. The topology is clean. The textures are sharp.

The rig is solid. You drag it into Source Filmmaker and you’re staring at a purple-and-black checkerboard, or worse, nothing at all.

That moment of confusion is nearly universal among new SFM creators.

The problem is almost never the model itself. It’s the compile process and more specifically, not understanding what that process does, why it exists, and how to execute it correctly.

Source Filmmaker doesn’t read FBX or OBJ files. It speaks an entirely different language: MDL, VVD, VTX, PHY.

These are proprietary Source Engine formats, and converting your assets into them requires a compiler, a QC file, and a working understanding of how Valve’s asset pipeline actually functions.

This guide covers everything from first principles to advanced optimization.

Whether you’ve never compiled a model in your life or you’re troubleshooting a stubborn compile error at 2 AM, you’ll find something useful here.

By the end, you’ll understand the full SFM compile workflow, know which tools to use and when, be able to write and debug QC files from scratch, and have a reliable process for compiling models, animations, and maps.

No filler. No hand-waving. Just the real workflow.

Read Also: BrassSmile.com: The Complete Review You Need Before You Visit

What is SFM Compile?

SFM Compile refers to the process of translating raw 3D assets โ€” models, skeletons, textures, animations โ€” into the binary file formats that Valve’s Source Engine can read and render.

The Source Engine was built by Valve in the early 2000s as the backbone of games like Half-Life 2, Team Fortress 2, and Portal.

It does not natively support common 3D formats like FBX, OBJ, or GLTF. Instead, it uses its own proprietary formats optimized for real-time rendering, physics simulation, and animation playback.

Source Filmmaker, released publicly in 2012, runs on this same engine.

That means everything you want to use in SFM โ€” every custom prop, character, or map โ€” must first be compiled into Source Engine formats before the software can recognize it.

The key distinction: importing vs. compiling. Importing moves a file from one location to another. Compiling transforms it from one format into a completely different set of formats. Compilation is not optional โ€” it’s a prerequisite.

Historically, Valve used this pipeline internally to compile assets for their own games.

The tools they built โ€” StudioMDL, VBSP, VVIS, VRAD โ€” were eventually included with Source SDK distributions, giving modders and creators access to the same pipeline.

Crowbar, a third-party front-end developed by the community, later made the process significantly more accessible.

The MDL pipeline in short:

Raw 3D Model (FBX/OBJ)
โ†“
Export to SMD or DMX
โ†“
Write a QC File (compiler instructions)
โ†“
Run StudioMDL / Crowbar
โ†“
Output: MDL + VVD + VTX + PHY + ANI
โ†“
Load in Source Filmmaker โœ“

๐Ÿ“Œ Did You Know? Valve compiled hundreds of thousands of assets using this exact pipeline across their game library. Every TF2 character, every HL2 prop, every Portal cube went through StudioMDL.


Quick Facts Table

PropertyDetail
DefinitionProcess of converting 3D assets into Source Engine binary formats
Primary KeywordSFM Compile
DifficultyBeginner to Advanced (depending on asset complexity)
Tools NeededCrowbar, StudioMDL, Blender, Notepad++, VTFEdit
Input FormatsSMD, DMX, QC, VTF, VMT
Output FilesMDL, VVD, VTX, PHY, ANI
Best CompilerCrowbar (GUI) or StudioMDL (CLI)
PlatformWindows
Typical Compile Time2โ€“30 seconds (simple props); 1โ€“5 minutes (complex rigs)
Skill Level RequiredIntermediate (basic text editing, file path knowledge)
EngineSource Engine (not compatible with Source 2)

How SFM Compilation Works

Understanding the mechanics of compilation helps you troubleshoot errors much faster. Here’s what actually happens when you click “Compile.”

Raw Asset Stage

Every compile starts with source files โ€” the assets you’ve created or acquired. These typically include:

  • A 3D model exported from Blender, Maya, or 3ds Max in SMD or DMX format
  • Texture files in VTF format (Valve Texture Format)
  • Material files in VMT format (Valve Material Type)
  • A QC file that tells the compiler how to assemble everything

The Compiler Stage

The compiler (StudioMDL) reads the QC file and uses it as a blueprint. It processes the model geometry, resolves bone hierarchies, packages animation sequences, links materials, and generates physics hulls โ€” all in a single pass.

Output Stage

After compilation, StudioMDL writes several binary files:

  • MDL โ€” the master model file, contains bone data, hitboxes, and model metadata
  • VVD โ€” vertex data (positions, normals, UV coordinates)
  • VTX โ€” optimized mesh strips for GPU rendering (DX90.VTX, SW.VTX)
  • PHY โ€” physics collision data (only if $collisionmodel is defined)
  • ANI โ€” external animation data (for models with many sequences)

All of these files must be present for SFM to load the model correctly. Missing even one will cause load failures or visual errors.

Text Workflow Diagram

[Blender / Maya]
โ†“ Export
[SMD / DMX Files] + [QC File] + [VMT / VTF Textures]
โ†“
[Crowbar / StudioMDL.exe]
โ†“ Compile
[MDL] [VVD] [VTX] [PHY] [ANI]
โ†“
[SFM Model Browser โ†’ Scene]

๐Ÿ’ก Pro Tip: Keep your source files (SMD, QC, textures) in a dedicated _source folder separate from your compiled output. This keeps your workspace clean and makes recompiling far less chaotic.


Files Used During Compilation

ExtensionFull NamePurposeRequired?Auto-Generated?Common Errors
.QCCompile ScriptBlueprint for compilerโœ… YesโŒ NoTypos, wrong paths, missing directives
.SMDStudio Model DataMesh and animation geometryโœ… YesโŒ NoWrong scale, broken normals
.DMXData Model ExchangeAlternative to SMD (Valve format)OptionalโŒ NoVersion mismatches
.VTFValve Texture FormatCompiled texture dataโœ… YesโŒ NoWrong dimensions, missing mipmaps
.VMTValve Material TypeMaterial shader definitionโœ… YesโŒ NoWrong shader, bad path
.MDLModel FileFinal compiled modelโœ… Outputโœ… YesCorrupt if compile fails mid-run
.VVDVertex DataVertex positions and UVsโœ… Outputโœ… YesMissing = model invisible
.VTXVertex CacheGPU-optimized mesh stripsโœ… Outputโœ… YesMissing = crash on load
.PHYPhysics ModelCollision and ragdoll dataOptionalโœ… YesWrong mass, broken joints
.ANIAnimation FileExternal animation sequencesOptionalโœ… YesOut of sync with MDL

โš ๏ธ Warning: Never manually delete individual output files and recompile only part of a model. Always recompile the full set to keep MDL, VVD, and VTX in sync. Mismatched output files cause crashes.


Software You’ll Need

Crowbar

Crowbar is a free, open-source GUI front-end for StudioMDL. It’s the recommended tool for most SFM creators because it eliminates the need for manual command-line input.

Advantages:

  • Visual interface with clickable compile options
  • Built-in log viewer for error diagnosis
  • Supports batch compilation (multiple QC files at once)
  • Can decompile existing MDL files for reference
  • Configurable to point to different engine versions

Disadvantages:

  • Still requires StudioMDL to be installed
  • Error messages mirror StudioMDL output (can be cryptic)
  • Occasional version-specific quirks

Rating: 9/10 โ€” Essential for beginners. Recommended for all experience levels.

StudioMDL

StudioMDL is Valve’s official model compiler, included with Source Filmmaker in the bin folder. It’s the actual engine doing the compilation โ€” Crowbar simply calls it.

Advantages:

  • Direct, authoritative output
  • Most detailed error messages
  • Useful for scripted or automated compile pipelines

Disadvantages:

  • Command-line only
  • Requires manual path management
  • Less accessible for beginners

Rating: 7/10 โ€” Use it directly when you need fine-grained control or when debugging Crowbar issues.

Blender

Blender is the most widely used 3D modeling tool in the SFM community. It’s free, actively developed, and has several plugins specifically designed for Source Engine export (Blender Source Tools by Artfunkel being the most important).

Rating: 9/10 โ€” The standard choice for most SFM creators.

VTFEdit

VTFEdit converts standard image formats (PNG, TGA, BMP) into VTF textures and generates VMT material files. Without it, your textures can’t enter the Source pipeline.

Rating: 8/10 โ€” Indispensable for texture work.

Noesis

Noesis is a model viewer and converter that handles hundreds of formats. It’s particularly useful for converting non-standard source files into SMD-compatible formats before compiling.

Rating: 7/10 โ€” Situationally very useful, especially when working with imported assets from other games.

GCFScape

GCFScape opens Valve’s VPK and GCF archive files, letting you extract assets from TF2, HL2, and other Source games. Great for studying compiled models and textures.

Rating: 8/10 โ€” Excellent learning tool. Use it to extract and study Valve’s own compiled assets.

Wall Worm

Wall Worm is a 3ds Max plugin suite for Source Engine export. If you use 3ds Max professionally, Wall Worm is the fastest path to the Source compile pipeline.

Rating: 8/10 โ€” Best-in-class for 3ds Max users.


Crowbar vs. StudioMDL: Which Should You Use?

FeatureCrowbarStudioMDL
InterfaceGUICommand Line
Ease of UseEasyIntermediate
Error OutputFormatted logRaw output
Batch Compileโœ… YesManual scripting required
Decompile Supportโœ… YesโŒ No
SpeedSame (calls StudioMDL internally)Same
AutomationLimitedFully scriptable
Best ForBeginners, daily workflowAdvanced users, CI pipelines
Version SupportMultiple Source gamesEngine-specific
Community SupportLargeSmaller

Verdict: Use Crowbar for day-to-day compilation. Use StudioMDL directly when you need to automate builds, troubleshoot Crowbar-specific issues, or script compile pipelines.


Understanding QC Files

The QC file is the heart of the compile process. It’s a plain text file that tells StudioMDL exactly how to build your model. Without a valid QC file, compilation cannot begin.

Here’s a breakdown of the most important QC directives:

$modelname

$modelname "props/my_crate.mdl"

This sets the output path for the compiled MDL file, relative to the models folder in your game directory. Get this path wrong and your model will compile to an unexpected location โ€” or not be findable by SFM at all.

$body

$body "Body" "my_crate_reference.smd"

Defines the main geometry of the model. The first argument is an internal label; the second is the path to your SMD or DMX file. For complex models with multiple body groups (like characters with different cosmetic options), you’ll add multiple $body or $bodygroup entries.

$cdmaterials

$cdmaterials "models/props/my_crate/"

Points the compiler to the folder where your VMT material files live. If this path is wrong, Source Filmmaker won’t find the materials โ€” resulting in the infamous purple-black checkerboard. This is the single most common cause of texture errors.

$sequence

$sequence "idle" "my_crate_idle.smd" fps 30

Defines animation sequences. The fps value controls playback speed. Static props don’t need sequences, but any rigged character should have at least an idle sequence.

$collisionmodel

$collisionmodel "my_crate_collision.smd" {
$mass 50
$concave
}

Adds physics collision data. The collision SMD should be a simplified version of your model โ€” low-polygon and convex where possible. The $mass value affects how the physics engine treats the object.

$surfaceprop

$surfaceprop "wood"

Assigns a surface material type. This determines the sound effects played when the object is hit, shot, or walked on. Valid values include wood, metal, concrete, flesh, and others defined in surface_properties.txt.

$staticprop

$staticprop

Marks the model as a static prop โ€” one with no animations or physics interactions. This enables additional GPU optimizations and allows the model to be baked into map lighting. Always use this for non-animated props.

Full Example QC File

$modelname "props/my_crate.mdl"
$cdmaterials "models/props/my_crate/"

$body "Body" "my_crate_reference.smd"
$collisionmodel "my_crate_collision.smd" {
$mass 50
}

$surfaceprop "wood"
$staticprop

$sequence "idle" "my_crate_idle.smd" fps 30

๐Ÿ’ก Pro Tip: Valve’s compiled models are a treasure trove of real QC examples. Use Crowbar to decompile any default TF2 or HL2 prop and study the QC file structure โ€” it’s one of the fastest ways to learn.


Complete Step-by-Step SFM Compile Tutorial

Step 1: Plan Your Asset Pipeline

Before touching any software, decide what you’re compiling: a static prop, a rigged character, an animated sequence, or a map. Each has a different pipeline. This guide focuses primarily on models.

Step 2: Create or Acquire Your 3D Model

Open Blender (or your 3D software of choice). Build your model with Source Engine constraints in mind:

  • Keep polygon count reasonable (under 10,000 for props; under 50,000 for characters)
  • Use clean topology โ€” no n-gons, minimal triangulation issues
  • Apply all transforms before export (Scale, Rotation, Location โ†’ Apply All)

Step 3: Install Blender Source Tools

Download the Blender Source Tools plugin from Artfunkel’s GitHub. Install it via Edit โ†’ Preferences โ†’ Add-ons โ†’ Install. This adds SMD and DMX export support to Blender.

Step 4: Set Up Your Rig (If Needed)

For animated models, create an armature in Blender using Source Engine bone naming conventions. The root bone should be named ValveBiped.Bip01_Pelvis for humanoid characters (if matching Valve’s skeleton). For custom rigs, any naming convention works โ€” just stay consistent.

Step 5: Export Your Model as SMD

Go to File โ†’ Export โ†’ Source Engine SMD/VTA/DMX. Export the reference mesh as a separate file (e.g., my_model_reference.smd). If you have a collision mesh, export it separately (e.g., my_model_collision.smd).

โš ๏ธ Warning: Always apply scale before exporting. A model exported at the wrong scale is a common beginner error. In Blender: Object โ†’ Apply โ†’ All Transforms.

Step 6: Prepare Your Textures

Create your textures in Photoshop, GIMP, or Krita. Save them as TGA or PNG files at power-of-two resolutions (256ร—256, 512ร—512, 1024ร—1024, 2048ร—2048).

Step 7: Convert Textures to VTF

Open VTFEdit. Go to File โ†’ Import and select your texture file. Configure the settings (DXT1 for opaque textures, DXT5 for transparent). Save as a VTF file in your materials folder.

Step 8: Create VMT Material Files

For each texture, create a matching VMT file. A basic VMT looks like this:

"VertexLitGeneric"
{
"$basetexture" "models/props/my_crate/diffuse"
"$surfaceprop" "wood"
}

Place VMT files in the materials folder matching the path specified in $cdmaterials.

Step 9: Organize Your Folder Structure

steamapps/common/SourceFilmmaker/game/
โ”œโ”€โ”€ models/
โ”‚ โ””โ”€โ”€ props/
โ”‚ โ””โ”€โ”€ my_crate.mdl (output)
โ”œโ”€โ”€ materials/
โ”‚ โ””โ”€โ”€ models/
โ”‚ โ””โ”€โ”€ props/
โ”‚ โ””โ”€โ”€ my_crate/
โ”‚ โ”œโ”€โ”€ diffuse.vtf
โ”‚ โ””โ”€โ”€ diffuse.vmt
โ””โ”€โ”€ _source/
โ”œโ”€โ”€ my_crate_reference.smd
โ”œโ”€โ”€ my_crate_collision.smd
โ””โ”€โ”€ my_crate.qc

๐Ÿ’ก Pro Tip: Keep all source files (SMD, QC) in a _source folder outside the compiled output directories. This prevents confusion between input and output files.

Step 10: Install and Configure Crowbar

Download Crowbar from GitHub. Open it and navigate to the Set Up Games tab. Add Source Filmmaker as a game and point it to studiomdl.exe in the SFM bin folder. Verify the path is correct before proceeding.

Step 11: Write Your QC File

Create a new text file in Notepad++ and write your QC directives (see the QC Files section above). Save it as my_crate.qc in your _source folder.

Step 12: Validate QC Paths

Before compiling, manually check every file path in your QC file against your actual folder structure. Paths in QC files are case-sensitive on some systems. A single mismatched filename will stop compilation.

Step 13: Open Crowbar and Load Your QC File

In Crowbar, click the Compile tab. Click Browse next to the QC file field and select your QC file. Verify the game configuration is set to Source Filmmaker.

Step 14: Run the Compile

Click Compile. The log window will display real-time output from StudioMDL. Watch for lines beginning with ERROR: or WARNING:. A successful compile ends with QC files compiled OK.

Step 15: Check the Compile Log

Even a successful compile may show warnings worth addressing โ€” things like missing LOD references or unused bones. Note any warnings and decide whether they require action based on your use case.

Step 16: Locate the Output Files

Navigate to your models output folder and confirm that MDL, VVD, VTX, and (if applicable) PHY files were generated. If any are missing, the compile failed partially โ€” check the log for the cause.

Step 17: Load the Model in SFM

Open Source Filmmaker. In the Model Browser, navigate to your model’s path. Load it into a scene. Check that it appears correctly with no missing textures, distorted geometry, or visual artifacts.

Step 18: Test Animations and Physics

If your model has animations, scrub through the sequences to verify playback. If it has physics (ragdoll or prop physics), test it in the physics simulation. Broken bones or jittery physics are usually signs of a malformed collision model.

Step 19: Fix and Recompile

Address any issues, fix the source files or QC, and recompile. Always recompile the full model โ€” never replace individual output files manually.

Step 20: Archive Your Source Files

Once the model works correctly, create an archive of your source files (SMD, QC, source textures). Include a README with notes on the compile configuration. Future-you will be grateful.


Compiling Models

Model compilation is the most common SFM compile task. Here are the key considerations and best practices specific to model assets.

Common mistakes during model compilation:

  • Exporting with incorrect scale (most often seen as a model that’s 100ร— too large or too small)
  • Leaving n-gons in the mesh (StudioMDL expects triangulated or quad geometry)
  • Forgetting to apply transforms in Blender before export
  • Using texture dimensions that aren’t powers of two
  • Listing incorrect material paths in $cdmaterials

Optimization tips:

  • Keep polygon counts as low as possible without sacrificing visual quality
  • Use LOD (Level of Detail) models for props that appear at varying distances
  • Merge mesh elements where possible to reduce draw calls
  • Use a single material where feasible โ€” multiple materials mean multiple draw calls per model

Compiling Animations

Animation compilation follows the same pipeline as model compilation, with some important additions.

How Animation Compiling Works

Animations are embedded in the compiled MDL file through $sequence directives in the QC file. Each sequence references an SMD or DMX file containing animation keyframes.

$sequence "walk" "animations/walk.smd" fps 30 loop
$sequence "run" "animations/run.smd" fps 30 loop
$sequence "idle" "animations/idle.smd" fps 30 loop

The loop flag tells the engine to loop the animation seamlessly. Remove it for one-shot animations like death sequences.

DMX vs. SMD for Animations

FeatureSMDDMX
Human Readableโœ… YesPartially
Animation CurvesLimitedโœ… Full support
Facial AnimationโŒ Noโœ… Yes
Blender Supportโœ… Fullโœ… Full
Valve PreferenceOlderModern
Flexes/MorphsโŒ Noโœ… Yes

Recommendation: Use DMX for character animations (especially facial animations). Use SMD for simple prop animations or when working with older plugins.

๐Ÿ’ก Pro Tip: SFM’s internal animation system (using the DMX-based session format) is separate from compiled model animations. Model animations (compiled via QC) are baked sequences. SFM’s timeline lets you blend and layer these.


Compiling Maps

Map compilation uses a different set of tools than model compilation. Source maps go through a three-stage compile process.

Stage 1: VBSP (Visibility Binary Space Partitioning)

VBSP converts your Hammer Editor map (VMF format) into the BSP binary format. It splits the world geometry into a tree structure that the engine uses to determine visibility and rendering order.

Stage 2: VVIS (Visibility)

VVIS calculates the Potentially Visible Set (PVS) โ€” which areas of the map can see which other areas from any given point. This dramatically reduces rendering load at runtime. VVIS is the most time-consuming compile stage for complex maps.

Stage 3: VRAD (Radiosity)

VRAD calculates static lighting and shadows. It bounces light around the scene (radiosity) to produce realistic indirect illumination. VRAD is computationally expensive โ€” full compiles of large maps can take hours.

Fast Compile vs. Full Compile

StageFast CompileFull Compile
VBSPSame speedSame speed
VVISApproximate PVSPrecise PVS
VRADLow-quality lightingFull radiosity
TimeMinutesHours
Use ForTestingFinal build
Lighting QualityDraftProduction
HDR SupportโŒโœ…

โš ๏ธ Warning: Never ship a map compiled with fast compile settings. Fast-compile lighting is for iteration only โ€” it looks noticeably worse and won’t render correctly in some lighting scenarios.


Common SFM Compile Errors

ErrorMeaningCauseSolutionDifficulty
Purple-black checkerboardMissing textureWrong $cdmaterials path or missing VTFFix path in QC; ensure VTF existsEasy
ERROR: c0001 (file not found)SMD file missingPath in QC doesn’t match actual file locationFix file path in QCEasy
Model appears at wrong scaleScale mismatchTransforms not applied before exportApply all transforms in Blender before exportEasy
WARNING: empty sequenceNo animation dataSMD animation file is blank or incorrectly exportedRe-export animation from BlenderMedium
Bones don’t moveBone naming issueBones not named correctly or hierarchy brokenCheck armature against Source conventionsMedium
ERROR: Exceeded max vertsModel too complexPolygon count exceeds Source Engine limitsReduce polygon count or split modelMedium
Model invisible in SFMMissing VVD fileCompile failed mid-runRecompile; check for errors in logEasy
SFM crashes on model loadCorrupted MDLPartial compile or disk errorDelete all outputs and recompile freshMedium
ERROR: physics model not validBad collision meshCollision SMD has open edges or too many polysSimplify and close collision meshMedium
Material not foundVMT missingVMT file not in correct folderPlace VMT in path matching $cdmaterialsEasy
Texture seams visibleUV issuesIncorrect UV unwrap or VTF compression artifactsFix UV map in Blender; try DXT5 compressionMedium
ERROR: too many bonesBone limit exceededModel has more than 128 bonesMerge or remove unnecessary bonesHard
Ragdoll explodes in physicsBad PHYCollision model intersecting with itselfSimplify physics mesh, check for overlapsHard
Animation plays at wrong speedFPS mismatchfps value in QC doesn’t match exportMatch FPS in QC to Blender export settingsEasy
WARNING: no LODNo LOD definedModel has no level-of-detail meshesNot an error; add LODs for optimizationLow
Model z-fightingOverlapping polygonsTwo surfaces occupying same spaceSeparate overlapping geometryMedium
Wrong material assignedMaterial ID mismatchFace groups not matching VMT orderCheck material slots in BlenderMedium
Flexes not workingFlex compile errorDMX flex data not correctly formattedRe-export flexes from Blender Source ToolsHard
ERROR: studiomdl not foundCrowbar misconfiguredStudioMDL path not set in CrowbarSet correct studiomdl.exe path in CrowbarEasy
Compile hangs indefinitelyInfinite loop in QCCircular reference or corrupt SMDCheck QC for self-referencing sequencesHard

๐Ÿ”ง Quick Fix: When you get a compile error you don’t understand, paste the exact error message into Google or the Valve Developer Community wiki. The VDC has documented almost every StudioMDL error.


Beginner Mistakes to Avoid

  1. Not applying transforms before export. This creates scale and rotation issues that are confusing to debug.
  2. Writing QC paths from memory. Always copy-paste paths directly from your file explorer.
  3. Using texture sizes that aren’t powers of two. VTFEdit will accept them, but Source Engine will reject them or render them incorrectly.
  4. Compiling everything at once before testing anything. Compile in stages โ€” model first, then textures, then animations.
  5. Ignoring warnings in the compile log. Warnings often become errors in a future compile after a change.
  6. Deleting source SMD files after a successful compile. You’ll need them every time you recompile.
  7. Putting spaces in file or folder names. Source Engine has inconsistent handling of spaces in paths. Use underscores.
  8. Using the wrong shader in VMT. VertexLitGeneric is standard for models. LightmappedGeneric is for maps. Using the wrong one causes rendering issues.
  9. Forgetting $staticprop on non-animated models. Missing this flag wastes GPU resources.
  10. Skipping the collision model. Models without PHY data can’t interact with physics in SFM.
  11. Using too many materials on a single model. Each material is a draw call. Merge materials where possible.
  12. Not testing in SFM after every major change. Discovering errors early means fixing only one thing at a time.
  13. Copying QC files without updating paths. Every QC has unique file paths. A copied QC template will fail unless every path is updated.
  14. Exporting animated models as static. If your model needs animation, don’t use $staticprop.
  15. Not studying existing working models. Decompile a Valve model with Crowbar. Read its QC. Copy its folder structure. This shortcut saves days.

Best Practices for Clean Compile Workflows

Folder Organization

Maintain a strict separation between source files and compiled output:

_workspace/
โ”œโ”€โ”€ _source/
โ”‚ โ”œโ”€โ”€ models/
โ”‚ โ”œโ”€โ”€ textures/
โ”‚ โ””โ”€โ”€ qc/
โ””โ”€โ”€ output/
โ”œโ”€โ”€ models/
โ””โ”€โ”€ materials/

Naming Conventions

  • Use lowercase letters only
  • Replace spaces with underscores (my_crate not My Crate)
  • Prefix related files with a shared name (player_idle.smd, player_walk.smd, player_run.smd)

Texture Optimization

  • Use DXT1 for opaque textures (4:1 compression, no alpha)
  • Use DXT5 for transparent textures (higher quality alpha)
  • Keep specular maps in the alpha channel of the normal map where possible
  • Use 512ร—512 for small props; 1024ร—1024 for hero assets; 2048ร—2048 sparingly

Polygon Limits (Recommended)

Asset TypeRecommended Poly Count
Small PropUnder 2,000
Medium Prop2,000 โ€“ 8,000
Character8,000 โ€“ 25,000
Hero CharacterUp to 50,000
Collision MeshUnder 500

Version Control

Use Git or a similar version control system for your source files. Tag each successful compile with a version number. This lets you roll back when a new change breaks a model that was working.

Backup Strategy

Keep at least three copies of your source files: local, cloud (Google Drive or similar), and an occasional offline archive. Compiled output is reproducible from source files โ€” but the source files themselves cannot be recovered from compiled output alone (decompilation is lossy).


Advanced Optimization Tips

LOD (Level of Detail)

LOD models automatically swap to lower-polygon versions as the camera moves further away. This massively improves rendering performance in complex scenes.

$lod 400
{
replacemodel "my_model_reference.smd" "my_model_lod1.smd"
}
$lod 800
{
replacemodel "my_model_reference.smd" "my_model_lod2.smd"
}

LOD distances are in Source units (approximately 1 unit = 1.9 cm).

Physics Optimization

Keep collision meshes as simple as possible. For box-shaped objects, use a single convex hull. For complex shapes, use $concave sparingly โ€” concave collision is significantly more expensive to simulate.

Animation Optimization

Group similar animation sequences and use $weightlist to limit which bones animate during specific sequences. A walk animation that animates facial bones wastes processing time.

Material Batching

Where possible, combine multiple textures into a single atlas texture. One draw call per model is ideal. Every additional material multiplies the rendering cost.

Compile Speed

For large projects with many models, use Crowbar’s batch compile feature to process multiple QC files in a single session. Pair this with a consistent folder structure and you can recompile an entire asset library in minutes.


Checklists

โœ… Beginner Checklist

  • Blender Source Tools installed and configured
  • Crowbar installed and pointed to correct studiomdl.exe
  • VTFEdit installed
  • SFM installed and confirmed working
  • First simple static prop modeled and exported
  • VTF textures created and placed correctly
  • VMT files created with correct shader
  • QC file written with correct paths
  • First compile attempted
  • Model loaded and verified in SFM

โœ… Pre-Compile Checklist

  • All transforms applied in Blender
  • SMD/DMX files exported correctly
  • All texture paths correct and files present
  • QC file paths verified against actual folder structure
  • No spaces in any file or folder names
  • StudioMDL path correct in Crowbar
  • Output directories exist and are writable
  • Previous compile outputs cleared (for clean recompile)

โœ… Post-Compile / Troubleshooting Checklist

  • Compile log reviewed for errors and warnings
  • All output files present (MDL, VVD, VTX, PHY if needed)
  • Model loads without crash in SFM
  • No purple-black checkerboard textures
  • Animations play at correct speed
  • Physics behaves correctly
  • No visible z-fighting or mesh artifacts
  • Bones move correctly

โœ… Optimization Checklist

  • Polygon count within recommended limits
  • LOD models created for props used at distance
  • Textures use correct compression format
  • Collision mesh is simplified
  • $staticprop used on non-animated props
  • Material count minimized
  • No unused bones in rig
  • Source files archived and backed up

Frequently Asked Questions

What is SFM Compile, exactly?
SFM Compile is the process of converting raw 3D assets into the binary formats (MDL, VVD, VTX, PHY) that Valve’s Source Engine requires. Source Filmmaker cannot load models in standard formats like FBX or OBJ โ€” compilation is mandatory.

What’s the difference between Crowbar and StudioMDL?
StudioMDL is the actual compiler โ€” it does the work. Crowbar is a graphical interface that calls StudioMDL for you, so you don’t have to use the command line. Most creators use Crowbar; StudioMDL is used directly for advanced automation.

Why does my model show a purple-black checkerboard?
This means SFM can’t find the material files. Check your $cdmaterials path in the QC file and confirm your VMT and VTF files exist in the exact matching folder.

Can I compile FBX files directly?
No. StudioMDL does not support FBX. You must first export your model from Blender (or Maya/3ds Max) to SMD or DMX format using the appropriate export plugin.

Does SFM Compile work with Source 2?
No. Source 2 uses a completely different asset pipeline with different tools and formats. SFM runs on Source 1, and its compile tools are not compatible with Source 2 assets.

Leave a Reply

Your email address will not be published. Required fields are marked *