BSP Version 25
BSP v25 is Strata Source's modified BSP format that raises many of the baked-in limits that BSP traditionally has. Version 25 was selected to avoid collisions with other projects that are also modifying the BSP map format.
This document goes over the significant changes to the format so non-Strata devs can parse and analyze our maps.
BSP v25 is extremely new right now and is subject to change. Until these changes are finalized and merged into our primary development branch, this format may change without a BSP or lump version increase.
Map Bounds
MAX_COORD_INTEGER
was changed to 65536
(from 16k), making the world a max of 131072
units on any axis, spanning from -65k to 65k.
Limit Summary
Limit Name | Value |
MAX_BRUSH_LIGHTMAP_DIM_INCLUDING_BORDER | 131 |
MAX_BRUSH_LIGHTMAP_DIM_WITHOUT_BORDER | ( MAX_BRUSH_LIGHTMAP_DIM_INCLUDING_BORDER - 3 ) |
MAX_DISP_LIGHTMAP_DIM_INCLUDING_BORDER | 512 |
MAX_DISP_LIGHTMAP_DIM_WITHOUT_BORDER | ( MAX_DISP_LIGHTMAP_DIM_INCLUDING_BORDER - 3 ) |
MAX_LIGHTMAP_DIM_WITHOUT_BORDER | MAX_DISP_LIGHTMAP_DIM_WITHOUT_BORDER |
MAX_LIGHTMAP_DIM_INCLUDING_BORDER | MAX_DISP_LIGHTMAP_DIM_INCLUDING_BORDER |
MAX_LIGHTSTYLES | 64 |
MIN_MAP_DISP_POWER | 2 |
MAX_MAP_DISP_POWER | 4 |
MAX_DISP_CORNER_NEIGHBORS | 4 |
MAX_MAP_MODELS | 65536 |
MAX_MAP_BRUSHES | 131072 |
MAX_MAP_ENTITIES | 20480 (bumped from 16384) |
MAX_MAP_TEXDATA | 16384 (bumped from 2048) |
MAX_MAP_DISPINFO | 262144 |
MAX_MAP_DISP_VERTS | ( MAX_MAP_DISPINFO * ((1<<MAX_MAP_DISP_POWER)+1) * ((1<<MAX_MAP_DISP_POWER)+1) ) |
MAX_MAP_DISP_TRIS | ( (1 << MAX_MAP_DISP_POWER) * (1 << MAX_MAP_DISP_POWER) * 2 ) |
MAX_DISPVERTS | NUM_DISP_POWER_VERTS( MAX_MAP_DISP_POWER ) |
MAX_DISPTRIS | NUM_DISP_POWER_TRIS( MAX_MAP_DISP_POWER ) |
MAX_MAP_AREAS | 65536 |
MAX_MAP_AREA_BYTES | (MAX_MAP_AREAS/8) |
MAX_MAP_AREAPORTALS | 65536 |
MAX_MAP_PLANES | 1048576 |
MAX_MAP_NODES | 1048576 |
MAX_MAP_BRUSHSIDES | (MAX_MAP_BRUSHES * 10) (used to be fixed at 65536) |
MAX_MAP_LEAFS | 1048576 |
MAX_MAP_VERTS | 1048576 |
MAX_MAP_VERTNORMALS | 1048576 |
MAX_MAP_VERTNORMALINDICES | 1048576 |
MAX_MAP_FACES | 1048576 |
MAX_MAP_LEAFFACES | 1048576 |
MAX_MAP_LEAFBRUSHES | 1048576 |
MAX_MAP_PORTALS | 1048576 |
MAX_MAP_CLUSTERS | 1048576 |
MAX_MAP_LEAFWATERDATA | 32768 |
MAX_MAP_PORTALVERTS | 128000 |
MAX_MAP_EDGES | 4096000 |
MAX_MAP_SURFEDGES | 8192000 |
MAX_MAP_LIGHTING | 0x1000000 |
MAX_MAP_VISIBILITY | 0x1000000 |
MAX_MAP_TEXTURES | 16384 |
MAX_MAP_CUBEMAPSAMPLES | 16384 |
MAX_MAP_OVERLAYS | 16384 |
MAX_MAP_WATEROVERLAYS | 16384 |
MAX_MAP_TEXDATA_STRING_DATA | 256000 |
MAX_MAP_TEXDATA_STRING_TABLE | 1048576 |
MAX_MAP_PRIMITIVES | 1048576 |
MAX_MAP_PRIMVERTS | 1048576 |
MAX_MAP_PRIMINDICES | 1048576 |
New Lump Versions
The following table lists current lump versions for all lumps that are versioned in Strata Source:
Lump Name | Version |
LUMP_PHYSDISP_VERSION | 2 |
LUMP_NODES_VERSION | 1 |
LUMP_DISPINFO_VERSION | 1 |
LUMP_EDGES_VERSION | 1 |
LUMP_PRIMITIVES_VERSION | 1 |
LUMP_FACES_VERSION | 2 |
LUMP_FACEBRUSHES_VERSION | 1 |
LUMP_FACEBRUSHLIST_VERSION | 1 |
LUMP_LEAF_AMBIENT_INDEX_VERSION | 1 |
LUMP_LEAFS_VERSION | 2 |
LUMP_BRUSHSIDES_VERSION | 1 |
LUMP_AREAPORTALS_VERSION | 1 |
LUMP_LEAFFACES_VERSION | 1 |
LUMP_LEAFBRUSHES_VERSION | 1 |
LUMP_PRIMINDICES_VERSION | 1 |
LUMP_VERTNORMALINDICES_VERSION | 1 |
LUMP_OVERLAYS_VERSION | 1 |
LUMP_WATEROVERLAYS_VERSION | 1 |
LUMP_LEAFWATERDATA_VERSION | 1 |
Structures
In the BSP v25 update, all lumps listed in the lump version table have been modified. This section lists the new structure format for each of those lumps.