How to avoid terrain occluding 3D Tiles without breaking other depth testing?

Hey @BlockCnFuture,

Just to confirm my understanding: you have a scene where the globe terrain elevation is inaccurate and your 3D Tiles represent the actual ground surface, so you want tiles to always win visually over terrain without globally disabling depth testing.

It would also be good to know what terrain data you are using? Cesium world terrain, WGS84 ellipsoid, Google Photorealistic Tiles? Your own data?

As far as I’m aware, CesiumJS does not currently support per-tileset depth test control against terrain. Similar issue here with 2 different solutions you could try or look into, I probably wouldn’t recommend my 2 viewer method for performance reasons, although you’re welcome to try to get it more performant).

  1. Height offset your tiles using tileset.modelMatrix to be above/in line with the terrain (if needed) and use a clipping poly to hide the terrain (clipping polygon tutorial)
  2. You could try using an alternate terrain data source.

Let me know how that goes! It could be useful to provide some screenshots as well if neither of the above help you out