Adding Custom Models to Source Games

This is intended to be a very quick and simple tutorial for adding a custom model to the Source engine. This assumes you have a model ready to export in 3D Studio Max. You will need to download and install the SMD export plugin for 3DS Max for this.

1) Load the model into 3DS Max.

2) In 3DS Max, go to File -> Export, select SMD from the dropdown. Select the “Export Reference SMD” option. Export to a new directory.

3) Copy the toolbox folder to the new directory.
4) Export the Summary Info file in 3DS Max (File > Properties > Summary info. Press the “Save to File” button). Save to toolbox/summary_info.txt.

5) Run convert_3dr_scene_to_source.bat.
– During the conversion VTFEdit will open. Go to Tools -> Convert Folder to convert the TGA files to VTF format. Close VTFEdit when done to continue the conversion.

6) Open output.vmf in Hammer to view the model.

Output Example #1
Output Example #2

Note: This method uses prop_dynamic entities. If you wish to use prop_static entities you will need to edit the QC file to include the line $staticprop.

Old Manual Method 1) Load the model into 3DS Max. [Pic] 2) In 3DS Max, go to File -> Export, select SMD from the dropdown. Select the “Export Reference SMD” option. [Pic] 3) Create a .qc file for the SMD. Here is a very basic example:

$modelname "myprops/mini_car.mdl"
$cdmaterials "models/myprops"

$scale 1.0

$model "mini_car" "mini_car.smd"

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

3) Compile the model using GUI StudioMDL.
– You should now be able to preview the model in the SDK Model Viewer, albeit without materials. [Pic]
4) Each material will need a seperate VMT file. Here’s a very basic example.

"VertexLitGeneric"
{
        "$basetexture" "models\myprops\mini_car_doors"
}

– You should now be able to preview the model with materials in the SDK Model Viewer, or add it to your map. [Pic]

Problem and Fixes
1) My model displays blocky in the Source engine.
– Try selecting the “Alternate normals export method” option when exporting from 3DS Max.
2) When running the compiler I get a “filesystem.dll” error.
– This is usually caused by not having the SDK open when running the compiler.
3) My model is too small or too big.
– Change the “scale” setting in the QC file and recompile.

More Info
Shader Paramaters
QC Commands

One thought on “Adding Custom Models to Source Games”

Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.