Every splat is one item of the vertex element. This page lists its
properties in the order the training code writes them, and how a renderer turns each
into part of a 3D Gaussian. The names and order come from
construct_list_of_attributes in the code’s
scene/gaussian_model.py.
The vertex record
All properties are float (IEEE 754 single precision, 4 bytes). The
offsets are for spherical harmonics of degree 3; for degree d there are
3 × ((d + 1)² − 1) f_rest properties: 0, 9, 24 or 45.
| Offset | Property | Stored value | Used as |
|---|---|---|---|
| +0 | x, y, z | Centre | As stored |
| +12 | nx, ny, nz | Normal | Not used; always written as 0 |
| +24 | f_dc_0 to f_dc_2 | Degree 0 spherical harmonics, red, green, blue | Base colour: 0.5 + SH_C0 × value |
| +36 | f_rest_0 to f_rest_44 | Degree 1 to 3 spherical harmonics | Added to the colour for the viewing direction |
| +216 | opacity | Opacity before the sigmoid (a logit) | 1 / (1 + e−value) |
| +220 | scale_0 to scale_2 | Natural logarithm of each scale | evalue |
| +232 | rot_0 to rot_3 | Rotation quaternion w, x, y, z, not normalised | Divided by its length |
The file stores the values the optimiser works on, before the functions that keep
them in range. The code names the functions in setup_functions:
torch.exp for the scales, torch.sigmoid for the opacity
and normalize for the rotation.
Position
x, y and z are the centre of the Gaussian, in
the coordinate system of the camera poses the scene was trained from. Scenes made with
COLMAP, the usual source of poses, have Y pointing down, which is why many viewers
turn a scene over when they load it.
Base colour: f_dc
The colour of a splat is stored as spherical harmonics coefficients, one set for
each of red, green and blue. f_dc_0, f_dc_1 and
f_dc_2 are the degree 0 coefficients of red, green and blue. The colour
seen from any direction starts from
colour = 0.5 + SH_C0 × f_dc SH_C0 = 0.28209479177387814 (1 / (2√π))
The renderer adds the higher terms below, then clamps each channel at 0 from below.
Spherical harmonics: f_rest
The f_rest properties hold the coefficients above degree 0, for degree
1 (3 a channel), 2 (5 more) and 3 (7 more): K = 3, 8 or 15 a channel. The
order is channel by channel: first all K coefficients of red, then those of
green, then blue. Property f_rest_n is coefficient
n mod K + 1 of channel ⌊n / K⌋.
| Degree | f_rest properties | Red | Green | Blue |
|---|---|---|---|---|
| 0 | none | – | – | – |
| 1 | 9 | f_rest_0 to 2 | 3 to 5 | 6 to 8 |
| 2 | 24 | f_rest_0 to 7 | 8 to 15 | 16 to 23 |
| 3 | 45 | f_rest_0 to 14 | 15 to 29 | 30 to 44 |
The loader checks that the count is 3 × ((d + 1)² − 1) for the degree it was told to use, sorts the properties by their number, and reshapes them to three rows of K.
For a viewing direction (x, y, z), the unit vector from the camera to the splat’s centre, the renderer adds each coefficient times its basis function, in this order:
| Coefficient | Degree | Basis function |
|---|---|---|
| 1, 2, 3 | 1 | −C1·y, C1·z, −C1·x |
| 4 to 8 | 2 | 1.0925484·xy, −1.0925484·yz, 0.3153916·(2z² − x² − y²), −1.0925484·xz, 0.5462742·(x² − y²) |
| 9 to 15 | 3 | −0.5900436·y(3x² − y²), 2.8906114·xyz, −0.4570458·y(4z² − x² − y²), 0.3731763·z(2z² − 3x² − 3y²), −0.4570458·x(4z² − x² − y²), 1.4453057·z(x² − y²), −0.5900436·x(x² − 3y²) |
C1 is 0.4886025. These are the real spherical harmonics constants the Inria rasteriser uses, rounded here to seven places.
Opacity
opacity is a logit: the opacity is its sigmoid,
1 / (1 + e−v), from 0 (invisible) to 1. A value of 0 means an
opacity of 0.5; −5 is about 0.007. The training code resets opacities to a low value
from time to time and removes splats that stay nearly transparent.
Scale
scale_0, scale_1 and scale_2 are the natural
logarithms of the Gaussian’s standard deviations along its own three axes, before the
rotation. The scale along axis i is escale_i.
Typical values are negative: −5 is a scale of about 0.0067 scene units.
Rotation
rot_0 to rot_3 are a quaternion with the real part first:
w, x, y, z. They are not stored at unit
length, so a reader divides them by √(w² + x² + y² +
z²) before use. A Gaussian with no rotation has rot_0 = 1 and the
others 0.
The rotation matrix R of the normalised quaternion and the diagonal matrix S of the three scales give the Gaussian’s covariance:
Σ = R S Sᵀ Rᵀ
R = | 1 − 2(y² + z²) 2(xy − wz) 2(xz + wy) |
| 2(xy + wz) 1 − 2(x² + z²) 2(yz − wx) |
| 2(xz − wy) 2(yz + wx) 1 − 2(x² + y²) |
To draw a splat, a renderer projects the covariance onto the screen, which gives an ellipse, and blends the splats sorted by depth, each with an alpha of its opacity times the Gaussian’s value at the pixel.
A complete header
ply
format binary_little_endian 1.0
element vertex 1063091
property float x
property float y
property float z
property float nx
property float ny
property float nz
property float f_dc_0
property float f_dc_1
property float f_dc_2
property float f_rest_0
…
property float f_rest_44
property float opacity
property float scale_0
property float scale_1
property float scale_2
property float rot_0
property float rot_1
property float rot_2
property float rot_3
end_header
f_rest_1 to f_rest_43 left out here. The binary data
follows, 248 bytes a splat.