when exporting sfm models from blender back into sfm, what's the whole export path thing…
- User
when exporting sfm models from blender back into sfm, what's the whole export path thing about?
- Assistant
When exporting models from Blender back into Source Filmmaker (SFM), the "export path" refers to the directory structure and formats required by SFM to properly recognize and use the models. Here’s a breakdown of what it involves:
-
Model Export Format: SFM primarily uses the Source Engine's model format, which involves several specific files:
.smd/.dmxfor model data,.vtafor facial flexes, and the final compiled.mdlfile along with several auxiliary files like.vtx,.vvd, etc. -
Export Path in Blender: When exporting from Blender, you typically save your model in an intermediary format compatible with the Source Engine tools, such as
.smdor.dmx. During the export, you specify an output directory. It's important that these files are organized correctly to ensure they can be compiled without errors. -
Directory Structure: The directory structure is crucial for the subsequent steps. Generally, this structure looks something like this:
- Models Directory: Usually something like
models/your_model_name/ - Materials Directory: Typically
materials/models/your_model_name/
- Models Directory: Usually something like
-
Model Compilation: The next step involves compiling the exported
.smdor.dmxfiles using a tool likeCrowbaror the Source SDK tools. This process converts your intermediary files into the Source Engine’s.mdlformat. During compilation, the tool needs to know where to find the various assets, which is where the export path becomes relevant. -
QC File: A critical component in model compilation is the QC (
.qc) file, which is a script used by the Source Engine’sstudiomdlcompiler to define how to compile the model. This file includes paths to the model data, textures, hitboxes, animations, etc. Example:$modelname "your_model_name/your_model.mdl" $body "body" "your_model.smd" $cdmaterials "models/your_model_name/"$modelnameshould match the directory structure where the compiled model will go.$bodyshould point to the exported model file.$cdmaterialsshould reflect the path to the textures.
-
Material Path: Textures and materials for the model must reside in the correct directory structure within the
materialsfolder. The paths specified in your Blender export settings and the QC file should correspond to this structure.
Workflow Example:
-
Export from Blender:
- Export your model as
your_model.smdto a directory likeC:/sfm_export/models/your_model_name/. - Export textures to
C:/sfm_export/materials/models/your_model_name/.
- Export your model as
-
QC File Setup:
$modelname "your_model_name/your_model.mdl" $body "body" "your_model_name/your_model.smd" $cdmaterials "models/your_model_name/" -
Compile using Crowbar (or another compiler):
- Point Crowbar to the directory with your QC file.
- Compile the model, specifying the correct game directory as the output path.
-
Placement:
- Place the resulting files (
.mdl,.vtx,.vvd, etc.) in the SFMgamedirectory structure, typically something likeSteam/steamapps/common/SourceFilmmaker/game/usermod/models/your_model_name/. - Place the texture files in
Steam/steamapps/common/SourceFilmmaker/game/usermod/materials/models/your_model_name/.
- Place the resulting files (
Following these steps ensures that SFM can find and correctly use your model and its associated textures. The "export path" primarily helps keep all the necessary files organized and correctly referenced throughout the process.
-