Cesium : first impressions

Hi everybody,

I just discover cesium.js, as we're looking forward to find a 3D alternative to Google Earth plugin.
So far, it looks promising. I don't have played yet in the sandcastle but probably will.

What I want to discuss here is more about my first impressions on look and feel of cesium, in particular when compared to Google Earth.

So let's get started :

CACHE :

For tile caching you can use:
// The size of the terrain tile cache, expressed as a number of tiles.

var scene = viewer.scene;

scene.globe.tileCacheSize = ;

To control the tile/zoom behaviour you can look into the scene.globe.maximumScreenSpaceError property. There is a performance trade-off here!

Willem

Caching of both imagery and terrain tiles in Cesium is already done automatically by the browser, assuming that the imagery/terrain servers being used are properly configured to allow caching of HTTP responses.

Hi Willem and Scott,
Thanks for the reply.

The globe.tileCacheSize is actually really helping to ease navigation. I put it to 1000 and it helps greatly, only increasing the memory usage of my browser by 80 MB.

But it's only part of what I was thinking about when I was talking about caching.
This is RAM caching, now what I was thinking was disk caching so that :
- it can be reused for future Cesium session
- it can be shared by multiple instances of Cesium.

I'm aware it's a little bit out of the scope of Cesium as this would need to use some kind of external tool to write on disk but it would be very handy for people looking over the same area between multiple sessions and/or in multiple instances.

For the control of tiles combined with zoom, it is indeed better if I put maximumScreenSpaceError to 1. If I put it lower than 1, it starts to be a little too much for the CPU.

If I understand well as it works (I have to say I don't find the name of it very inspiring) : depending on the zoom level, I will see more or less precise tiles. Does that mean it includes all visible tiles over 360° or is it also dependent on the distance from the camera ?

For this feature I would also like to have some kind of fading in/out for a smoother transition during zoom in/out, if it's possible

In regards to the sawtooth coastlines, you are probably referring to the water mask used for the water effect. While we are currently working on generating new and improved watermasks, it is an optional feature and you can disable it. Have a look at the Cesium Terrain and Water Tutorial and the Terrain Sandcastle example to see how various terrain effects can be configured.

Alex

You're right, if I disable this mask, the problem goes away.

The standard browser file caching I mentioned earlier is indeed disk-based caching, and has always worked in Cesium, without any need for an external tool. Tiles will be retrieved from browser cache automatically, across multiple instances or future sessions.

As a concrete example, both Bing imagery and STK Terrain include the proper response headers to allow caching, so once tiles are loaded into cache, the browser doesn’t actually make network requests when they are needed in the future.

Ah, you are right, it works, at least in chrome but not in IE 11, and I was trying this in IE. I don't usually use IE, so it's in a factory configuration state.

That's good.

Now I wonder : what happens if I open a Cesium instance with tileCacheSize = 1000 and then open another instance of Cesium with a lower tileCacheSize.
Will the exceeding previously cached tiles be removed from the cache ? Or is this option has nothing to do with disk caching ?

The tileCacheSize option has to do with how many tiles are stored in memory and has nothing to do with disk caching (which is controlled by the browser).

I’ll add that it’s also possible to implement custom caching that uses local storage so tiles can be served even when you are completely disconnected from the internet. Cesium doesn’t have out of the box functionality to do this, but others have implemented it with much success.

Thanks.
I wonder, is the caching doesn't work also for you on IE or is it just me ?

I'll see how caching react after some use (but so far in chrome it looks good), but I'll be happy to see how custom cache implementation works if you have some project in mind.

I would also be interested to know if there are any fix for the performance problem I mentionned. E.g, when there are no interactions, Cesium is consuming CPU if it's on the focused tab of the browser.

Regarding the performance problems, there is an active issue thread open on the Cesium github page. HERE

The details of the discussion is outside my area of knowledge, but it might be a good issue to keep an eye on if you hadn’t seen it already.

Thanks, I'll keep an eye on it.