Parallax issue (glTF model without terrain)


When I had a closer look at my models I noticed that there is a parallax effect visible when I rotate the camera (see images: Image 1: how it should be (model exactly at the desired position), Image 2: tilted view on the same model, as you can see, the model is now “over” the grey path (the path is part of the background image and not a model itself) on the ground near the river, Image 3: same effect on the other side, now the model is shifted away from the grey path).

I had this problem before when I used a terrain provider, but now it is just a “flat” earth without any terrain associated. I thought when there is no height information included then this effect should not happen. The models were not produced with the WGS84 Ellipsoid in the “background” in CityEngine, could that be a problem? Is there any height information somewhere stored in the gltf model itself (there are no specific z values associated in the DAE file)? The DAE and the glTF file of this building are attached.

(I draw the models with "Transforms.eastNorthUpToFixeFrame(origin); but it happens also with Transforms.headingPitchRollToFixedFrame(origin, heading, pitch, roll), the latter three are set to 0.)

Thanks for any tips :slight_smile:




geb_Shape_59.dae (696 KB)

geb_Shape_59.gltf (587 KB)

My guess is that the building is partially buried under the ellipsoid Earth, but Cesium doesn’t clip models with the ellipsoid Earth, only with terrain. Check out this post!topic/cesium-dev/QcaG4hMW9tU


That’s basically the case, yes. I tried also several manual “height-offsets”. But the problem is that all models are (depending on their height) need another offset (i.e. the right offset for the highest model would result in many other models flying around, see attached images).

I tried some ideas from the other thread, thanks for the link! But so far without any success. Maybe its just due to my limited knowledge…

  • viewer.scene.globe.getHeight() results in “undefined” (Terrain provider loaded as described in the tutorial.).
  • Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal() gives me a x, y and z value. I can scale the z value and use it again for the model position, but this is similar to the “manual height-offset”.

I do not really understand why the models are not drawn “on the ground” or another “plane” but somewhere in between (it seems to me that a certain level in the “middle” of each model is taken as the “0” plane), is there a reason for that? And especially I’m still missing a way to move the models exactly the amount up so that they are “on the ground”.



I’ve created a related thread here:!topic/cesium-dev/imIpoZHvKrM