SPX_EN.md

December 30, 2025 · View on GitHub

SPX Version 3 Format Specification

The .spx format is a 3DGS model format designed to be fleXible, eXtensible, and eXclusive.


  • Flexible Optimized file header structure, flexible data blocks, and effective compression
  • Extensible Open format with reserved fields for future expansion
  • Exclusive Custom format identifiers for proprietary data protection

File Header (128 bytes)

Fixed-length header for format identification, containing bounding box data for sorting optimization and custom identifiers.

Byte OffsetTypeField NameDescription
0–2ASCII*MagicFixed value spx
3uint8*VersionCurrent version: 2
4–7uint32*Gaussian CountTotal number of Gaussian points
8–11float32*MinXBounding box minimum X coordinate
12–15float32*MaxXBounding box maximum X coordinate
16–19float32*MinYBounding box minimum Y coordinate
20–23float32*MaxYBounding box maximum Y coordinate
24–27float32*MinZBounding box minimum Z coordinate
28–31float32*MaxZBounding box maximum Z coordinate
32–35float32Min Center HeightMin model center height (Y-axis)
36–39float32Max Center HeightMax model center height (Y-axis)
40–43uint32Creation DateDate in YYYYMMDD format
44–47uint32*Creater IDA unique value (other than 0 reserved for official use) to identify the creater
48–51uint32*Exclusive IDA non-zero value (where 0 indicates public formats) defines a proprietary/private data block format
52uint8SH degreeAllowed values: 0,1,2,3. Others → 0
53uint8Bit FlagsRepresent different flags by bit, details as follows
bit 0Flag 1: InvertedDefault not inverted 0
bit 1Flag 2: ReservedReserved
bit 2Flag 3: ReservedReserved
bit 3Flag 4: ReservedReserved
bit 4Flag 5: ReservedReserved
bit 5Flag 6: ReservedReserved
bit 6Flag 7: ReservedReserved
bit 7Flag 8: Large SceneDefault small scene 0
54uint8ReservedReserved
55uint8ReservedReserved
56–63-ReservedReserved
64–123ASCIICommentMaximum 60 ASCII characters
124–127uint32*ChecksumValidates file integrity (creater-specific)

Data Blocks

Data blocks consist of a fixed header followed by customizable content.

Data Block Structure

Byte OffsetTypeField NameDescription
0~3uint32* Data Block DefinitionCompression Flag (1bit) + Compression Type (3bit) + Data Block Length (28bit)
bit0* Compression Flag1 bit indicating whether the data content is compressed (0: uncompressed, 1: compressed)
bit1~bit3* Compression Type3 bits indicating the compression type of the data content (0: gzip, 1: xz)
bit4~bit31* Data Block Length28 bits indicating the length of the content in this data block
0–nbytes*Block ContentActual data (format defined below)

Data Block Content

Byte OffsetTypeField NameDescription
0–3uint32*CountNumber of Gaussians in this block
4–7uint32*Format IDIdentifies block format
8–nbytes*DataStructured per Format ID

Open Block Content Formats

he data block format encompasses both open and exclusive formats. The reserved range from 0 to 65535 is designated for defining the open format, while other values are employed for exclusive formats.


✅ Open Format 22, basic data (for use when more focus on encoding/decoding performance)

Byte OffsetTypeField NameDescription
0~3uint32*Gaussian CountNumber of Gaussians
4~7uint32*Format ID22
8~nbytes*Datax0...y0...z0...x1...y1...z1...x2...y2...z2...sx...sy...sz...r...g...b...a...rw...rx...ry...rz...p0...p1...
  • x,y,z Coordinates, 24-bit precision (x, y, z).
  • sx,sy,sz Scale, 8-bit per axis (sx, sy, sz).
  • r,g,b,a Color, RGBA channels (8-bit each).
  • rw,rx,ry,rz Rotation, Quaternion components (8-bit each).
  • p0,p1 Low and high bytes of palette index; omitted when no palette is used.

✅ Open Format 23, basic data (for large-scale scenes where more focus is on encoding/decoding performance)

Same as format 22, but x,y,z coordinates are not Log-encoded, resulting in smaller errors.

✅ Open Format 220, basic data (for use when more focus on compression ratio)

Byte OffsetTypeField NameDescription
0~3uint32*Gaussian CountNumber of Gaussians
4~7uint32*Format ID220, webp encoding
8~nbytes*Datalength,webp([x0,y0,z0,255...]), length,webp([x1,y1,z1,255...]), length,webp([x2,y2,z2,255...]), length,webp([sx,sy,sz,255...]), length,webp([r,g,b,a...]), length,webp([r0,r1,r2,ri...], length,webp([p0,p1,0,255...])
  • x,y,z Coordinates, 24-bit precision.
  • sx,sy,sz Scale, 8-bit per axis.
  • r,g,b,a Color, RGBA channels (8-bit each).
  • r0,r1,r2,ri Rotation, Quaternion components (8-bit each), ri is the index of the maximum value + 252.
  • p0,p1 Low and high bytes of palette index; omitted when no palette is used.

✅ Open Format 230, basic data (for use when more focus on compression ratio)

Same as format 220, but x,y,z coordinates are not Log-encoded, resulting in smaller errors.

✅ Open Format 8, palettes of SH (auto-selected by strategy, no manual specification required)

Byte OffsetTypeField NameDescription
0–3uint32Reserved
4–7uint32*Format ID8 palettes of Spherical harmonics (SH) degree 1~3
8~nbytes*Data[sh0,sh1,sh2...sh14,sh0,sh1,sh2...sh14,...]
  • sh0,sh1,sh2...sh14 Spherical harmonic coefficients (r,g,b,255), in pixel units

✅ Open Format 9, palettes of SH , webp encoding (auto-selected by strategy, no manual specification required)

Byte OffsetTypeField NameDescription
0–3uint32Reserved
4–7uint32*Format ID9 palettes of Spherical harmonics (SH) degree 1~3
8~nbytes*Datawebp([sh0,sh1,sh2...sh14,sh0,sh1,sh2...sh14,...])
  • sh0,sh1,sh2...sh14 Spherical harmonic coefficients (r,g,b,255), in pixel units

Historical Version