threepipe
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

plugin-gaussian-splatting.md 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ---
  2. prev:
  3. text: '@threepipe/plugin-blend-importer'
  4. link: './plugin-blend-importer'
  5. next:
  6. text: '@threepipe/plugin-svg-renderer'
  7. link: './plugin-svg-renderer'
  8. ---
  9. # @threepipe/plugin-gaussian-splatting
  10. Exports [GaussianSplattingPlugin](https://threepipe.org/plugins/gaussian-splatting/docs/classes/GaussianSplattingPlugin.html) which adds support for loading .blend files.
  11. It uses [`three-gaussian-splat`](https://github.com/repalash/threepipe/blob/master/plugins/gaussian-splatting/src/three-gaussian-splat), a rewrite of [@zappar/three-guassian-splat](https://github.com/zappar-xr/three-gaussian-splat) (and [gsplat.js](https://github.com/huggingface/gsplat.js) and [antimatter15/splat](https://github.com/antimatter15/splat)) for loading splat files and rendering gaussian splats.
  12. [Example](https://threepipe.org/examples/#splat-load/) —
  13. [Source Code](https://github.com/repalash/threepipe/blob/master/plugins/gaussian-splatting/src/index.ts) —
  14. [API Reference](https://threepipe.org/plugins/gaussian-splatting/docs)
  15. [![NPM Package](https://img.shields.io/npm/v/@threepipe/plugin-gaussian-splatting.svg)](https://www.npmjs.com/package/@threepipe/plugin-gaussian-splatting)
  16. ```bash
  17. npm install @threepipe/plugin-gaussian-splatting
  18. ```
  19. ::: warning Note
  20. This is still a WIP.
  21. :::
  22. Currently working:
  23. * Importing .splat files (just array buffer of gaussian splat attributes)
  24. * ThreeGaussianSplatPlugin (Same as GaussianSplattingPlugin), add importer and update events to the viewer
  25. * GaussianSplatMaterialExtension for adding gaussian splat functionality to any material like Unlit, Physical
  26. * 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)
  27. * GaussianSplatGeometry holds the geometry data and and the sort worker. Computes correct bounding box and sphere.
  28. * SplatLoader for loading splat files and creating the geometry and material.
  29. * GaussianSplatMaterialUnlit, GaussianSplatMaterialRaw
  30. * GaussianSplatMaterialPhysical, working but normals are hardcoded to 0,1,0
  31. TBD:
  32. * Exporting/embedding splat files into glb
  33. * Rendering to depth/gbuffer
  34. * Estimate normals/read from file
  35. * Lighting in GaussianSplatMaterialPhysical
  36. ```typescript
  37. import {ThreeViewer} from 'threepipe'
  38. import {GaussianSplattingPlugin} from '@threepipe/plugin-gaussian-splatting'
  39. const viewer = new ThreeViewer({...})
  40. viewer.addPluginSync(GaussianSplattingPlugin)
  41. // Now load any .splat file.
  42. const model = await viewer.load<GaussianSplatMesh>('path/to/file.splat')
  43. ```