TLDR: Is there a cesium sandcastle of clipping multiple models and terrain? We have got our own terain and 3d tiled models to clip and the clipping planes we have created are rendering at different points on the models.
Recently we have tried to clip two different models. One is a Photogrammetry Mesh and the other a pointcloud. Eventually we would like to have a clipping cube in cesium that would clip everything (eg terrain, multiple 3d tiled models). The goal looks like what Potree can do for pointclouds. Check it out here:
What have we’ve got so far:
Two 3d tiled models of the same building, ones a mesh, the other a pointcloud. It all renders nicely in cesium, but when we try to place our clipping “square” they appear at different points on each model.
You can see the clipping cube on the mesh in this photo (its the white square on the roof, part of the model is missing hence the big gap - don’t worry about that.)
On the pointcloud the same clipping planes have been put in a different location - to the left of the chimneys on the left.
I am aware of these threads:
3d-tiles & Clipping Planes - CesiumJS - Cesium Community which says clipping planes are relative to the tileset’s root transform.
Clipping Planes for multiple Tilesets - CesiumJS - Cesium Community
Also, there is this open issue in github:
Remove scene graph and ownership concepts from clipping planes · Issue #8554 · CesiumGS/cesium · GitHub
From researching the above threads we know we should be using the inverse transform, but we are probably doing it wrong, but we are certainly not the first ones to bump into this. Does anyone know of other examples? We want to make this work for any set of models.
If a sandcastle would be helpful please let me know.