Voxelizes Gaussian splat data and writes the result as a sparse voxel octree.
This function performs GPU-accelerated voxelization of Gaussian splat data and outputs two files:
filename
The binary file layout is:
Options including filename, data, and voxelization settings.
File system for writing output files.
import { writeVoxel, MemoryFileSystem } from '@playcanvas/splat-transform';const fs = new MemoryFileSystem();await writeVoxel({ filename: 'scene.voxel.json', dataTable: myDataTable, voxelResolution: 0.05, opacityCutoff: 0.5, createDevice: async () => myGraphicsDevice}, fs); Copy
import { writeVoxel, MemoryFileSystem } from '@playcanvas/splat-transform';const fs = new MemoryFileSystem();await writeVoxel({ filename: 'scene.voxel.json', dataTable: myDataTable, voxelResolution: 0.05, opacityCutoff: 0.5, createDevice: async () => myGraphicsDevice}, fs);
Voxelizes Gaussian splat data and writes the result as a sparse voxel octree.
This function performs GPU-accelerated voxelization of Gaussian splat data and outputs two files:
filename(.voxel.json) - JSON metadata including bounds, resolution, and array sizesThe binary file layout is: