Has anyone encountered a "floating" reality mesh when viewing in Cesium / CC Web Viewer 2.0 against background terrain / imagery? I'm not sure what must be done to lower the elevation to match the background terrain elevation. To further complicate matters, it seems to differ between the two terrain options.
STK World Terrain meshes:
WGS84 Ellipsoid:
I haven't come up with much on searches. Any info is appreciated.
-Mike
This is the closest I have found while searching. Hopefully it's not this complicated.https://cesiumjs.org/tutorials/Cesium-Workshop/
You may notice that the buildings are not correctly positioned at ground level. Fortunately it’s easy to fix. We can adjust the position of the tileset by modifying its modelMatrix.
modelMatrix
We can find the model’s current offset from the ground by converting the tileset’s bounding sphere into a Cartographic, then adding the desired offset and resetting the modelMatrix:
Cartographic
// Adjust the tileset height so its not floating above terrain var heightOffset = -32; city.readyPromise.then(function(tileset) { // Position tileset var boundingSphere = tileset.boundingSphere; var cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center); var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0); var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, heightOffset); var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3()); tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation); });