Modeling props with Blender
This article is a stub. You can help by adding to it.
It is possible to create static, non-animated props in Blender, along with appropriate physics collision data, in case Softimage is too much. This requires use of the SMD Exporter by Pelle Johnsen. This exporter does not support skeletons, multiple materials, or animations, but it does support hard/soft edges.
It is assumed that the reader knows the basic functions of Blender. At the very least you must be comfortable with creating simple models, applying UV texture mapping, and installing plugins. A working knowledge of how to compile models is a significant help.
Creating a basic non-solid prop
- Create your model and texture it via UV mapping. The result should be a .blend file, plus all the TGA files you used as textures. The example used here is the PC Gamer UK mag I secreted all around de_dust_pcg (so I have pcgmag.blend and pcgmag.tga)
- Having installed the SMD exporter plugin (http://asrc.pjohnsen.com/downloads/smd_export.py), export your model to a Half-Life 2 SMD file. In this example, I now have pcgmag.smd and pcgmag.tga - these are the files needed by the model compiling tools.
- For a CS:S model, copy the SMD file into SteamApps/username/sourcesdk_content/cstrike/modelsrc and the TGA file(s) into SteamApps/username/sourcesdk_content/cstrike/materialsrc/models
- The SMD we have already is just the reference model. We also need an additional SMD to declare the 'idle' animation. So, in a text-editor, create a file called 'pcgmag_idle.smd' (or some other name ending in SMD) and enter this as its contents:
0 "joint0" -1
0 0.000000 0.000000 0.000000 0 0.000000 0.000000
- The compile tools need a QC file containing model information. This is the file I used for pcgmag.smd:
$modelname pcgmag.mdlNote the scale factor, which I tweaked to get the magazine to appear at the right size in-game.
$body studio "pcgmag.smd"
$sequence idle "pcgmag_idle" fps 1
- The texture must also be converted into a VTF file just like any normal texture. However, it must include the 'model' declaration. This was the VMT file used for pcgmag.tga:
- Finally, change to the SourceSDK bin folder containing studiomdl.exe, and compile the model using a command like this:
- If everything went right, you'll get some nice output from studiomdl (look carefully for any errors), and you can now find the model in Hammer's model browser for use in-game.
Click here for a message board discussion about an almost-complete Blender script with animation capabilities.