Trying to get StudioMdl working

First of all, apologies for another one of what I can only imagine is a never-ending stream of threads on the exact same subject.

Let’s start by clearing the water:

  1. I am not a newbie to game development, but I am relatively new to Hammer/Source. I have experience in Unity and UDK
  2. I have been googling quite a lot to get things working, and still doing so. However most found solves usually are outdated or do not mimic my issue
  3. I have tried searching the site, but all the results come up as a series of ‘xxxxx.xxxx’ (which I’m guessing is either a joke, or done for a reason)
  4. What I am trying to do: set up a pipeline for compiling models for use in a Source map

Which StudioMdl is currently stable/working?

I keep having it crash, with a freezeframe of the split-second console telling me that it can’t find the gameinfo.txt.

Tl;dr: Trying to get studiomdl working. Halp.


So, I made a bit of progress using GUIStudioMDL 2.2, using the Orange Box SDK pointed to the TF2 folder. But now it can’t load my SMD:

The path to the smd only needs to be relative to the qc, it seems that you have the full path in the qc.

I’m not sure if the full path should work, but I know that the above does.

I fixed the issue. Turns out to be some of the quotations marking the filepath were wonky… Compiled successfully.

On to the next issue, now, then. It’s not loading my texture.

Here’s my QC:


//your directory which contains the .smd files you exported from 3DSMax
$cd "K:\WORKSHOP\Videogame Workshop\Map Workshop\GM_Hinterland\SMD"

//directory within steamapps/yourmod/models and name of final model
$modelname "Column.mdl"

//needed to show hammer the model is to be treated as a prop_static

//your reference .smd
$body studio "reference.smd"

//uniform scale modifier – change value to modify the size of the object in hammer without re-exporting from 3DSMax
$scale 1.0

//directory containing the materials for the mesh
$cdmaterials "K:\WORKSHOP\Videogame Workshop\Soul Balance RPG\SoulBalance_PRODUCTION\Scenery\SimpleSet_SeguinM\sourceimages"

//skeletal animation .smd (not used in in static meshes, but required anyway)
$sequence idle "idle.smd" loop fps 15

//collision information – the physical presence the object has in the game world.  Using the same reference file from before will auto-generate an optimised collision box, if you wish this to be a custom shape, you use another .smd which has been exported as a reference
$collisionmodel "reference.smd"
	$Mass 100

And my VMT file (in the same folder as my corresponding VTF’s–one for the base texture/alpha, and one for the normal map):

	"$basetexture" "WORKSHOP/Videogame Workshop/Soul Balance RPG/SoulBalance_PRODUCTION/Scenery/SimpleSet_SeguinM/sourceimages/TextureAtlas_DIFF-ALPHA"
	"$normalmap" "WORKSHOP/Videogame Workshop/Soul Balance RPG/SoulBalance_PRODUCTION/Scenery/SimpleSet_SeguinM/sourceimages/TextureAtlas_NRM"
	"$surfaceprop" "Brick"
	"$translucent" 1

The materials paths in the qc files and VMTs assume you’re working relative to the root of the “materials” folder in the game directory.

Your $cdmaterials needs to refer to a path within materials folder in your tf (assuming you’re working with tf2) folder.
The $basetexture and other parameters need to match that path/format.

$cdmaterials in your qc should be something like:


$basetexture would be similar


I don’t have a sub folder for this prop but this is how its set up.

$cdmaterials here is “models/props_beerbowl”

Additionally, depending on your program and smd exporter, you may have a problem getting materials to show if the model’s material name in your program differs from the filename you’re giving it.
e.g. 3dsmax using Material #1, and your exporter using that name instead of the name of your diffuse texture.

Okay, so my exporting shenanigans have taken a step back up the fuck chain:

I’m using the blender SMD exporter plugin, and instead of exporting an SMD as expected, it creates a blank file that’s 0b. It says it exported successfully though…

Can we perhaps see screenshot of model in blender?
Also did you apply texture to all model?

As far as I remember even if you miss texturing one poly, it may cause exporting issues.

Here it is below.

The thing is, I successfully exported it previously, but without the texture (which is the issue I’m trying to solve now).