I was testing the new layer of buildings added to Cesium Ion, and I was wondering how the buildings can be adapted when we change the terrain (Add or remove cesiumTerrainProvider).
I was looking at these 3D Tiles Adjust Height
And above all this great example
But OSM buildings _rtcCenter is undefined.I tried using tile.boundingSphere.center as a center, but it doesn’t work either.
Is there any draft or idea how to adjust this ion layer when changing the terrain?
Cesium OSM Buildings are clamped to Cesium World Terrain, so using it on other terrain is going to present issues as mentioned here https://github.com/CesiumGS/cesium-ion-community/issues/321 and moving the entire tileset won’t be correct because the individual buildings need to be clamped to the new terrain.
One thing on our roadmap is to support tiling OSM data directly, that way you can upload a subset of the city/area from OSM and clamp that to your custom terrain on ion. See: https://github.com/CesiumGS/cesium-ion-community/issues/232
But if we take the land away, the buildings are floating.
It’s easy to reproduce it. We load OSM buildings with the ion ground and then remove the ground, the buildings float.
Can you adapt the height like the before samples?
You are correct that you currently must use Cesium OSM Buildings with Cesium World Terrain to get the correct results. It doesn’t yet support switching to other terrain providers.
It is possible to move the entire 3D Tileset (here’s an example Sandcastle) but this is not a correct solution because each individual building needs to be moved depending on the new underlying terrain.
Ok,I’ve already tried that. Well then it can’t be done for now.