So … there are a few issues coming together. I can only describe ~“something like a ‘workaround’” for now.
The fuzziness seems to be caused by the orientation. The reason why I vaguely suspected ~“something like this” is that it looked similar in Jagged rendering for SPZ Gaussian Splats · Issue #12749 · CesiumGS/cesium · GitHub . That issue is closed, but I’m not sure what to do with that…
In this particular case, the main source of the problem seems to be the “Roll: -90” that was inserted in the tileset location editor.
One “workaround” for now could be to apply that rotation to the input data instead. In the SuperSplat editor, when you load the PLY file, then it inserts a rotation about 180 degrees around the Z-axis for some reason. (As I said, PLY has its own issues in that regard). You can set this to 0, and insert a rotation of -90 around the x-axis instead, and then export this as a PLY file that can be uploaded to ion.
Then, you should not modify the location of this asset with the location editor. Instead, you can apply the transform at runtime, as shown in this Sandcastle:
// Grant CesiumJS access to your ion assets
Cesium.Ion.defaultAccessToken = "...";
const viewer = new Cesium.Viewer("cesiumContainer");
const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(4267452);
viewer.scene.primitives.add(tileset);
const geoTransform = Cesium.Transforms.eastNorthUpToFixedFrame(
Cesium.Cartesian3.fromDegrees(22.99, 61.43, 0)
);
const scaling = Cesium.Matrix4.fromUniformScale(
6.46, new Cesium.Matrix4());
const modelMatrix = Cesium.Matrix4.clone(Cesium.Matrix4.IDENTITY);
Cesium.Matrix4.multiply(modelMatrix, geoTransform, modelMatrix);
Cesium.Matrix4.multiply(modelMatrix, scaling, modelMatrix);
// Should assign this as the model matrix, but then,
// https://github.com/CesiumGS/cesium/issues/13041
// kicks in...
//tileset.modelMatrix = modelMatrix;
// Assign it as a root transform instead (WORKAROUND!!!)
tileset.root.transform = modelMatrix;
await viewer.zoomTo(tileset);
(Insert your token and asset ID accordingly)
So, applying the rotation to the PLY data is working around some assumptions that are made for the PLY orientation, and some issue with the tileset location editor, and on top of that, there’s Regression in splats from PLY in 1.135 · Issue #13041 · CesiumGS/cesium · GitHub (mentioned in the inlined comment) which means that the matrix can not be assigned as the modelMatrix of the tileset.
(Let’s say that there are a few things about matrices, orientation, and coordinate system conventions that remain to be addressed…)
However, with this approach, it should be possible to render the tileset properly and at the proper location. Here’s a comparison between the data set rendered in
- Supersplat
- JSplat
- CesiumJS (without the workaround)
- CesiumJS with the workaround
Of course, rendering that data and rotating the view will still cause the splats to flicker and randomly disappear (see 3d gauss splatting 3dtiles lod render error · Issue #13016 · CesiumGS/cesium · GitHub ), but maybe it’s a reasonable workaround for the time being.