I'm making a SourceMod with a buncha friends, and we needed a couple models. Now I don't know about you, but I don't have $3,000 lying around for 3DS Max and I don't intend on pirating it--so naturally, Blender is the best choice here. Free and relatively simple to use once you get past the UI. That's not what this is about, though. If you want to learn about how to use Blender as a beginner,
this tutorial should nudge you in the right direction. I may do some "beginners" video tutorials of my own similar to the one below in the future if there is a need.
Since originally writing this tutorial, I've made my own Blender script to export to SMD files as the other ones out there either don't work at all or don't export UVs properly. Mine fixes all of that, and I've made a video tutorial to go along with it. Enjoy.
Download Plugin
Use this script for animations (And the top one if you're having root bone trouble)
idle.smd
Code:
version 1
nodes
0 "joint0" -1
end
skeleton
time 0
0 0.000000 0.000000 0.000000 0 0.000000 0.000000
end
material.vmt
Code:
"VertexLitGeneric"
{
"$basetexture" "models/props/<materialname>"
"$surfaceprop" "metal"
"$model" 1
}
model.qc
Code:
$modelname "props/<modelname>.mdl"
$body mybody "<modelname>.smd"
$staticprop
$surfaceprop "metal"
$cdmaterials "models/props"
$scale 1
$sequence idle "idle.smd" loop fps 1
$collisionmodel "<modelname>-phy.smd" {
$automass
$concave
}
$keyvalues
{
"prop_data"
{
"base" "Metal.Medium"
}
}
run_studiomdl.bat
Code:
@"c:\program files\steam\steamapps\<username>\sourcesdk\bin\ep1\bin\studiomdl.exe" -game "c:\program files\steam\steamapps\<username>\garrysmod\garrysmod" <model>.qc
pause
To spawn your model in the console:
Code:
sv_cheats 1
prop_physics_create props/<model>.mdl
Anyway, hope you found this somewhat useful. Have fun modeling, and have fun doing it all for free!
To use animations:
Simply make your animation just as you normally would with the Action Editor.
Select the animation you want to export in there, and do a File > Export > SMD > Animation and you're done.
Just use the
$sequence command in your QC file to tell Source what your animation is.
VTA Exporting
Here's a modified script by windwakr that supports VTA exporting.
Major credit to Pluss Roland for the original SMD exporter script.