StudioMDL (Source)

is the command-line tool used to compile models from intermediate formats exported from modeling packages to the binary .mdl format that is read by the Source engine.
It can be found at .
== Parameters ==
The only parameter required is a QC file. Any others must come before it.
 studiomdl [options] <path\QC>
=== General ===
;
:Override the VProject game path.
;
:Suppresses some console output, such as spewing the searchpaths. 
;
:Enable Xbox 360 output, overriding the 
;
:Disable Xbox 360 output, overriding the 
;
:Disable warnings.
;
:Print no more than the specified number of warnings.
=== Animation ===
; 
: See .
; 
: Writes extra bone info to the console.
; 
: 
; 
: Equivalent to specifying in QC.
; 
: Prints engine-ready keyframe data for each animation.
=== Performance ===
; 
: Skip processing (DX6/DX7), , and variants (use only). This speeds up compiling.
: 
; 
: Skip splitting quads into tris and building tristrips. This changes the rendering flags for the model, most likely resulting in slower performance or buggier rendering in-engine.
; 
: Don't truncate really big collision meshes 
:
; 
: Ignore all commands.
;
:Throw away data from LODs above the given one (see ).
;
:Report performance info for an already-compiled model. A QC file is not needed when using this command.
;
:Same as .
;
:Report performance info, per-LOD, as a comma-delimited spreadsheet. It will appear in the form:
:Path to VTX, VTX file extension, LOD number (1 is the root lod), tri count, number of batches rendered, number of materials used 
:Must be used with -mdlreport or -perf!
:
=== Debug ===
;
: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 specified material.
;
:Prints an easily parseable message indicating whether the compile was successful or a failure.
;
:Prints info on which bones are being retained and which bones are being collapsed.
=== Other ===
;
:Disables Valve's Perforce integration. Unless you actually have Perforce set up for your game/mod (a highly unlikely scenario), you should use this.
;
:Compile the model, but don't actually write the results to disk.
;
:Auto-smooth faces equal to or below specified angle in degrees. By default, Studiomdl blends normals that are 2 degrees or less apart. Will override normal data for all meshes.
; 
:Flip all triangles.
:
;
:Generates a VSI file from a QC or MDL.
;
:Strips down a model, removing its LOD info.
;
:Strips down hardware verts (VHV) of their LOD info.
;
:Generates a simple makefile for later compiling. It also parses the QC for any errors, and runs in mode.
;
:Runs studiomdl in the context of the provided path.
;
:Adds the provided path as a content search path.
=== Nonfunctional ===
;
:"Tag reversed". 
;
:Probably meant to test the model collision for any physics errors. Skips whatever argument is provided after it.
== Input Files ==
StudioMDL supports a range of input formats. These include SMD, DMX, OBJ, and VRM for reference meshes, SMD and DMX for skeletal animation, and VTA and DMX files for vertex and flex animation. also supports FBX, but with limited functionality. Flexes are not directly supported, nor are FBX sequences, however an SMD/DMX sequence can be used on an FBX model.
Format 	Mesh	Skeletal animation	Vertex/flex animation
SMDSMA PHYS	Yes 	Yes 	Yes
DMX XML MPP	Yes 	Yes 	Yes
OBJ 	Yes 	No 	No
FBX 	Yes 	 	
VRM 	Yes 	Yes 	No
VTA 	No 	No 	Yes
== Output files ==
;
:Skeleton, animations, bounding/hit boxes, surface materials, LOD index…
;
;
;
;
:Vertex data optimized for DirectX 6/7, Xbox 360, DirectX 8, and DirectX 9 respectively. 
;
:Remaining hardware-agnostic vertex data, including the UV map
;
:Collision mesh data. Omitted if no $collisionmodel is defined.
== See also ==
* Common Studiomdl errors
* Crowbar, a popular graphical frontend for studiomdl which also supports model decompiling and other advanced features.
* Studiocompiler, a graphical frontend for studiomdl
* GUIStudioMDL, another graphical frontend
* Source Model Compiler, a web based model compiler and QC generator.
* NekoMDL, a modified fork of StudioMDL with additional features and increased limits
* Fixing the 5% Weight Bone Link Cull, for SFM
Category:Modeling