tiles_export – 3D Tiles Writer¶
3D Tiles (OGC) writer.
save_tileset() accepts:
an in-memory
GaussianCloud— spatially chunked,a path / URL to an existing
tileset.json— streamed and re-chunked,a
list[Tile3DContent]— written as-is (one GLB per tile) with each tile’sbounding_volumepreserved.
- class 3dgs_io.tiles_export.TilesetSaveOptions(chunk_size=10.0, geometric_error=100.0, save_options=<factory>, max_workers=None)¶
Bases:
objectOptions for exporting a GaussianCloud as a 3D Tiles tileset.
-
chunk_size:
float= 10.0¶ Side length of each cubic grid cell. The bounding box is divided into a regular 3D grid where each cell has this edge length. Points that fall into the same cell are written as a single GLB tile.
-
geometric_error:
float= 100.0¶ Root
geometricErrorwritten to the tileset. Controls at what screen-space error the viewer decides to load tiles.
-
save_options:
GltfSaveOptions¶ Options forwarded to
save_gltf()for each chunk GLB (e.g. SPZ compression, metadata).
-
max_workers:
int|None= None¶ Maximum number of threads used to write GLB tiles in parallel.
None(the default) letsThreadPoolExecutorchoose automatically based on available CPUs.
-
chunk_size:
- 3dgs_io.tiles_export.compute_bounding_volume(camera_positions)¶
Compute an axis-aligned
BoundingVolumeBoxfrom camera positions.- Parameters:
camera_positions (
ndarray) – (N, 3) array of camera positions used during training.- Return type:
- Returns:
A
BoundingVolumeBoxwhosecenteris the midpoint andhalf_axesis a diagonal matrix of per-axis half-extents.
- 3dgs_io.tiles_export.save_tileset(source, output_dir, options=None, *, root_transform=None, ext_attributes=None)¶
Write a 3D Tiles tileset from one of several source types.
- Parameters:
source (
GaussianCloud|str|Path|list[Tile3DContent]) –GaussianCloud— split into spatial chunks.str/Path— path or URL to an existingtileset.jsonto re-chunk (memory-efficient streaming).list[Tile3DContent]— each tile is saved as-is (one GLB per entry) with itsbounding_volumewritten into the child node.
output_dir (
str|Path) – Directory wheretileset.jsonand GLB files are written. Created if it does not exist.options (
Optional[TilesetSaveOptions]) – Export options. SeeTilesetSaveOptions.root_transform (
Optional[ndarray]) – Optional 4×4 column-major ECEF transform written to the root tile. Defaults to identity (omitted from JSON).
- Return type:
Path to the generated
tileset.json.