So far, we have learnt that important models into the Source Engine, like any other games engine of a similar nature, is not a simply affair. Through spending time with the software however and performing research on the Internet, we have come up with a successful method of importing models into the engine without any problems.
Once a fully textured model has been constructed in the 3D Studio Max software, the item must be exported as a .MDL file, along with a .SMD file for frame structures and animations. Before this is possible however, the user must first install several plug-ins for 3Ds Max avalible from this website. When installed, it's possible to export .SMD and .MDL files from Max, both of which must be saved to an appropriate place on the computer.
The next step to importing models into the Hammer Editor is using .QC files and import software. First, a .QC file must be constructed either using software such as Crimson Editor, or a simple text based editor such as Notepad. The QC file is made so that the import software can read the model files, convert them and output them into Steam's 'Model' folder. Here is an example of a standard .QC file:
$modelname modelpath/exemple.mdl
$cdmaterials texturepath/
$scale 1
$body studio "model_ref.smd"
$origin X Y Z
$upaxis Y
$staticprop
$surfaceprop "glass"
$sequence idle "model_still" loop fps 1
$collisionmodel "model_phys.smd" {
$Mass 10
$concave
}
$keyvalues
{
"prop_data"
{
"base" "Type.Size"
}
}
$cdmaterials texturepath/
$scale 1
$body studio "model_ref.smd"
$origin X Y Z
$upaxis Y
$staticprop
$surfaceprop "glass"
$sequence idle "model_still" loop fps 1
$collisionmodel "model_phys.smd" {
$Mass 10
$concave
}
$keyvalues
{
"prop_data"
{
"base" "Type.Size"
}
}
Using a text editor such as Notepad allows users to edit several sections of the .QC file to relate to the machine they are using. For example, '$modelname modelpath/exemple.mdl' becomes '$modelname F:\Program Files\Steam\steamapps\username\half-life 2\hl2\Models\example.mdl.'
Once the .QC file has been saved and completed, it is possible to open it using Source Import software, such as GUIStudioMDL as an example. It's recommended all import software is saved in the SourceSDK's 'bin' folder. Once saved, run the software, use the config tools to link the importer with HL2 and The Orange Box's configuration folders, and then import the .QC file. As the .QC file was edited earlier to link with the chosen models, GUIStudioMDL will output the models into the Half Life 2 or Orange Box model folders depending on which is selected.
After this is completed, it will now be possible to place the models in the Hammer Editor by utilising the 'prop_static' entity and choosing the models in the model browser.