MD3 (file format)

MD3 is a model format supported by the Quake 3 engine. The format can be used for characters, items, and level structure geometry. Animations are saved on a per-vertex basis, opposed to skeletal animation. The format can contain tags (origin and rotation) that games can place models or effects at.

File format

MD3 header

Frame

General properties of a single animation frame.

Tag

An attachment point for another MD3 model.

Surface

An animated triangle mesh.

Shader
Triangle
TexCoord
Vertex

Normals

Encoding

The normal vector uses a spherical coordinate system. Since the normal vector is, by definition, a length of one, only the angles need to be recorded. Each angle is constrained between 0 - 255 to fit in one octet. A normal vector encodes into 16 bits.

(Code in q3tools/common/mathlib.c:NormalToLatLong)
azimuth <- atan2(y, x) * 255 / (2 * pi)
zenith <- acos(z) * 255 / (2 * pi)

Decoding

(Code in q3tools/q3map/misc_model.c:InsertMD3Model)
lat <- zenith * (2 * pi ) / 255
lng <- azimuth * (2 * pi) / 255
x <- cos ( lng ) * sin ( lat )
y <- sin ( lng ) * sin ( lat )
z <- cos ( lat )

MD3

MD3, MD 3 or MD-3 can mean:

  • Dätwyler MD-3 Swiss Trainer, a Swiss light aircraft
  • Flyitalia MD3 Rider, an Italian ultralight aircraft
  • Maryland's 3rd congressional district, a United States electoral region
  • Maryland Route 3, a United States highway
  • MD3 (file format)
  • Podcasts:

    PLAYLIST TIME:
    ×