Cleanup is going to take awhile, so the site is back up but editing has been disabled.
Model Compiling
From HalfLife 2 Knowledge Base
Compiling a model for the source engine
For this tutorial I'll use the model, located in the sourcesdk\cstrike_sample_content\model_sources\lamp
First thing is to make sure that you have you model saved as a .SMD with the appropriate .QC and .QCI files. Most likely if the model is not a player model then it wont have a .QCI file. Also another good rule of thumb would be to have your textures converted and the .VMT properties set, for creating source textures view the Creating Textures tutorial.
Your .QC file is what tells the compiler what, how, and where to compile. A basic .QC file would look like this, note any line beginning with a “//' denotes a remark.
// Output .MDL $modelname lamp/it_lantern1.mdl
// Directory of materials that the model uses $cdmaterials models/cs_italy
//Model properties $staticprop $surfaceprop "glass" $scale 1.0
// Base or Reference .SMD $body studio "./it_lantern1"
// sequences: all sequences are in $cd $sequence idle "it_lantern1" loop fps 15
// Physics data
$collisionmodel "it_lantern1_phys.smd" {
$Mass 100
$concave
}
- First remark is about the “$modelname” command. The “$modelname” command specifies where the model's name and final placement is going to be. You can leave the .MDL off the command and it'll work just the same.
- Second remark is the Materials path or where the textures are going to be. Make sure that these are set correctly or you'll get a pink checked model.
- Third remark is the properties of the model. What kind of model, for example does it move or is it stationary and how big do you want the model to be scaled during compilation.
- Forth remark tells the compiler what is the main model
- Fifth remark tells the compiler the sequences the model has. This compiles in the sequence command for the game the .SMD that corresponds to that command and how long that .SMD is executed and what event is derived from that sequence.
- Sixth remark contains the physics data, this tells the compiler what the models mass is, what the physics model is.
Once you have your .QC in order then you can start the compiler. The compiler for models is called studiomdl.exe. This file is located (assuming you are in Steam\steamapps\[your e-mail]\sourcesdk) in the bin folder you can run it by one of 2 ways through windows command prompt or a .BAT file. I'll show you how do it via the .BAT file. While in the bin folder create a .txt file and open it. Add this:
studiomdl.exe ..\cstrike_sample_content\model_sources\lamp\it_lantern1.qc pause
Then save it as a .BAT and run it. When you model compiles it will be placed in the models directory of your mod.
--Omega552003 03:50, 10 Nov 2004 (EST)

