Strata Source


Home ReferenceVScriptAngelscriptPanorama


studiomdl is the MDL compiler shipped with all branches of Source. In Strata, mdlcompile’s functionality was merged into studiomdl. It is available for Windows and Linux.

The following input model formats are supported:

Help Text

Usage: studiomdl.exe [options] <file.qc>

  [-a <normal_blend_angle>]
  [-d] - dump glview files
  [-f] - flip all triangles
  [-fullcollide] - don't truncate really big collisionmodels
  [-game <gamedir>]
  [-h] - dump hboxes
  [-i] - ignore warnings
  [-minlod <lod>] - truncate to highest detail <lod>
  [-n] - tag bad normals
  [-perf] report perf info upon compiling model
  [-quiet] - operate silently
  [-r] - tag reversed
  [-t <texture>]
  [-fastbuild] - write a single vertex windings file
  [-nowarnings] - disable warnings
  [-dumpmaterials] - dump out material names
  [-mdlreport] model.mdl - report perf info
  [-mdlreportspreadsheet] - report perf info as a comma-delimited spreadsheet
  [-striplods] - use only lod0
  [-overridedefinebones] - equivalent to specifying $unlockdefinebones in qc file
  [-stripmodel] - process binary model files and strip extra lod data
  [-stripvhv] - strip hardware verts to match the stripped model
  [-vsi] - generate stripping information .vsi file - can be used on .mdl files too
  [-outdir <dir>] - directory to place the resultant model into. ie, /some/path will create the model /some/path/mymdl.mdl

List of StudioMDL commands (.qc scripts)

Command Parameters Description
$cd string directory Directory to change to
$modelname string modelName Set the name of the model, relative to the models/ directory, including the .mdl extension
$internalname string internalName Set the internal name of the model. This will be used as the name of the .ani file
$cdmaterials string materialsPath Set the materials path
$pushd string directory Same as $cd but pushes the current directory to a stack before doing the cd
$popd none Return to the directory previous to the last $pushd call
$scale float flScale Scale the model on all axes by a scalar value
$root string boneName Set the name of the root bone
$screenalign string boneName, string type = ["sphere", "cylinder", "billboard"] Align bone with screen
$worldalign string boneName Align bone with world
$keepupright string boneName Keeps a bone upright
$collisionmodel string modelName, [optional block] Set the collision model for the mesh
$collisionjoints string modelName, [optional block] Set the collision model for the mesh, with separate joints
$contents string contents = ["grate", "ladder", "solid", "monster", "notsolid"]
$jointcontents string jointName, string contents = ["grate", "ladder", "solid", "monster", "notsolid"]
$staticprop none Mark this model as a static prop
$zbrush none Enable some special processing for zbrush authored models. Models marked with this have their texcoords smoothed. This is very expensive!
$heirarchy Lol, lmao
$opaque none Force this model to be opaque. Removes any transparency flags
$keyvalues block Defines a block of key-value pairs. These will be embedded into the model
$obsolete none Marks this model as obsolete. It will show the obsolete material in-game
$constantdirectionallight float flDirLightDot Set the constant directional light dot product. Must be between 0 and 1, floating point number
$minlod int minLod Set the min lod
$ambientboost none Indicate that the model should be rendered with an ambient boost
$donotcastshadows none Indicate that the model should not cast any shadows
$casttextureshadows none Indicate that this model should cast texture-based shadows in vrad, only applies to prop_static
$subd none Indicate that we have a quad-only catmull-clark subd mesh in the model
$maxverts int maxVerts Set the max verts on the model. Must be in range [1024, 65536]

Select game

Loading games...