Introduction
This is the model format of Quake, released by id Software in 1996, used for monsters, weapons, items and the player. A model is a single mesh animated by storing the position of every vertex in every frame. Its skins, the textures wrapped around it, are 8-bit images in Quake’s 256-colour palette, stored inside the model file.
The Quake source code was released under the GPL in 1999, and the format is still used by Quake engine ports and the games and mods built on them. It was followed by MD2 in Quake II. Half-Life’s studio models share the extension but not the format.
Structure
A Quake MDL file is binary and little-endian. The header starts with
IDPO and version 6, then gives a scale and an origin used to unpack the
vertices, a bounding radius, the eye position, the counts of skins, vertices,
triangles and frames, the skin size, and flags such as the rocket trail an object
leaves.
The skins follow, each a block of palette indices, or a group of skins that animate. Then come the texture coordinates, with a flag for vertices on the seam between the front and back of the skin, the triangles, each with a flag saying whether it faces front, and the frames. Each frame stores every vertex as three bytes plus a byte choosing a normal from a fixed table, and a frame can also be a group of frames that play in a loop.
0HeaderIDPO, version 6, scale, origin, counts, flags84 bytes84Skins 8-bit palette imagesvaries…Texture coordinates seam flag, s, t12 bytes each…Triangles front flag, three vertex indices16 bytes each…Frames packed vertices for each framevaries
Variants
- Quake model (IDPO) – Quake’s animated model: palette skins inside the file and whole-frame animation
- Studio model (IDST) – Valve’s skeletal model for Half-Life and Source: bones, sequences and hit boxes
Links
Software
- QuakeSpasm – Quake engine port that plays Quake and its mods (Windows, macOS, Linux)
Developers
- Quake source code – id Software’s engine code under the GPL, including the model loader (C)
- Assimp – library that imports dozens of 3D formats, Quake MDL among them (C++)