Creating a simple model for HL2 with StudioCompiler

The first step in creating a model for HL2 is to design the model in a 3d application and texture it. Once this has been completed you need to export the textured model to create a SMD file. This is a text file which contains all the information about the model that is required by HL2. For a simple model we only export a reference SMD. Animation SMD's are only required if the model is going to be animated in the game.

After the previous step  you should have two files, a SMD file exported from a 3d app and a texture file. The texture file should be in TGA format. Do not try and compile a model if it is untextured. Studiomdl and StudioCompiler throw out all untextured polygons in the model, so you will end up with an empty file.

Start up Studiocompiler and go to the material compile window. Drag the TGA file into the materials window. By default Studiocompiler will compile the texture into the materials/models directory. If you want to use a subdirectory for your texture then specify it in the "Compiled Material Directory" box. If you are compiling for a model make sure the shader is set to VertexLitGeneric. Your studiocompiler window should look as follows:

Press compile and a status window should pop up. If everything goes well it should look like the following:

You now have a compiled texture for your model. The next step is to create the model files. Switch to the model compile tab and drag the SMD file you created into the reference SMD window. Select the type of model you are creating in the "Mode Type" window. On your first model this should be a prop_static or prop_physics depending on how you want to use it. Make sure the animation and collision boxes have the "Use Reference SMD" selected unless you have created a separate collision model and animations. Your StudioCompiler window should look as follows:

If you are creating a prop_physics then you need to set the physical parameters for the model. Press the "Model Options" button. This will bring up the following window

In the "prop_physics type" type window set the type model. These type are specified in scripts/propdata.txt. Some of the common types are wooden.small, wooden.medium, wooden.large, metal.small, metal.medium, metal.large, stone.small, etc, etc. Also set the mass of the object and if you want to increase or decrease the size of the model enter the desired value in the "Scale" box.

Press the compile button and another status window will pop up. If everything goes well you should have a window which looks like the following:

To view your model in HLMV press the "View Model" button. You will see the following:

For more questions visit the