Introduction
The studio model is Valve’s model format for Half-Life, released in 1998, and for the Source engine that followed. Unlike the Quake model it replaced, it is skeletal: the meshes are attached to a hierarchy of bones, and animations are sequences of bone movements that can be blended. A model also holds hit boxes for collisions with bullets, attachment points, body groups that swap parts in and out, and skin families of textures.
Studio models are compiled with Valve’s studiomdl tool from source files
such as SMD meshes and animations, and tools exist to
decompile them back.
Structure
A studio model is binary and little-endian. It starts with IDST, a
version number, the model’s name and its length, then the eye position, bounding
boxes and flags, followed by counts and offsets for each table: bones, bone
controllers, hit boxes, sequences, sequence groups, textures, skin families, body parts
and attachments.
Half-Life models are version 10. Large models may keep their textures in a second
file with a T added to the name, such as scientistT.mdl, and
animation in sequence group files numbered 01, 02 and so on.
Source engine models, version 44 and upwards, are a different layout and a
separate format.
In this reference
The reference pages cover version 10, Half-Life’s studio model. The Source engine versions are on the Source engine model pages.
- Header and files – every header field, the limits, the texture and sequence group companion files, and the transition graph
- Skeleton – bones, bone controllers and every motion flag, hit boxes and hit groups, attachments
- Sequences and animation – sequence groups, sequences, events, pivots, and how the run-length coded bone animation and blends are decoded
- Textures and geometry – textures and their flags and palettes, skin families, body parts, models, meshes and triangle commands
Not described
Known, not yet covered
- Reference: the game-defined numbers, activities and event numbers, are not listed.
- Viewer: there is no viewer for Half-Life models yet, so a dropped file is recognised by its
IDSTsignature and shown as bytes.
Other formats that use .mdl
The Half-Life model is a different format from Quake’s and from the Source engine’s: they share only the extension.
- Quake model (IDPO) – Quake’s animated model: palette skins inside the file and whole-frame animation
- Source engine model – Valve’s studio model for Source, versions 44 to 49, with vertex and strip files
Links
Software
- Half-Life Model Viewer – community viewer for studio models (Windows)
Developers
- Half-Life SDK – Valve’s code, including the studio model renderer and
studiomdl(C++) - Assimp – library that imports dozens of 3D formats, Half-Life studio models among them (C++)
Reference
- studio.h – the Half-Life SDK header that defines the version 10 structures