Bug in Rendering Tiles

Hi everyone!

This is something that’s giving me trouble since I first started using Cesium. Basically, I believe in some cases, tiles are rendered incorrectly.

I understand that tile level depends on the distance of that tile from the camera - but that’s not the only thing happening here.

In tile L5X16Y10, some part of tiles L6X32Y21 and L6X33Y21 (the two tiles below it) are being rendered, but not entirely. (As one may notice, till the latitude where the cut yellow line stops).

Is this correct? I think not. Why does this happen?


To reproduce, I just opened a Cesium Sandcastle and wrote the following code:

var viewer = new Cesium.Viewer(‘cesiumContainer’);

viewer.scene.imageryLayers.addImageryProvider(new Cesium.TileCoordinatesImageryProvider({
tilingScheme: new Cesium.WebMercatorTilingScheme()


Hi Juan,

Even though it looks strange, that is working correctly. The terrain uses the GeographicTilingScheme. Because your TileCoordinatesImageryProvider is using the WebMercatorTilingScheme, there is not a 1:1 mapping between terrain and imagery tiles. So some terrain tiles will be rendered with only part of an imagery tile attached.


Wow, that clarifies a lot, thanks.

Is there any way to force the terrain (or the whole Cesium) to use a WebMercatorTilingScheme, instead of the default GeographicTilingScheme?


I believe the terrain is pretiled based on the GeographicTilingScheme, so changing that would mean the terrain tiles show up in the wrong places. I think the only way to do that would be to retile the whole world terrain in this tiling scheme.

Is this causing artifacts in the actual imagery? Can you share some more info or screenshots of that? (other than the debug views)

Well, I’m doing some calculations and rendering based on the current zoom level, tiles being shown, etc.

The data source I use has a Web Mercator Tiling Scheme.

The artifact I showed complicates all of this.

The question is simple: is there any way to force Cesium to internally (QuadtreeTile) use WebMercatorTilingScheme, instead of GeographicTilingScheme?

Like I said, you could, but since the terrain is tiled in the GeographicTilingScheme I think that’ll visually break. In the constructor of CesiumTerrainProvider.js you can see it creates the GeographicTilingScheme.

Hi Juan,

If you’re using the default EllipsoidTerrainProvider (i.e. a smooth globe instead of terrain), you can specify a tiling scheme. Here’s a Sandcastle showing how.

Note the holes at the North and South poles. Because the Web Mercator projection stops at ~85 degrees latitude, there will be holes at a the poles if you use this projection for terrain.

If you’re using Cesium World Terrain or any other terrain from Cesium Ion, the Geographic projection is the only option.

If you have or create your own terrain, you can use Web Mercator if you like. The summary here is that the projection you tell Cesium to use must match the actual projection used by the terrain source, or else nothing will work.


Thanks, this was exactly what I was looking for!