Studiomdl

- 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
.

Parameters
The only parameter required is a QC file. Any others must come before it.
studiomdl [options] <path\QC>
General
-game <gamedir>
- Override system-wide game path.
-quiet
- Theoretically suppresses console output. In practice does nothing.
-x360
- Enable Xbox 360 output (OB).
-nox360
- Disable Xbox 360 output (Ep1).
-nowarnings
- Disable warnings.
Animation
-definebones
- See $definebone.
-printbones
- Writes extra bone info to the console.
-printgraph
- Writes some kind of animation weight graph to the console.
-overridedefinebones
- Equivalent to specifying $unlockdefinebones in QC.
Performance
-fullcollide
- Don't truncate really big collision meshes (Ep1 only; OB uses $maxconvexpieces).
-striplods
- Ignore all $lod commands.
-minlod <lod>
- Throw away data from LODs above the given one (see $minlod).
-perf
- 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.
-mdlreportspreadsheet
- Report performance info as a comma-delimited spreadsheet. To do: Usage
Debug
-d
- Dumps various glview files (10 per LOD per VTX file),
-h
- Dump hitboxes to console,
-n
- Tag bad normals.
-dumpmaterials
- Dump names of used materials to the console.
-i
- Ignore warnings.
-t
- Replaces all materials with the default pink check pattern
Unknown
-a <normal_blend_angle>
- ?
-checklengths
- ?
-f
- Flip all triangles.
-r
- "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.)
-stripmodel
- Process binary model files (VSI?) and strip extra lod data.
-stripvhv
- Strip hardware verts to match the stripped model.
Output files
mymodel.mdl
- Skeleton, animations, bounding/hit boxes, surface materials, lod index...
mymodel.sw.vtx
mymodel.dx80.vtx
mymodel.dx90.vtx
- Vertex data optimised for DirectX 7, 8 and 9 respectively
mymodel.vvd
- Remaining hardware-agnostic vertex data, including the UV map
mymodel.phy
- Collision mesh data
See also
- Common Studiomdl errors
- Studiocompiler, a graphical interface for studiomdl
- GUIStudioMDL, another graphical interface
- Source Model Compiler, a web based model compiler and QC generator.
|