Terrain Tiles Constantly Reloading When Moving Camera

Hi,

My application is moving the camera close to the ground in a regular motion at about an aircraft speed and altitude.

I noted some regular flashing in the rendering and could observed that the terrain tiles are constantly reloaded: even when LOD shows high level of detail, I can see the tile closest to the camera being reloaded and cycle through all the LOD levels before settling again at the previous, high, LOD. This happens constantly during the camera motion and creates all kinds of visual artifacts. Also, measurement of ground elevation at the camera location is rendered erratic since the tile keeps cycling through all different LOD levels.

Anything I missed? Anything I can do to solve this problem? Is this a bug in Cesium?

Thanks,

Xavier.

Hello Xavier,

Sorry, I don’t think there’s anyway to avoid this. It’s in our long term roadmap to improve tile loading, but it may be a while before anyone has a chance to tackle it.

Best,

Hannah

Hi Hannah,

Thanks for the quick reply. That’s a shame because this looks like a bug that is fixable. I also believe this is seriously impacting rendering performances. I’ll stay tuned.

Cheers,

Xavier.

Hi Xavier,

Try increasing the tileCacheSize (which will also increase memory usage) and/or increase maximumScreenSpaceError (which will decrease visual quality).

Patrick

Hi Patrick,

Thanks for the suggestion. I already tried both tricks but sadly, they only just delay the tile swapping issue (while also degrading the quality).

Cheers,

Xavier.

Xavier,

Do you have a video or demo of this? We are starting the cache replacement for 3D Tiles and want to take this into account.

Thanks,

Patrick

Hi Patrick,

I feel very silly because the bug was mine. Although it uncovered a different issue.

What happened is the following. I test the terrain elevation by using globe.getHeight(). There is a certain fringe when crossing over the gap between terrain tiles where this method returns “undefined”. My code was placing the camera at altitude 0 in that case, and back to normal when over the next tile. This happened very quickly (1 frame). The camera moving down to 0 and back probably caused the LOD recycling of the tiles.

Not sure if the undefined getHeight() value can be fixed. I work around it by caching the last “good” elevation value.

Also, I definitely observed the tiles reloading through all the different LOD levels when I am pretty sure the maximum LOD was already in cache. This may be something you want to or are looking into.

Sorry for the confusion and thank you for following up.

Xavier.

Xavier,

If you can create a minimal code example and verify this is a Cesium issue, please submit an issue about globe.getHeight().

Patrick

Will do, thanks.

To follow up here, #4622 fixes #3411. It will be in Cesium 1.29 on January 2.

Patrick