Difference between revisions of "Studiomdl"

From Valve Developer Community
Jump to: navigation, search
Line 106: Line 106:
* [[Studiocompiler]], a graphical interface for studiomdl
* [[Studiocompiler]], a graphical interface for studiomdl
* [[GUIStudioMDL]], another graphical interface
* [[GUIStudioMDL]], another graphical interface
* [[Source Model Compiler]], a web based model compiler and QC generator.
== External links ==
* [http://www.hamaloo.co.uk/sourcemdl/ Web Model Compiler], a web based model compiler and QC generator.

Revision as of 08:01, 22 August 2010

Español Русский
For a guide to studiomdl's usage, see Compiling a model.

Studiomdl is the command-line tool used to compile models from the intermediate Studio Model Data format exported from modeling packages to the binary .mdl format that is read by the Source engine.

It can be found at steam/steamapps/<account>/sourcesdk/bin/[orangebox|ep1]/bin/studiomdl.exe.

Tip.png Tip: The name "studio" is a throwback to the development of Half-Life 1, during which Valve used 3D Studio Max to create their models.


The only parameter required is a QC file. Any others must come before it.

studiomdl [options] <path\QC>


-game <gamedir>
Override system-wide game path.
Theoretically suppresses console output. In practice does nothing.
Enable Xbox 360 output (OB).
Disable Xbox 360 output (Ep1).
Disable warnings.


See $definebone.
Writes extra bone info to the console.
Writes some kind of animation weight graph to the console.
Equivalent to specifying $unlockdefinebones in QC.


Don't truncate really big collision meshes (Ep1 only; OB uses $maxconvexpieces).
Ignore all $lod commands.
-minlod <lod>
Throw away data from LODs above the given one (see $minlod).
Report performance info in console.
-mdlreport <path\model.mdl>
Report performance info for an already-compiled model. A QC file is not needed when using this command.
Report performance info as a comma-delimited spreadsheet. To do: Usage


Dumps various glview files (10 per LOD per VTX file),
Dump hitboxes to console,
Tag bad normals.
Dump names of used materials to the console.
Ignore warnings.
Replaces all materials with the default pink check pattern


-a <normal_blend_angle>
Flip all triangles.
"Tag reversed"..?
-vsi <path\[QC|MDL]>
Generate stripping information .vsi file. Works with QC and MDL. (Some sort of memory optimisation function? Possibly related to Xbox 360.)
Process binary model files (VSI?) and strip extra lod data.
Strip hardware verts to match the stripped model.

Output files

Skeleton, animations, bounding/hit boxes, surface materials, lod index...
Vertex data optimised for DirectX 7, 8 and 9 respectively
Remaining hardware-agnostic vertex data, including the UV map
Collision mesh data

See also