Introduction to QC Files in SFM
If you’ve ever tried compiling a custom model in Source Filmmaker and something broke—missing textures, no animations, or the model simply didn’t load—the problem often traces back to one file: the QC file.
The QC file is the backbone of the entire model compilation process. It tells the engine how to interpret your assets, where to find them, and how they should behave once imported. Without it, even the most detailed 3D model won’t function correctly.
Whether you’re just starting out or refining your workflow, understanding QC files is essential. This guide breaks everything down from basic structure to advanced usage—so you can compile models with confidence.
What Is a QC File?
A QC (QuakeC) file is a script used in the Source Engine to control how models are compiled. It acts as a set of instructions that links your raw assets—such as meshes, textures, and animations—to a final compiled model file (MDL).
Think of it as a blueprint. Your SMD or DMX files contain the raw data, but the QC file tells the compiler how to assemble everything into a usable format.
Without a QC file:
- Models won’t compile
- Animations won’t link
- Textures won’t load properly
In short, it’s the bridge between creation and functionality.
Where QC Files Fit in the Workflow
To understand QC files better, it helps to see where they sit in the pipeline.
Typical SFM Model Workflow:
- Create model in 3D software (like Blender)
- Export mesh and animations as SMD or DMX
- Write a QC file
- Compile using tools like Crowbar or Studiomdl
- Import compiled model into SFM
The QC file is the step that connects everything together. If anything is wrong here, the entire pipeline breaks.
Basic Structure of a QC File
A QC file is made up of commands. Each command tells the compiler what to do with specific assets.
Here’s a simple example:
$modelname "custom/character.mdl"
$body body "character.smd"
$cdmaterials "models/custom"
$sequence idle "idle.smd"
What This Means:
$modelname→ defines the output file$body→ links the main mesh$cdmaterials→ sets texture folder$sequence→ defines animation
Even a small mistake in this structure can cause sfm compile errors, so attention to detail is key.
Essential QC Commands Explained
$modelname
This command defines where your compiled model will be stored.
Example:
$modelname "custom/character.mdl"
Make sure the path matches your SFM directory structure. Incorrect paths are a common cause of missing models.
$body and $bodygroup
These commands assign mesh files.
$bodyis used for a single mesh$bodygroupis used when multiple variations exist
Use bodygroups when creating customizable models (like different outfits).
$cdmaterials
This tells SFM where to find textures.
Example:
$cdmaterials "models/custom"
If this path is wrong, your model will appear with missing textures.
$sequence
This command links animation files.
Example:
$sequence idle "idle.smd"
You can define multiple animations here, such as walking, running, or idle states.
$collisionmodel
Defines the physical collision of the model.
This is important for interaction and physics behavior.
$surfaceprop
Controls how the surface behaves (metal, flesh, wood, etc.).
This affects sound and physics interaction.
QC Files for Animations
Animations require precise setup in the QC file.
Key Points:
- Each animation must be defined using
$sequence - The skeleton must match the base model
- File paths must be correct
Common Mistake:
Using an animation exported with a different skeleton will break the model.
Advanced QC Features
Once you understand the basics, you can explore advanced features.
Bodygroups
Allow switching between model parts dynamically.
Flexes (Facial Animations)
Used for expressions and lip-syncing.
LOD (Level of Detail)
Reduces model complexity at a distance to improve performance.
Attachments
Used to link props or effects to specific points on a model.
How to Create a QC File (Step-by-Step)
A QC file is the control script that tells Source Filmmaker and the Source Engine how your model should be compiled, where assets are located, and how everything behaves after export.
If the QC file is wrong, nothing works properly—textures break, models don’t load, or animations fail. So building it correctly is the most important step in the entire SFM model pipeline.
Below is a clean, practical, step-by-step method to create a QC file from scratch.
Step 1: Prepare Your Model Files
Before writing anything, make sure your assets are ready.
You should already have:
- Model mesh exported as
.smdor.dmx - Animation files (if any)
- Texture files (
.vmtand.vtf)
These are usually exported from software like Blender or Maya.
Important:
Keep everything organized in folders like:
models/
materials/
animations/
Messy structure = QC errors later.
Step 2: Open a Text Editor
Now you need a proper editor to write your QC file.
Use:
- Notepad++ (recommended)
- Or any simple text editor
Avoid word processors like MS Word—they break formatting.
Step 3: Start with Basic QC Structure
Every QC file begins with core commands. Start simple.
Basic template:
$modelname "custom/my_model.mdl"
$body body "my_model.smd"
$cdmaterials "models/my_model"
$sequence idle "idle.smd" loop
What each line means:
$modelname→ where the final model will be saved$body→ main mesh file$cdmaterials→ texture folder path$sequence→ animation setup
Step 4: Add Model Name Properly
This is the output path of your compiled model.
Example:
$modelname "characters/hero.mdl"
Best Practice:
- Use lowercase only
- Avoid spaces
- Keep folder structure clean
Wrong naming = model won’t appear in SFM.
Step 5: Link Your Model File
Now connect your actual mesh.
$body main "hero_model.smd"
If you have multiple meshes:
$bodygroup body
{
studio "head.smd"
studio "body.smd"
}
Step 6: Set Texture Path
This is one of the most important steps.
$cdmaterials "models/hero"
Common mistake:
Wrong folder path → pink or missing textures in SFM.
Make sure your .vmt files are inside:
materials/models/hero/
Step 7: Add Animations (Optional but Important)
If your model has animations:
$sequence idle "idle.smd" loop
$sequence walk "walk.smd"
$sequence run "run.smd"
Tips:
- Always match skeleton across all animations
- Keep naming consistent
Step 8: Add Physics (Optional)
For interactive models:
$collisionmodel "physics.smd"
{
$mass 50
}
This controls how your model behaves physically in SFM scenes.
Step 9: Save QC File Correctly
Now save your file:
Rules:
- File name:
modelname.qc - Save as plain text
- Place it inside your project folder
Example:
hero.qc
Step 10: Compile the QC File in SFM
Now comes the final step—compiling.
Use tools like:
- Crowbar
- Studiomdl
Steps:
- Open Crowbar
- Select your QC file
- Click “Compile”
- Wait for output files
Step 11: Check Output Files
After compilation, you should get:
.mdl→ main model.vvd→ vertex data.vtx→ rendering data
Place them in:
usermod/models/your_folder/
Step 12: Test in Source Filmmaker
Open Source Filmmaker and:
- Refresh model browser
- Load your model
- Check textures and animations
If everything works → QC file is correct.
Common QC File Errors and Fixes
1. Missing File Paths
Cause: Incorrect file location
Fix: Double-check folder structure
2. Syntax Errors
Cause: Missing quotes or incorrect commands
Fix: Carefully review each line
3. Model Not Loading
Cause: Incorrect modelname path
Fix: Ensure correct directory
4. Missing Textures
Cause: Wrong materials path
Fix: Verify $cdmaterials
5. Animation Not Working
Cause: Incorrect sequence setup
Fix: Match skeleton and paths
Tools for Editing QC Files
Using the right tools can make a big difference.
Recommended:
- Notepad++
- Basic text editors (for quick edits)
Syntax highlighting helps catch errors quickly.
Beginner Mistakes to Avoid
- Wrong folder structure
- Missing quotation marks
- Incorrect export settings
- Ignoring compile logs
These small mistakes cause most issues in SFM compilation.
Advanced QC Techniques
For experienced users:
- Custom animation blending
- Complex multi-model setups
- Automated compile scripts
These techniques improve efficiency in large projects.
FAQs About QC Files
What does QC stand for?
QC stands for QuakeC, the scripting format used in Source Engine.
Can I edit a QC file after compiling?
Yes, but you’ll need to recompile the model.
Why is my QC file not working?
Most issues come from syntax errors or incorrect paths.
Do I need a QC file for every model?
Yes, every model requires a QC file for compilation.
Conclusion
Mastering QC files is one of the most important steps in working with Source Filmmaker. It’s the link between your creative assets and the final result inside the engine.
Once you understand how QC files work, you gain full control over your models, animations, and overall workflow. Errors become easier to fix, and your projects become more polished.
Start simple, experiment often, and refine your process over time. With practice, writing QC files will feel like second nature—and your SFM projects will reach a whole new level.

