Maptiler Terrain is X dozens of meters below my model

Hi,

when I use Ceisum Ion layer
Cesium.Terrain.fromWorldTerrain()
I am getting perfect fit for my model.

However, when I use Maptiler

			const viewer = new Cesium.Viewer('cesiumContainer', {
				animation: false,
				baseLayerPicker: false,
				navigationHelpButton: false,
				sceneModePicker: false,
				homeButton: false,
				geocoder: false,
				fullscreenButton: false,
				baseLayer: new Cesium.ImageryLayer(new Cesium.UrlTemplateImageryProvider({
					url: `https://api.maptiler.com/tiles/satellite-v2/{z}/{x}/{y}.jpg?key=${key}`,
					minimumLevel: 0,
					maximumLevel: 20,
					tileWidth: 512,
					tileHeight: 512,
					credit: new Cesium.Credit("\u003ca href=\"https://www.maptiler.com/copyright/\" target=\"_blank\"\u003e\u0026copy; MapTiler\u003c/a\u003e \u003ca href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\"\u003e\u0026copy; OpenStreetMap contributors\u003c/a\u003e", true)
				})),
				timeline: false,
				terrain: new Cesium.Terrain(Cesium.CesiumTerrainProvider.fromUrl(`https://api.maptiler.com/tiles/terrain-quantized-mesh-v2/?key=${key}`, {
					credit: new Cesium.Credit("\u003ca href=\"https://www.maptiler.com/copyright/\" target=\"_blank\"\u003e\u0026copy;MapTiler\u003c/a\u003e \u003ca href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\"\u003e\u0026copy; OpenStreetMap contributors\u003c/a\u003e", true),
					requestVertexNormals: false
				}))
			});
			viewer.scene.globe.depthTestAgainstTerrain = true;

The model is rendered a few dozen of meters above the terrain.

What am I missing here? I guess the coordinate system might be wrong?

Thank you!
BVS

Hi @bvsbvs, Cesium World Terrain returns heights relative to the WGS84 ellipsoid, and this is what CesiumJS expects. See Elevation off by 30m?.

Is it possible that Maptiler terrain is referenced to the geoid instead? You may want to check with Maptiler to confirm.