cesium icon indicating copy to clipboard operation
cesium copied to clipboard

OSM Buildings broken with multiple viewers

Open ggetz opened this issue 2 years ago • 2 comments

Originally reported on the forum.

If i create two viewers on the same page and add Osm Buildings to both of them, lots of the building’s polygons get stretched and misplaced, creating a “blob” that covers the entire map.

Sandcastle example

Notes:

  • If you comment out either one of the viewXX.scene.primitives.add(await Cesium.createOsmBuildingsAsync()); lines, the other viewer works perfectly fine.
  • Sometimes, the bug occours on only one of the two viewers, but it never happened to me that both viewers work fine at the same time.
  • I got a similar bug on an old version of cesium when loading OSM Buildings twice in the same viewer, but i can’t manage reproduce consistently.

image

ggetz avatar Aug 24 '23 13:08 ggetz

Also reported in https://github.com/CesiumGS/cesium/issues/11606

ggetz avatar Nov 06 '23 14:11 ggetz

In #11341 I ran into this when making a Sandcastle.

I determined that it has to do with the CESIUM_primitive_outline extension (which does modify the index buffer). It seems like applying the outlines to the first copy of the tileset messes up the indices for the second copy.

See This Sandcastle

with enableShowOutlines: true on the first tileset copy (messy geometry): image

with enableShowOutlines: false on the second tileset copy (no artifacts): image

ptrgags avatar Jan 04 '24 15:01 ptrgags