Skip to content

@threepipe/plugin-gaussian-splatting

Exports GaussianSplattingPlugin which adds support for loading .blend files.

It uses three-gaussian-splat, a rewrite of @zappar/three-guassian-splat (and gsplat.js and antimatter15/splat) for loading splat files and rendering gaussian splats.

ExampleSource CodeAPI Reference

NPM Package

bash
npm install @threepipe/plugin-gaussian-splatting

Note

This is still a WIP.

Currently working:

  • Importing .splat files (just array buffer of gaussian splat attributes)
  • ThreeGaussianSplatPlugin (Same as GaussianSplattingPlugin), add importer and update events to the viewer
  • GaussianSplatMaterialExtension for adding gaussian splat functionality to any material like Unlit, Physical
  • GaussianSplatMesh a subclass of Mesh2 for holding the gaussian splat geometry and a material with gaussian splat extension. also handles basic raycast in the splat geometry. (assuming simple points)
  • GaussianSplatGeometry holds the geometry data and and the sort worker. Computes correct bounding box and sphere.
  • SplatLoader for loading splat files and creating the geometry and material.
  • GaussianSplatMaterialUnlit, GaussianSplatMaterialRaw
  • GaussianSplatMaterialPhysical, working but normals are hardcoded to 0,1,0

TBD:

  • Exporting/embedding splat files into glb
  • Rendering to depth/gbuffer
  • Estimate normals/read from file
  • Lighting in GaussianSplatMaterialPhysical
typescript
import {ThreeViewer} from 'threepipe'
import {GaussianSplattingPlugin} from '@threepipe/plugin-gaussian-splatting'

const viewer = new ThreeViewer({...})
viewer.addPluginSync(GaussianSplattingPlugin)

// Now load any .splat file.
const model = await viewer.load<GaussianSplatMesh>('path/to/file.splat')

ThreePipe - Make 3D applications on the web