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,
collisionMesh: true,
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 or three files:
filename(.voxel.json) - JSON metadata including bounds, resolution, and array sizesThe binary file layout is: