There is a way to ask Cesium engine to remember the terrain?


i am developing a flight simulator, and making with the camera a complete 360 degree around the vertical axis i notice that the terrain at my back is “forgotten” by Cesium engine also if it was already previously loaded. So for each 360 degree the terrain seems to be reloaded again and again (at least this is the feeling looking at the screen! :slight_smile: )

So there is a way to ask to Cesium engine not to forget the previous loaded terrain at camera back?

Thank you! :slight_smile:

Have you looked at property scene.globe.tileCacheSize ?
Not sure if that applies to terrain too, but worth a try.

Thank you Willen, I will try!

Any other suggestions?

If your concern is about network payload, you could use webbrowser database like indexeddb.

bobactor40, Cesium terrain is cached by the browser for a year, so there is no concern for network payload here. The tileCacheSize setting pointed to by Willem is the correct solution.

Ultimately, we might want different strategies for terrain loading in Cesium as well for the ability to “lock” a section of terrain so that it’s always available regardless of current view.

Hi Matthew,

I have a similar question but it’s about the map.

Is there a way to cache more maps?

When I turn the camera away then back again, it needs to reload the map, which is quite obvious when running the 3D model example where users rotate the camera on a quite high position.

I’m wondering if there is a similar way to cache the map like caching the terrain data.

But I cannot find something like that in the API document.

Is there a way to do this?

or no way :frowning:

在 2016年1月19日星期二 UTC+8上午5:04:37,Matthew Amato写道:

OK , confirmed that incrementing the scene.globe.tileCacheSize variable the problem is solved! :slight_smile:

RikM, glad to hear it!

Phoenix, the tileCacheSize is a combined value for both terrain and imagery (If I recall correctly, a single cached tile already had both the terrain and imagery baked, it’s not the raw data that gets cached but rather all data for that tile)…

Thanks Matthew,

but I after I increased the tileCacheSize, the image(or say map) was not cached. The terrain data was cached successfully, I can saw the height data in blue when re-loading map.