BSPX: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 23: Line 23:
| {{code|DECOUPLED_LM}} || "Decouple" [[lightmap]] scale and UVs from [[texel]]s || Used by {{quake2|2}} remaster; compile with [[ericw-tools]] using {{code|_world_units_per_luxel}} KV in [[worldspawn]] or {{code|-world_units_per_luxel #}} in QBSP.
| {{code|DECOUPLED_LM}} || "Decouple" [[lightmap]] scale and UVs from [[texel]]s || Used by {{quake2|2}} remaster; compile with [[ericw-tools]] using {{code|_world_units_per_luxel}} KV in [[worldspawn]] or {{code|-world_units_per_luxel #}} in QBSP.
|-
|-
| {{code|LIGHTING_E5BGR9}} || [[HDR]] [[lightmaps]] ||  
| {{code|LIGHTING_E5BGR9}} || [[HDR]] [[lightmaps]] || Functions similarly to the [[BSP_(Source)#Lighting|RGBE8 lightmaps]] in {{src|2}}, but with an additional bit of precision per color instead of having the exponent be 8 bits.
|-
|-
|}
|}

Revision as of 18:44, 15 May 2024

Dead End - Icon.png
This article has no Wikipedia icon links to other VDC articles. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.

Stub

This article or section is a stub. You can help by expanding it.

BSPX is a standard for adding new lumps to id Tech 2 id Tech 2, id Tech 3 id Tech 3 and GoldSrc GoldSrc BSP files, which are used to add additional features to be used by source ports or custom renderers without breaking vanilla compatibility. As BSPX lumps are placed at the end of the BSP file, they are not loaded by vanilla engines, so a BSP with BSPX lumps is backwards compatible.

Structure

typedef struct {
	char lumpname[24]; // up to 23 chars, zero-padded
	int fileofs;  // from file start
	int filelen;
} bspx_lump_t;
typedef struct {
	char id[4];  // 'BSPX'
	int numlumps;
	bspx_lump_t lumps[1];
} bspx_header_t;

Lumps

Todo: other lumps; see FTE and Ericw-tools source codes
Lump name Use case Notes
DECOUPLED_LM "Decouple" lightmap scale and UVs from texels Used by Quake II Quake II remaster; compile with ericw-tools using _world_units_per_luxel KV in worldspawn or -world_units_per_luxel # in QBSP.
LIGHTING_E5BGR9 HDR lightmaps Functions similarly to the RGBE8 lightmaps in Source Source, but with an additional bit of precision per color instead of having the exponent be 8 bits.

External links