Cesium : first impressions

876 views
Skip to first unread message

theog...@gmail.com

unread,
Mar 18, 2015, 8:40:09 AM3/18/15
to cesiu...@googlegroups.com
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 :
-------

Cesium.js run without any plugin, which is great.
But in the same time, it removes the caching capabilities of the Google Earth plugin.
And that's a great deal for us as our customers are working in areas with slow connectivity.

But even now, when I actually have some decent connectivity, I find sad that if I zoom in/zoom out (or just do some rotations), the tiles need to be reloaded, wasting my bandwidth and my user experience.

I wouldn't mind having to install an additionnal plugin if that could help speeds loading time.

Tiles are not the only cache problem, 3D rendering might take some time to load, which might lead to give the impression that there's a big black hole under the mountain you're trying to look at. Maybe cache could improve this after the first rendering.


PERFORMANCES :
--------------

Apart from tiles and 3D texture being slow to load, there is also a major difference between google Earth plugins and cesium.js in term of cpu usage.
While I don't find that there's a big difference during active usage of the two softwares, there is one when there is no interactions.

Indeed, there's almost no CPU usage for GE during "sleep time" while Cesium uses a similar amount af CPU during sleep/active time.

However, for this to happen, Cesium must be in the focused browser tab (and not necessarily the focused window). If you switch to another tab, it comes back to no CPU usage (at least in chrome and IE).


TILES RENDERING :
-----------------

* When I use "STK world terrain mesh" so that I can have 3D with Cesium, there is a big problem with tiles rendering near coast : coast looks like sawtooth. No problem when using "WGS84 ellipsoid"

* It is probably due in some way to the lack of cache but transitions between zoom levels are clumsy. While in Google Earth it's very smooth.
Another thing to notice is that GE doesn't seem to replace precise tiles by zoom outed ones while Cesium does it. Or if GE does it, it is done via an imperceptible transition mechanism.


FIREFOX PROBLEMS :
------------------

Probably more a WebGL problem, but I don't have success in working with Cesium in Firefox. No problem with IE, chrome.
Firefox is up-to-date, drivers also are, so I don't really know what to do about it.


Anyway, good job so far, I really hope this kind of problems could be adressed, ideally befor Decembre 2015 :)

I'm not against helping for the creation of a cache mechanism but I'd like to know if you think this feasible before.

ogr

Willem

unread,
Mar 18, 2015, 10:30:15 AM3/18/15
to cesiu...@googlegroups.com, theog...@gmail.com
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 = <some value>;

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

Willem

Scott Hunter

unread,
Mar 18, 2015, 11:04:50 AM3/18/15
to cesiu...@googlegroups.com
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.



--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

theog...@gmail.com

unread,
Mar 18, 2015, 1:53:54 PM3/18/15
to cesiu...@googlegroups.com, theog...@gmail.com
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

Alexander Wood

unread,
Mar 18, 2015, 2:15:22 PM3/18/15
to cesiu...@googlegroups.com
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

On Wed, Mar 18, 2015 at 8:40 AM, <theog...@gmail.com> wrote:
Message has been deleted

theog...@gmail.com

unread,
Mar 18, 2015, 2:49:38 PM3/18/15
to cesiu...@googlegroups.com
You're right, if I disable this mask, the problem goes away.

Scott Hunter

unread,
Mar 18, 2015, 4:13:13 PM3/18/15
to cesiu...@googlegroups.com
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.  

Message has been deleted

theog...@gmail.com

unread,
Mar 18, 2015, 5:10:33 PM3/18/15
to cesiu...@googlegroups.com
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 ?

Matthew Amato

unread,
Mar 18, 2015, 5:16:43 PM3/18/15
to cesiu...@googlegroups.com
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.

theog...@gmail.com

unread,
Mar 19, 2015, 6:21:16 AM3/19/15
to cesiu...@googlegroups.com
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.

Chris M.

unread,
Mar 20, 2015, 8:33:46 AM3/20/15
to cesiu...@googlegroups.com, theog...@gmail.com
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.

theog...@gmail.com

unread,
Mar 20, 2015, 10:46:46 AM3/20/15
to cesiu...@googlegroups.com, theog...@gmail.com
Thanks, I'll keep an eye on it.
Reply all
Reply to author
Forward
0 new messages