This article's documentation is for the "GoldSrc" engine. Click here for more information.

MDL (Quake)

From Valve Developer Community
(Redirected from MD3)
Jump to: navigation, search

Info icon
This page documents information about an engine not developed by Valve. This information is documented here because it has technical and/or historical relevance to Valve's engines.
English (en)

MDL (retroactively QMDL) is a file format used by Quake Quake to store vertex-animated models, as well as the required textures. Unlike the file formats of the same name used by GoldSrc GoldSrc and Source Source, skeletal animation is not supported, only one texture can be used per skin, and only one mesh can be used per model. Additionally, vertices are stored as arrays of 8-bit integer values (multiplied by a 32-bit floating point scalar), causing noticeable warbling or squirming of vertices when animated, a phenomenon known as "vertex swimming". Instead of storing the exact vertex normals for each vertex, QMDL uses a stores an index which points to a lookup table of 162 indices containing vertex normal data.

Prior to engine updates in late 2020, GoldSrc GoldSrc was able to load Quake MDLs, although it required a custom renderer to actually appear in-game[1].

Icon-Bug.pngBug:Attempting to load a QMDL in current builds of GoldSrc will crash in OpenGL mode!
Older builds simply refused to render the model or load textures, both of which were circumnavigatable in single-player mods using custom renderers.



Quake II Quake II uses a slightly modified version of the original Quake MDL format. Unlike its predecessor, textures are now stored as external 8-bit PCX files, although the embedded color palette is ignored. Most source ports (as well as the 2023 remaster) add support for using full-color TGAs instead of 256-color PCX. Additional "pain" skins can also be defined for monsters, and are automatically switched to (via DLL code) if the monster sustains enough damage.

Unlike Quake 1 models, Quake 2 models are almost always in their own folder, with the model usually named 🖿tris.md2 and the textures usually named some variation of 🖿skin.pcx and 🖿pain.pcx (but these naming conventions are not required).

Whereas Quake MDL stores a single scale and origin for all animations on the model, MD2 stores a separate scale and origin for each frame. This often results in MD2 models squirming more than Quake MDL, as vertex swimming can occur in an MD2 where a vertex would stay stationary in a Quake MDL.

Half-Life MDL

Main article:  MDL (GoldSrc)

GoldSrc GoldSrc uses a heavily modified version of the original Quake MDL format. Support for vertex animation is removed in favor of skeletal animation. Each texture has its own color palette, and multiple textures can be used per skin. Textures can be flagged as using certain render modes, such as alphatest transparency, additive translucency, or matcap "chrome". The vertex normals are stored as explicit values, allowing for proper sharp edges, and multiple meshes can be used per-model, including selectable "submodels". Vertex precision has been increased to floating-point as well. Tiling UVs are supported as well, unlike QMDL and MD2, although only the Sven-Coop SDK version StudioMDL can will compile them correctly.

Despite the shared file extension, Source Source 1 MDLs bear little resemblance to Quake or GoldSrc MDLs.


Quake III Quake III uses an improved version of the MD2 model format used by Quake II. While it still uses vertex animation, the vertex precision has been upgraded to 16-bit signed integer, making vertex wobbling often imperceptible except when the model is scaled up to large sizes, such as on the main screen of Wikipedia icon Return to Castle Wolfenstein. Like GoldSrc GoldSrc, multiple textures can be used per skin, animation frame rates are stored directly in the model file, and the model stores explicit vertex normals instead of using a lookup table. Like Source Source, models can use customizable materials, allowing for more control over the textures' appearance.


Doom 3 Doom 3 drops vertex animation in favor of skeletal animation. Unlike its predecessors, MD5 models are not "compiled" to binary, instead being plain-text. MD5 is split into md5mesh and md5anim files, with each mesh and animation being contained in a separate file. MD5 models do not store vertex normal information[2], instead relying upon normal maps to determine surface normals.

The Kex Engine remasters of Quake Quake and Quake II Quake II support using MD5 models instead of QMDL or MD2 models. Unlike Doom 3, these remasters use a single md5anim file for all animations. Since id Tech 2 id Tech 2 does not use normal maps, implicit surface normals are calculated by the engine at runtime.


  • AQM (Advanced Quake Model) - ??? (used by the q2mdl editor for QMDL and MD2 models; seems to have skeletal support)
  • MD16 - Variant of QMDL with all values upgraded to 16-bit floating point
Confirm.pngConfirm: Does MD16 also upgrade to using explicit vertex normals, instead of a lookup table?
  • MDC - Compressed form of MD3, wherein vertex positions in animations may be stored as 8-bit offsets instead of absolute 16-bit positions
  • MD4 - Unfinished skeletal-animated successor to MD3 developed alongside Quake III (not included in source code release)
    • MDS - Grey Matter Studio's completed version of MD4, used in Return to Castle Wolfenstein
      • MDM/MDX - Derivitive of MDS used by Wolfenstein Enemy Territory, which splits the model into separate MDM (model) and MDX (animation) files, like with MD5.
    • MDR - Raven Software's completed version of MD4, used in Star Trek Elite Force I+II
  • IQM (Inter-Quake Model) - skeletal model, supporting explicit vertex normals[2], vertex colors, and bone scaling; used as a newer alternative for MD5 in various IdTech 2+3 source ports
    • IQE (IQM Export) - plain-text version of IQM

External links


  1. Quake 1 models now crash the game on load · Issue #3005 · ValveSoftware/halflife
  2. Introducing the IQM model format - Unvanquished