MAP (file format)
The MAP file format is a plain-text file format used by GoldSrc,
id Tech 2,
id Tech 3, and
id Tech 4, which stores entities and level geometry in a format which can be understood by the map compilers (and in the case of id Tech 4, the game itself).
At its core, the format consists of several entities, each of which is optionally capable of storing one or more brushes and (only in ) patch meshes.
Variants
Header text | Supported by | Information |
---|---|---|
![]() |
Most tools, except ![]() |
The original format. |
![]() |
All ![]() ![]() ![]() |
Variant of the Quake 1 (Legacy) format with additional texture UV precision |
![]() |
All ![]() ![]() |
Variant of Quake 1 (Legacy) format which optionally stores three additional WAL metadata flags |
![]() |
![]() ![]() ![]() |
Variant of Quake 2 (Legacy) format with Valve220-style UVs |
![]() |
All ![]() |
Variant of Quake 2 (Legacy) format with support for patch meshes ("curves") |
![]() |
Most ![]() ![]() |
Variant of Quake 3 (Axial Projection) format which stores brushes differently ![]() |
![]() |
![]() ![]() ![]() |
Variant of Quake 3 (Axial Projection) format with Valve220-style UVs. Not yet standard. |
![]() |
All ![]() |
Variant of Quake 3 (Axial Projection) format which can store patch meshes differently [Elaborate?] |
![]() |
TrenchbroomBFG | Variant of Doom 3 (Legacy) format with Valve220-style UVs |
Entities
KeyValues
Brushes
In most versions of the format, brushes are stored as a set of planes, rather than a set of vertices. Each plane is defined via three points, and the intersection of these planes determines where edges and vertices lay. Due to this, brushes cannot be concave, and a missing face will result in other faces continuing infinitely, causing compiler errors.
Quake I (Legacy)
A simple 6-sided brush in the original Quake 1 format would look like this:
{ ( 256 64 16 ) ( 256 64 0 ) ( 256 0 16 ) mmetal1_2 0 0 0 1 1 ( 0 0 0 ) ( 0 64 0 ) ( 0 0 16 ) mmetal1_2 0 0 0 1 1 ( 64 256 16 ) ( 0 256 16 ) ( 64 256 0 ) mmetal1_2 0 0 0 1 1 ( 0 0 0 ) ( 0 0 16 ) ( 64 0 0 ) mmetal1_2 0 0 0 1 1 ( 64 64 0 ) ( 64 0 0 ) ( 0 64 0 ) mmetal1_2 0 0 0 1 1 ( 0 0 -64 ) ( 64 0 -64 ) ( 0 64 -64 ) mmetal1_2 0 0 0 1 1 }
Each plane can be summed up like so:
( x1 y1 z1 ) ( x2 y2 z2 ) ( x3 y3 z3 ) TEXTURENAME Xoffset Yoffset rotation Xscale Yscale
- ( x1 y1 z1 ) ( x2 y2 z2 ) ( x3 y3 z3 ) is the set of three points in 3D space that define the plane.
- TEXTURENAME is the name of the texture (or in later engines, the material) that appears on the face.
- Xoffset Yoffset offsets the UV coordinates of the plane, resulting in shifting the texture on the X and/or Y axis.
- rotation doesn't store the actual rotation of the texture, but rather how much the texture has already been rotated[Clarify].
- Xscale Yscale stores the texture scale. 1 means the texture is displayed at 1 texel per quake unit.
Quake I (Valve220)
( x1 y1 z1 ) ( x2 y2 z2 ) ( x3 y3 z3 ) TEXTURENAME [ Tx1 Ty1 Tz1 Toffset1 ] [ Tx2 Ty2 Tz2 Toffset2 ] rotation Xscale Yscale
Patch meshes
See also
- VERC/MAP file format - casual explanation of the Quake 1 Valve220 MAP format
- VMF
- RMF