GaussianSplattingMesh serializer

For a long time GaussianSplattingMesh.prototype.serialize is missing so serialized GaussianSplattingMesh would result in a dummy mesh, not the GaussianSplattingMesh itself.

Now it’s here:

Some notes for reviewers:

  • keepInRam must be true to serialize splat data
  • Parts and GaussianSplattingPartProxyMesh are supported, but a dummy proxiedMesh with only getBoundingInfo() is created for each GaussianSplattingPartProxyMesh so constructor does not break.
  • GaussianSplattingPartProxyMesh is not exported so I managed to get it from part1.constructor
  • partIndices is compressed with Run-Length Encoding (RLE) during serialization, and recovered on Parse
  • flipY from IUpdateOptions needed to be stored to the instance to keep parsing correct
  • Mesh.Parse or BabylonFileLoader needs to be updated for this change to make it work with .babylon files

SceneSerializer supported, but GaussianSplattingPartProxyMesh needs to be manually added to scene to make it work correctly:

This would be wonderful to contribute upstream after 9.0. :smiley: Thanks for your work, as always!

Here is a PR:

3 Likes

Moving to “Feature requests” as a PR targeting it

2 Likes

And now it’s possible to have a demo targeting this pr: https://playground.babylonjs.com/?snapshot=refs/pull/18032/merge#FNEHUL