gltf_io – glTF/GLB I/O¶
- class 3dgs_io.gltf_io.GltfSaveOptions(spz_compression=False, metadata=None)¶
Bases:
objectOptions for saving to glTF/GLB format.
- 3dgs_io.gltf_io.save_gltf(gc, path, options=None, *, ext_attributes=None)¶
Save a GaussianCloud to a KHR_gaussian_splatting compliant glTF/GLB file.
ext_attributesis an optional{name: (N,) float32}mapping of per-Gaussian scalars (e.g.lidar_intensity_raw,lidar_raydrop_logit). Each is stored as a quantized accessor under theEXT_gaussian_lidarextension on the primitive, kept out of theattributesdict to avoid GLSL-attribute-name issues in generic viewers.- Return type:
- 3dgs_io.gltf_io.load_gltf(path)¶
Load a GaussianCloud from a KHR_gaussian_splatting compliant glTF/GLB file.
- Return type:
GaussianCloud
- 3dgs_io.gltf_io.load_gltf_with_metadata(path)¶
Load a GaussianCloud,
asset.extrasmetadata, andEXT_gaussian_lidararrays.- Return type:
tuple[GaussianCloud,GlbMetadata|dict[str,Any] |None,dict[str,ndarray]]- Returns:
A 3-tuple
(GaussianCloud, metadata, ext_attributes).metadata is a
GlbMetadatawhen the extras match the schema, the raw dict for legacy files, orNoneif none.ext_attributes is a
{name: (N,) float32}dict — empty if the file carries noEXT_gaussian_lidarblock.