Tutorial 3: Compiling a prop_physics


A Physically-simulated single-collision (for a multiple-piece-collision object go to simple ragdoll tutorial) entity that can be moved around the world, and can be broken into gibs.

Step1: Open Studiocompiler and configure your gamedir and SDK paths

Step2: Create your custom model path with final model name Example:
"\mymodels\mymyphysicsprop.mdl"
REMEMBER to create this directory in your game folder!:
C:\Program Files (x86)\Steam\steamapps\ACCOUNT\counter-strike source\cstrike\models\mymodels\

Step3: Click material compile tab and go into the "Compiled material directory" and put in the same path for materials as we did back in the materials compile stage:"\mymodels\". Only difference here is that this field is relative to materials\models

Switch back to the Model compile tab.

Step4: Select "model type" to "prop_physics"

Step5: Push the Model options button.
-Choose your prop_physics type (find names in the game GCF file: *game*\scripts\propdata.txt ) Propdata handles things like dragging sounds, friction, damage, generic gibs, flammable, and explosive.
-Choose your model surfaceprop (find names in the game GCF file: *game*\scripts\surfaceproperties.txt ) Make sure it matches your prop_physics type. For example of your prop physics type is Wooden.Small then use "wood" for your surface prop.
-Set your objects mass in kilograms
-Choose any gib models if breakable (these have to made first )
-Set any LOD models. You might want to revisit this after finishing your model to get a better idea for activation distance. More info here on LODs
-Set any skins and follow the instructions on the dialog. It mentions about only one texture. For more check this page out: Creating Multiple Skin Combinations

Step6: Click add under the sequences section to add your animation sequences. Add the sequence SMD, set the animation rate. You should include an idle sequence first (which can be the reference mesh itself)

Step7: Select your reference SMD

Step8: Select your collision SMD (if your model is simple enough just check the "use reference SMD box" Optional step: If you need to change the names of the textures in your model for whatever reason or verify the status click "SMD info/edit" for info and replacement options.

Step9: Compile the model

Step10: Open Model viewer (HLMV) from the source SDK and verify the model is working. For a prop_static do this checklist:

Model Prototyping: Prop_Physics need to be tested in game to see how they interact with the world. Place the model in hammer as a "Prop_Physics_Override" and test it out in your test map. This way you can do quick changes in hammer and then when you have decided on your final prop properties you can then remake/edit the QC with the appropriate propdata or override changes. More on prototyping and prop_data here.

Final steps:You can recompile the model with changes as Studiocompiler remembers all the settings of your last model. If you need to do any manual edits such as animation rate changes, multiple skin combinations or LOD distances, you can find the generated QC file in the same directory as your reference mesh with the same name. Edit this file with a text editor, and then open it in Studiocompiler with the "compile w/Existing QC"

Tutorial 4: Compiling a Simple Ragdoll

Tutorial 5: Compiling a Full Character Ragdoll