Cesium terrain and OSM buildings lod discrepancies

When using cesium world terrain with osm buildings, the terrain swapping lods to a lower level often causes the buildings to be under the ground to some extent. I understand the osm buildings are snapped to the world terrain, but it looks like to me like this is only true for the highest lod and any lod swaps may not be in sync.

Unfortunately the discrepancies are large enough that in some cases smaller buildings completely disappear under the terrain. Is this correct or am I doing something wrong? Is there any way to ensure the lods stay in sync?

Hi @flav,

You’re correct. The buildings are placed at the actual terrain height. At lower levels of detail, the terrain surface can be different from that. Cesium OSM Buildings uses “additive” refinement, so large buildings are placed at low LODs and smaller buildings are added at higher LODs, but a low-detail building is never replaced with a high-detail one. So synchronizing LODs will unfortunately not help here.

All that said, I’ve rarely seen cases where this creates obvious artifacts. Can you share where you’re looking, and perhaps also share a video of the effect?

Thank you @Kevin_Ring, that makes sense. I’m afraid I can’t share anything from the project, but these artifacts tend to be noticed from oblique angles on smaller buildings when observing them from farther away. Anecdotally, lower terrain lods tend to have a higher elevation, and this becomes more obvious in cities on non-flat landscapes.