So if I want to decompilea a sfm model in crowbar, I...
Assistant
To decompile an SFM (Source Filmmaker) model using Crowbar, you'll need to follow these steps:
Install Crowbar:
Make sure you have Crowbar installed on your computer. Crowbar is a Source Engine modding tool used to decompile and compile models. You can usually find it on websites like GitHub or other modding communities.
Prepare the Model:
Locate the model file you want to decompile. It usually has a .mdl extension and is found in a game's model directory.
Set Up Crowbar:
User
right, I've done it. how do I get it into blender?
Assistant
Once you've decompiled your SFM model into its component files (such as SMD or DMX for the mesh and VTF/VMT for the textures), you can import it into Blender by following these steps:
:
User
Okay, if I want to edit it in blender, then export it back into sfm, what do I do?
Assistant
User
engine path?
Assistant
In the context of compiling models for Source Filmmaker (SFM) or Source engine games, the "engine path" refers to the directory where the game or toolset's binaries and related content are located. This path is necessary for tools like Crowbar to properly compile or decompile models, as it tells the tool where to find game-specific files like materials, textures, and other resources.
Here’s how to set or locate the engine path for Source Filmmaker:
Locate the SFM Installation Directory:
Source Filmmaker is typically installed through Steam, so you will find it in your Steam library.
The default installation path is often something like:
Open Crowbar. Make sure you set the appropriate game path in Crowbar's setup so it knows where to find your game files.
On the main interface, navigate to the "Decompile" tab.
Select the Model:
Click the "Browse" button to select the .mdl file you wish to decompile.
Choose Output Folder:
Specify a folder where you want the decompiled files to be saved. This will typically be a new folder where the decompiled assets and source files will be exported.
Decompile the Model:
Click on the "Decompile" button. Crowbar will start the decompiling process, extracting various model components such as the reference SMD files, QC file, and textures if possible.
Check the Decompiled Files:
Once the process is complete, navigate to the folder you selected as the output to view the decompiled files. You should find the model's source files, which can be used for further editing or recompiling.
Remember that decompiling models from certain games might have legal implications unless it's for personal use or you have permission from the model creators. Always verify the legality of your actions when using tools like Crowbar.
Prepare Blender
Ensure Blender is installed on your system. You will also need an import plugin to handle SMD or DMX files, such as the Blender Source Tools.
Install Blender Source Tools:
Download Blender Source Tools from the Blender Market or the GitHub page.
Open Blender, and go to Edit > Preferences.
In the Preferences window, navigate to Add-ons.
Click Install and locate the .zip file for Blender Source Tools.
After installation, enable the add-on by ticking its checkbox.
Importing the Model:
Open Blender and go to File > Import.
If you installed Blender Source Tools, you should see options like Source Engine (.smd, .vta, .dmx, .qc).
Choose the format that matches the decompiled files you have (e.g., SMD or DMX).
Navigate to the folder where your decompiled files are saved, and select the appropriate mesh file (usually the one with the reference model).
Import the mesh into Blender.
Applying Textures:
If your model uses textures, you'll need to manually load them in Blender.
In the Blender 3D Viewport, switch to the Material Properties tab.
Create a new material or select the existing one.
Use the Shader Editor to add an Image Texture node.
Load the model’s texture files (converted to a format Blender can use, like PNG or JPG if needed).
Connect the Image Texture node to the appropriate input on the Principled BSDF node to apply the texture.
Adjusting Materials and Lighting:
You may need to adjust materials and lighting in Blender to ensure the model looks correct.
Use the Render Preview mode to see real-time lighting and shading effects.
Final Adjustments:
Adjust any additional settings, such as bones or animations, if they were imported.
Save your Blender project for future use.
With these steps, your decompiled SFM model should be successfully imported into Blender, allowing for edits, rendering, or any other manipulations you may wish to perform.
To edit a model in Blender and export it back to Source Filmmaker (SFM), you'll need to follow a specific workflow to ensure the model is correctly formatted for the Source engine. Here's how you can do it:
Edit in Blender:
Modify your model as needed in Blender. This could include changes to the mesh, UV mapping, textures, or animations.
Check Armature and Weighting:
Ensure the armature (skeleton) is properly set up if your model uses one. The bone names and hierarchy should match the original model.
Confirm that vertex weights are correctly assigned if your model is rigged. This will ensure proper deformations during animations.
Export as SMD or DMX:
Once edits are complete, you need to export the model from Blender in a format that Source can recognize, typically SMD or DMX.
Go to File > Export and choose Source Engine (.smd, .dmx).
Export the reference mesh, animations, and any shape keys as needed, ensuring they are saved into the directory where your QC file will expect them.
Prepare Texture Files:
Make sure your model’s textures are in a format the Source engine can use, usually VTF. Convert any new or edited textures into this format using a tool like VTFEdit.
Create or Edit the QC File:
The QC file is a Source engine script that compiles your model. You might need to edit the existing QC file or create a new one to reflect the changes made.
Ensure paths to the model, material, and texture files are correct.
Define sequences if you have animations, and make sure all paths correspond to your exported SMD/DMX files.
Compile the Model:
Use Crowbar or another compatible compiler to compile your model. In Crowbar, go to the "Compile" tab, select your QC file, and specify an output folder.
Press the "Compile" button. This will generate the MDL and related files necessary for the Source engine.
Test in Source Filmmaker:
Move the compiled files (MDL, PHY, VTX, VVD, etc.) to the appropriate models directory in your SFM installation, following the directory structure used in the QC file.
Launch SFM and test the model by loading it into a scene to verify that it appears and operates correctly.
By following this process, you can successfully edit a model in Blender and export it for use in Source Filmmaker. Make sure to double-check all paths and file formats to avoid errors during compilation and in SFM. Additionally, keep backups of original files in case adjustments are needed.
Inside the SourceFilmmaker\game directory, you have subdirectories for different mod and content folders such as usermod, workshop, and others.
The usermod folder is commonly used for custom models and assets you compile or create.
Set the Engine Path in Crowbar:
Open Crowbar and go to the "Set Up" tab.
You'll find a field to specify the "Game Path" or "Engine Path."
Set this path to C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod (or the appropriate mod folder you are working with).
Verify Game Configuration:
Under the game configuration or when dealing with multiple games, ensure you select SFM as the target to ensure correct model formats and paths are used.
By setting the engine path correctly, Crowbar can access the necessary resources and you can streamline the model compilation process, ensuring assets end up in the desired directories for your use in Source Filmmaker.