Why Is My 3D Tileset Not Aligning Correctly with Terrain in CesiumJS?

Hello

I have successfully loaded a custom 3D Tileset (converted from CityGML) into CesiumJS but the tiles appear slightly floating / sunken relative to the terrain; even though I have applied a georeferenced bounding volume & ensured the tile set is positioned with appropriate RTC_CENTER/transform. :slightly_smiling_face: Interestingly; the issue becomes more noticeable when zooming in or switching terrain providers (e.g., Cesium World Terrain vs. custom terrain). :upside_down_face:

I have verified the tile coordinate system (EPSG:4978) & used tools like 3d-tiles-tools to inspect the tileset’s transform metadata. Even manually tweaking the transform matrix doesn’t produce a reliable fix it either overcorrects or breaks level-of-detail rendering. :thinking:

The same tileset aligns correctly in other engines; so I am wondering if Cesium’s terrain exaggeration / terrain clamping behavior might be interfering. :thinking:I checked Styling and Filtering 3D Tiles – Cesium guide for reference . Working with CesiumJS has deepened my understanding of what is javascript, especially when debugging transform logic & 3D content alignment issues. :thinking:

Is there a best practice for aligning tilesets precisely with varying terrain? Should I consider disabling terrain or using heightReference: NONE, / is the :thinking:re a specific transform strategy that ensures better Z-alignment regardless of terrain source?

Thank you !! :slightly_smiling_face:

Hi @stevediaz, welcome to the community!

In your input CityGML file, what are the elevations measured from? Are they heights above sea level, or heights above the WGS84 ellipsoid?

CesiumJS uses heights that are referenced to the WGS84 ellipsoid. See this previous thread on terrain elevations for more discussion.

If you can estimate the vertical error that you are seeing at a given longitude/latitude, we could get a quick check of whether the geoid vs ellipsoid error is enough to explain it.