The QC file, short for Quake C model script, doesn't exist by default for compiled models in Source Filmmaker (SFM) or other Source Engine games. Instead, QC files are used during the creation and compilation process of a model. You typically create a QC file yourself when you're ready to compile a new model or when modifying an existing one.
When you export model and animation data (as SMD or DMX files) from a 3D modeling program like Blender, you must create a QC file that tells the Source Engine how to put those pieces together into the final .mdl file. The QC file is a plain text script that contains various commands and parameters, such as model names, texture locations, sequence definitions, hitbox sizes, and bone data, among others.
Here's an example of what a simple QC file might look like:
$modelname "my_models/custom_model.mdl"
$body myBody "custom_model_reference.smd"
$staticprop
$surfaceprop "flesh"
$cdmaterials "models/custom_model/"
$sequence idle "custom_model_idle.smd" loop fps 30
$collisionmodel "custom_model_physics.smd" {
$mass 100.0
$inertia 10.00
$damping 0.01
$rotdamping 1.50
}
The precise content of the QC file will vary based on the complexity of your model and the features you want it to have.
To create a QC file:
-
Write the QC File: Use a text editor (like Notepad++, Visual Studio Code, or Sublime Text) to write your QC file according to your model's requirements. Ensure that all references to SMD or DMX files, texture directories, animations, and other elements are correct.
-
Save the QC File: Save the file with the .qc extension in the same directory as your model's SMD or DMX files, usually this is a working directory you've set up for compiling models.
-
Compile the Model: Use a tool like Crowbar to compile your model with your QC file. Crowbar will read the QC file, take the assets referenced within (SMD/DMX files, textures, etc.), and compile everything into the final model files (MDL, VVD, PHY, etc.) that Source Engine can use.
After you've compiled the model using the QC file, you can place the compiled files into the usermod folder of SFM, as explained in previous steps.
Remember, a QC file is a critical part of the model compilation process for Source Engine. If you're modifying an existing SFM model, you won't have its original QC file, so you might need to create a new one based on the modifications you've made to the model. Community resources, documentation, and examples can help you craft the QC with the correct parameters for your project.