How can I use gaussian splatting data for cesium?

Hi, there:

I want to use Gaussian Splatting data in Cesium (version 1.140.0), but I’m not sure which dataset format is actually supported.

I have several Gaussian Splatting datasets, but I don’t know which one is suitable for Cesium.

When I load 3dgs_3dtiles/tileset.json, the model appears as a large number of points and looks very blurry.

When I load 3dgs_pc_pnts/tileset.json, the model can be displayed, but it becomes very blurry when I zoom in.

Is there a recommended way to visualize Gaussian Splatting data in Cesium 1.140.0 while preserving the original rendering quality?

My goal is to achieve a rendering quality similar to the original Gaussian Splatting viewer (for example, DJI Terra Web Viewer), rather than a point-cloud-like visualization.

export async function add3DTilesSceneAsync(viewer: Cesium.Viewer, baseTileSet) {
  //   baseTileSet = 'terra_b3dms/pjtest/3dgs_pc_pnts/tileset.json'; // 点云
  baseTileSet = '3dgs_3dtiles/tileset.json'; // 不行

  //   baseTileSet = '3dgs_terrags/tileset.terrags'; // 不行
  //   baseTileSet = '3dgs_ply/geo_desc.json'; // 不行

  if (!baseTileSet) return;
  try {
    const tileset = await Cesium.Cesium3DTileset.fromUrl(baseTileSet, {
      maximumScreenSpaceError: 0.5,

      skipLevelOfDetail: false,
      immediatelyLoadDesiredLevelOfDetail: true,

      loadSiblings: true,
      preferLeaves: true,

      dynamicScreenSpaceError: false,

      preloadWhenHidden: true,
      preloadFlightDestinations: true,

      cacheBytes: 1024 * 1024 * 1024,
      maximumCacheOverflowBytes: 512 * 1024 * 1024,
    });
    viewer.scene.primitives.add(tileset);
    viewer.zoomTo(tileset); // 加载完成后自动定位
  } catch (error) {
    console.log(`Failed to add world imagery: ${error}`);
  }
}

It might be necessary to add some details about how exactly these tilesets have been created. There are some “requirements” for Gaussian Splat tilesets to work in CesiumJS (and these are currently unspecified and not publicly visible, so to speak).

The first one is that the .glb files that contain the Gaussian Splat data must have a very specific structure. The most important one is that they must use the KHR_gaussian_splatting_compression_spz_2 extension.

(Other requirements are that they may not contain multiple mesh primitives, and that the Gaussian Splat data must be stored in bufferView with index 0, and there are other reqirements about the nodes that the mesh primitives are attached to, which probably need to have the identity transform, but maybe they can (or have to) have a transform that peforms an axis conversion, and maybe they can have a translation, but certainly not a scaling or rotation)

The second one is that the tileset JSON must contain the following extension declaration:

{
  "extensions" : {
    "3DTILES_content_gltf" : {
      "extensionsUsed" : [ 
        "KHR_gaussian_splatting", 
        "KHR_gaussian_splatting_compression_spz_2" ],
      "extensionsRequired" : [ 
        "KHR_gaussian_splatting", 
        "KHR_gaussian_splatting_compression_spz_2" ]
    }
  },
  "asset" : {
    "version" : "1.1"
  },
  ...

@Marco13 @cesiumTs By the way, I’d like to know what the Gaussian splatting data with ID 3667784 is in the 3d-tiles-gaussian-splatting-comparison example in the Sandcastle.

@Marco13 Okay, thanks for you answer,

This is a file named tileset.json and geo_desc.json in 3dgs_3dtiles folder.
3dgs_3dtiles.zip (105.8 KB).It has many *.glb file in model_0 folder.

There only a file named cloudR.las file in the 3dgs_pc_las folder,I can’t upload it because it’s too large.

There have a file named tileset.json in the 3dgs_pc_pnts folder.
tileset.zip (429 Bytes).There hava many named pointclound_00.json and pointcloud_00.pnts file that come in pairs,as shown below:

There hava a geo_desc.json and metadata.xml
file (click to download) (713 Bytes) in the 3dgs_ply folder , which contains many point_cloud.ply files in it .


Last one,there hava geo_desc.json and tileset.terrags
file(click to download) (105.9 KB) in the 3dgs_terrags folder. There has many files named 0_0_0.tags , as shown below:

Having only the top-level files will not be enough for a deeper investigation. But… the one that is most likely the one that you’d want to try to load in CesiumJS is the one from the 3dgs_3dtiles.zip.

This is assuming that the GLB files actually contain Gaussian splatting data in the poper from. (If you attach one of these GLB files, as a ZIP, here in the forum, I can have a closer look).

But even if the GLBs have the proper format, you’d still have to insert

  "extensions" : {
    "3DTILES_content_gltf" : {
      "extensionsUsed" : [ 
        "KHR_gaussian_splatting", 
        "KHR_gaussian_splatting_compression_spz_2" ],
      "extensionsRequired" : [ 
        "KHR_gaussian_splatting", 
        "KHR_gaussian_splatting_compression_spz_2" ]
    }
  },

into the tileset JSON.

OK,thanks again for you , This is *.glb file (3.3 MB) in the 3dgs_3dtiles/model_0 folder . Yes, You are right, I can use the tileset.json in cesium,but the effect is very poor, as shown below:

This is *.pnts file (315.5 KB)in 3dgs_pc_pnts/BlockR folder, samely,the effect is very poor when I zoom in ,as shown below:

This is tileset.terrags file (2.0 MB)in the 3dgs_terrags folder, I can’t use it in cesium ,but , As I mentioned above,DJI Terra Web Viewer can render it, I don’t know why.

That GLB file appears to be invalid, according to glTF Validator . In any case, it does not seem to contain a gaussian splatting extension.