Skip to content

Follow-ups for Gaussian Splat SPZ support #12682

@javagl

Description

@javagl

I mentioned that in a comment in the Gaussian Splat SPZ Support PR, but it may be worth tracking this here:


There seem to be some assumptions about the structure of the glTF of which I'm not sure whether they will always hold:

this.splatPrimitive = loader.components.scene.nodes[0].primitives[0];

There is not necessarily a matrix property in that node. The first primitive may not be a Gaussian Splat primitive (or the Gaussian Splat primitive may not be the first one). There may also be multiple Gaussian Splat primitives in one glTF.


EDIT/Update: The following was addressed via #12706 (additional test cases may have to be considered):

Modifying the tileset modelMatrix does not seem to have an effect on the gaussian splat primitive. (Or at least not the "right" effect: It seems to affect the position and bounding volumes, but not the orientation).


Speaking of orientations: People might say that I'm obsessed with unit cubes. And I wouldn't even concur 😁 : I created a "Unit Cube Splat File". (It's rather a 10x10x10 cube, but unit-y in other ways). And when rendering this in BabylonJS, it looks like this:

Image

Exactly as expected. With the colors and such. 🔴 🟢 🔵

When putting this into a glTF and a tileset and rendering it with CesiumJS, it looks like this:

Image

There may be a million reasons why something is "wrong". For example, the bounding box. This is coming from the tileset JSON, and may therefore be "my fault". The splat is a 10x10x10 cube, and one might expect that the bounding volume has to be
[5.0, 5.0, 5.0, 5.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 5.0]
But that seems to be wrong. The one from the screenshot takes the RUB->LUF coordinates of the SPZ-to-glTF into account, and is
[-5.0, -5.0, 5.0, 5.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 5.0]
but that is also wrong. I've been twiddling with a few axis conversions, and couldn't get it "right" (i.e. matching the splat primitive). But I didn't spend too much time with that, because it's not clear whether the bounding box is wrong, or the rendering/placement of the splat primitive.

What's probably more important:

The orientation of the individual splats seems to be wrong! In the screenshot, the mouse cursor is hovering over the orange splat (orange ... between red and yellow - there's that unit cube again 🙂 ). And this seems to be oriented horizontally. But it should be oriented vertically (because it is that edge of the unit cube). In BabylonJS, this seems to be right.


I also noticed that the scaling factor from the tileset model matrix is not applied to the splat when the splat content is in the root tile, but it is applied when the splat content is in a child tile, but that may just be an artifact of the whole ~"matrices" point.


Here is an archive with that "Unit Cube Tileset", including the SPZ, GLB, tileset JSON, and Sandcastles for testing (including one with basic tileset modelMatrix editing functionality)

unitCubeTileset-2025-06-21.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions