Create KHR_spz_gaussian_splats_compression tooling?

Hi, was checking the KHR_spz_gaussian_splats_compression glTF extension (glTF/extensions/2.0/Khronos/KHR_spz_gaussian_splats_compression at draft-spz-splat-compression · CesiumGS/glTF · GitHub), Q: is there some tooling available to create these glTF’s (from spz)?

1 Like

@Jason_Sobotka is supposed to talk about the extension on 2025-06-04T17:00:00Z see: Gaussian Splats Town Hall Part 3: Research Insights and Interoperability - Metaverse Standards Forum

1 Like

There currently is not (yet) much tooling support for this. The extension itself as well as the support in CesiumJS are currently under heavy development. Depending on the progress and feedback, people can expect to see better support here soon.

However, the extension in its current form is not very complicated. It mainly defines a set of special mesh primitive attributes. (The names of these attributes may have to revised, in view of Disambiguation of attribute semantic names · Issue #2111 · KhronosGroup/glTF · GitHub , but that’s a detail for now). These attributes are given as accessors without buffer views. And they are basically just “filled” with the data that is taken from a plain SPZ file (which is just stored in the buffer view that is set in the extension object itself).

So it’s not even strictly necessary to fully read or process the SPZ data in order to create such a glTF. It is enough to know the number of points (and the number of spherical harmonics degrees) which are just written in the first few bytes of the file header. Apart from that, the whole SPZ can just be dumped into a buffer view, as it is.

Note that right now (as far as I know) such a glTF can not be loaded as a Model directly in CesiumJS. It has to be part of a tileset. But wrapping a small tileset around such a glTF is also not terribly difficult.


And although I’m pretty sure that this will bite back in one way or another, I’m posting it anyhow:

I just created a Java loader for SPZ, partially based on the original SPZ implementation, and added an SpzToTileset example.

Note: This was a pure spare time task. The project is not related to Cesium!

Given an SPZ file, it writes the glTF and the matching tileset JSON into some output directory. This is currently all hard-wired - I just used one of the examples from niantic (not included in the repo). The example SPZ has ~18MB, and that’s a bit too large for a sensible tile content. It should be broken down into smaller tiles, to form a proper tileset with LOD and whatnot.

However, the result can then be loaded with the branch behind the (DRAFT!) PR that adds SPZ support to CesiumJS:

Again: Everything is pretty much in flux here. It might be that none of that works … tomorrow. But the main point is: Adding support for this extension on the producing side should be relatively easy. (Most of the work has to be done by the consuming side - there’s always some trade-off for that…)

2 Likes