โ ๏ธ This type is unstable and may change significantly in a way that the data won't be backwards compatible. 3D gaussian splats, e.g. from a 3D Gaussian Splatting (3DGS) reconstruction.
Each gaussian is an anisotropic 3D gaussian distribution: a unit isotropic gaussian scaled per-axis, rotated, and translated. The scales are the standard deviations along the principal axes, in scene units.
Note that unlike 3DGS training checkpoints (e.g. PLY files), all values are stored in their natural form: linear scales, and base colors with opacity as RGBA.
Fields
Required
centers:Position3D
Recommended
scales:Scale3Dquaternions:RotationQuatcolors:Color
Optional
sh_coefficients:SphericalHarmonics3Rgbspherical_harmonics_degree:SphericalHarmonicsDegree
Can be shown in
API reference links
- ๐ C++ API docs for
GaussianSplats3D - ๐ Python API docs for
GaussianSplats3D - ๐ฆ Rust API docs for
GaussianSplats3D
Examples
Log a few gaussian splats
"""Log a few gaussian splats."""
import rerun as rr
rr.init("rerun_example_gaussian_splats3d", spawn=True)
rr.log(
"gaussians",
rr.GaussianSplats3D(
centers=[[0, 0, 0], [2, 0, 0], [4, 0, 0]],
scales=[[1.0, 0.5, 0.25], [0.5, 1.0, 0.5], [0.25, 0.5, 1.0]],
quaternions=[
rr.Quaternion.identity(),
rr.Quaternion(
xyzw=[0.0, 0.0, 0.382683, 0.923880]
), # 45 degrees around Z
rr.Quaternion.identity(),
],
colors=[(255, 0, 0, 128), (0, 255, 0, 200), (0, 0, 255, 255)],
# 15 view-dependent RGB coefficients (degrees 1-3) per splat:
sh_coefficients=[
[[0.5, 0.0, 0.0]] * 15,
[[0.0, 0.5, 0.0]] * 15,
[[0.0, 0.0, 0.5]] * 15,
],
),
)
Log a 3D gaussian splatting (3DGS) PLY file
"""Log a 3D Gaussian Splatting (3DGS) PLY file."""
import sys
import rerun as rr
if len(sys.argv) < 2:
print(f"Usage: {sys.argv[0]} <path_to_splats.ply>")
sys.exit(1)
rr.init("rerun_example_gaussian_splats3d_ply", spawn=True)
rr.log_file_from_path(sys.argv[1])