⚠️ This type is unstable and may change significantly in a way that the data won't be backwards compatible. Spherical harmonics coefficients of degrees 1 through 3 for RGB, as 15 half-precision RGB triples.
The coefficients are stored coefficient-major: [c1.rgb, c2.rgb, …, c15.rgb].
The 15 coefficients c1…c15 are ordered by ascending degree l = 1, 2, 3, and within
each degree by ascending order m = -l … +l:
degree 1 is c1…c3, degree 2 is c4…c8, and degree 3 is c9…c15.
The degrees are not exposed as separate groups, since each degree has a different
number of coefficients (3, 5, and 7).
This per-coefficient order matches the f_rest_* properties of the PLY files used by
3D Gaussian Splatting (Kerbl et al., 2023),
but those store the channels channel-major (all 15 coefficients of R, then G, then B),
so they must be transposed on import.
The degree-0 (DC) term is not included — it is represented as a datatypes.Rgba32 color instead.
Data of a lower spherical harmonics degree should be zero-padded, which represents the exact same function (the spherical harmonics basis is orthonormal). Conversely, truncating trailing coefficients at the degree boundaries (3 and 8 triples) yields the optimal least-squares approximation of that lower degree.
Arrow datatype
FixedSizeList(15 x non-null FixedSizeList(3 x non-null Float16))API reference links
- 🌊 C++ API docs for
SphericalHarmonics3Rgb - 🐍 Python API docs for
SphericalHarmonics3Rgb - 🦀 Rust API docs for
SphericalHarmonics3Rgb