In the next few months, I’ll be spending most of my time working toward bringing high-quality terrain rendering to Cesium. What does that mean? I’m still trying to work that out! That’s the purpose of this post: to lay out my thoughts on where we’re heading with terrain in Cesium and to solicit your input. Please don’t be shy. Even if you’ve never even run Cesium before, but maybe you’ve used terrain in other products, I want to hear what you have to say.
Ok, so Cesium runs in a web browser. It’s impractical to expect a bunch of terrain data to be present on the end-user’s machine. Even if it were there, browser sandboxing would make it hard for us to get access to it. Similarly, it’s impractical to download an entire terrain dataset to the client before we start rendering, since a high-resolution, worldwide terrain dataset can measure in the terabytes. What Cesium needs is a streaming terrain engine, where individual chunks (tiles?) of terrain are downloaded to the client from a server as they are needed. So far this is probably pretty obvious, but I wanted to lay it out.
Initially, I envision us rendering a single worldwide terrain data set, rather than compositing multiple data sets together on the client. In other words, if we want to visualize terrain data from multiple sources, we’ll serve them via a server that combines them into a single seamless terrain. We may relax this restriction in the future, when user needs justify the much greater complexity of doing so.
Where do we get the terrain data to render? I wrote up some initial thoughts on that here: https://github.com/AnalyticalGraphicsInc/cesium/wiki/Streaming-Terrain-Details. In order to render planetary-scale terrain at anything approaching a high resolution, the data must (at a minimum) be served in discrete chunks, because the entire data set is too big, and at multiple resolutions, because rendering a zoomed-out view still requires low-resolution data for the entire world. If you know of any other publicly-accessible sources of terrain data that meet these requirements, other than the ones described on the wiki page, I want to hear about it.
None of the sources I listed in the link above are ideal, but my current plan is to start with the ESRI World Elevation Services - though that’s definitely subject to debate. Long term, I envision us standing up our own terrain servers to serve terrain data tailored to the needs of Cesium. Perhaps sell a rack-mounted server that can be installed on private networks as a means to offset the hosting costs of the public server?
While terrain will (initially?) be rendered from a single worldwide source, we’d like to be able to import multiple sources of imagery and overlay them layer-style on the terrain. Work on imagery layers is already happening in the imagery_layers branch on GitHub. There is significant overlap between that effort and this terrain effort.
The terrain work, which is still in its infancy, is taking place in the terrain branch on GitHub.
This is pretty early and high-level, but please let me know what you think about this direction. Better yet, if you have ideas about how we can incorporate terrain into Cesium, let’s talk about it.