Include Gaussian splatting models in .babylon files

Hey! Correct me if I’m wrong. I tried saving some .babylon files from scenes that had 3D splat models in them, but those were not included when I opened those files in sandbox. That would be awesome feature to support that :slight_smile:

I believe it is not yet supported.

1 Like

cc @Cedric

1 Like

Indeed, it’s not supported. I have a list of modifications related to file serialization. I’ll check if I can do something with .babylon.

1 Like

Thanks @Cedric!

Just because you mentioned serialization, I thought I’ll ask this here as well. I noticed that SuperSplat editor can export compressed .ply file, which is twice smaller than .splat file. Splat file imports work well with babylonjs, but with compressed ply variant I’m getting an error related to uint property type during the import in Babylon. Maybe your list of modifications will address that? My rough guess is that their use of uint instead of int in compression just cuts the file size in half :slight_smile:

I don’t see how changing from int to uint might change compression but I’m curious to try :slight_smile:
Do you have an example of compressed .ply I can try ?

@Cedric I might be very wrong on that guess :slight_smile:
palm.zip (2.2 MB)

I could only attach a zipped file here. After you unarchive you’ll see it’s called palm.compressed.ply and it is possible to import that to supersplat editor. If I export this same scan to .splat format from their editor it becomes 4.5mb instead of 2.3mb.

1 Like

Hi @Cedric , I saw a recent PR mentioning that you supported these compressed splats, but I’m on Babylon 7.30 and I still get this error when trying to load one! I’ve included the file below.

ERROR
Unsupported property type: uint
at GaussianSplattingMesh.ConvertPLYToSplat (webpack-internal:///…/node_modules/@babylonjs/core/Meshes/GaussianSplatting/gaussianSplattingMesh.js:224:31)
at eval (webpack-internal:///…/node_modules/@babylonjs/corePreformatted text/Meshes/GaussianSplatting/gaussianSplattingMesh.js:308:50)

File: Dropbox

Hey @gabrieljbaker I think you may need to update to ImportMeshAsync variant as discussed here:

Hope that helps
PS - I was able to load the LivingRoom file :wink:

API changed a little to be more consistent with the rest of the asset loading in the engine.
I kept old loading method but it’s now deprecated.

1 Like

Yep - my fault, the importmeshasync method works nicely.

The only thing I’m noticing now is that when adding one of those compressed splats (same as the one linked above), it comes in flipped over! Any ideas there?

I compressed a bunch of .ply using supersplat without getting a flip on Y axis. what tool did you use?