writers.spz#
The SPZ writer writes files in the spz format, designed for storing compressed gaussian splat data. The format stores compressed points, with their associated scale, rotation, color and spherical harmonics.
Note
The SPZ writer expects valid gaussian splat data. If scale, rotation, color, or opacity dimensions aren’t found in the point input, zeroes will be written for these attributes.
Currently, the SPZ writer expects a particular set of named dimensions for each point, following the conventions used in 3DGS PLY files. Dimension names are as follows:
X, Y, Z
f_dc_0, f_dc_1, f_dc_2: Red, Green and Blue colors (zeroth order spherical harmonics).
opacity: scalar representation of Opacity/Alpha.
scale_0, scale_1, scale_2: X/Y/Z scale transform applied to each gaussian when rendering.
rot_0, rot_1, rot_2, rot_3: W (real component)/X/Y/Z normalized rotation quaternion.
Optional: Spherical Harmonics – 0, 9, 24 or 45 dimensions labeled
f_dc_*
, with SH coefficients as the fastest-changing axis and color as the slower-changing axis.
Example#
[
{
"type":"readers.ply",
"filename":"inputfile.ply"
},
{
"type":"writers.spz",
"antialiased":true,
"filename":"outputfile.spz"
}
]
Options#
- filename
File to write. [Required]
- antialiased
Whether to mark the output file as containing antialiased data. [Default: false]
- where
An expression that limits points passed to a writer. Points that don’t pass the expression skip the stage but are available to subsequent stages in a pipeline. [Default: no filtering]
- where_merge
A strategy for merging points skipped by a ‘
where'
option when running in standard mode. Iftrue
, the skipped points are added to the first point view returned by the skipped filter or if no views are returned, placed in their own view. Iffalse
, skipped points are placed in their own point view. Ifauto
, skipped points are merged into the returned point view provided that only one point view is returned and it has the same point count as it did when the filter was run, otherwise the skipped points are placed in their own view. [Default:auto
]