Making a Half-Life MDL model using MilkShape3D

1. Preparation.


Create a directory, e.g. mymodel, place all textures you are going to use there. If you do not want to use textures, place a dummy texture file there (e.g. 1x1 white image). All files should be in 8-bit (256-color) bmp format.

2. Create the model.

There are many tutorials on Milkshape's website and elsewhere about creating models. We use a trivial example The important rules for generating mdl files are: a) everything should be trextured, even if the texture is trivial; b) all vertices should be assigned to a bone (called joint in Milkshape) even if there is only one for the whole object. Open MikShape3d.
On Model tab on the right click on Cylinder button.
Click and drag on one of the pane to create a cylinder.
Click on Joint button, and click someplace inside cylidner to create a bone.
Click on Select button; on Select Options panael select Group.
Click on the cylinder to select it.
Switch to Joints Tab; click on Assign; this connects all points on the cylinder to the bone.
Switch to Materials Tab; click on New, and set desired properties; click on a tab that says "none" to add a texture file; select the file you want to use as texture (make sure that pixel dimensions are power of 2). Click on Assign button (ther cylidner is still selected) to associate the material with the cylinder.
Save the file in Milkshape native format.

3. Generate the Half-Life mdl file


Chose File:Export:Half-Life SMD, save the file as SMD in your directory mymodel, selecting "reference".
Chose File:Export:Half-Life SMD, save the file as SMD in your directory mymodel, selecting "sequence" (under a different name).
Choose Tools:Half-Life:Generate QC. this will create a .qc file for your model (the table of contents file); save it in the same directory.
Choose Tools:Half-Life:Edit QC. This will open a window to edit your .qc. file. Replace ./reference and ./sequence with your smd file names (without .smd).
Choose Tools:Half-Life:Compile QC (warning: before doing this, make sure again you have saved your model, if something goes wronk Milkshape may die). If everything is ok (all vertices are assigned to bones, all textures are valid) you'll have an mdl file created, with the same name as your reference .smd file.

Denis Zorin