Update: STK World Terrain has been deprecated, see Introducing Cesium World Terrain
The Cesium API supports several streaming terrain providers, enabling global 3D terrain visualization in just a few simple lines of code. Two of Cesium’s publicly available terrain tilesets, the STK World Terrain and smallterrain, are produced and maintained by Analytical Graphics Inc (AGI), the founders and core maintainers of Cesium.
Previously, we could use the smallterrain tileset for water effects, or use the STK World Terrain tileset for access to high resolution terrain and terrain lighting. I’m happy to announce that the STK World Terrain tileset now supports the Watermask feature, previously only available in smallterrain. Here’s a view of Vancouver to see terrain lighting paired with the water effect.
This terrain feature can be enabled in the
CesiumTerrainProvider, starting in Cesium 1.7.
Turning this feature on follows the same pattern as enabling terrain lighting. When constructing a
CesiumTerrainProvider, request the watermask extension from the server, as shown below.
In addition to gaining more flexibility in generating higher resolution watermasks, we’ve also added antialiasing to produce smoother coastlines. Here’s a side-by-side of the two tilesets with watermasks.
|![smallterrain](/blog/images/2015/02-16/smallterrain.png)||![STK World Terrain](/blog/images/2015/02-16/stkworldterrain.png)|
|smallterrain||STK World Terrain|
AGI produces the STK World Terrain tileset using our commercially available product, the STK Terrain Server, developed for creating and hosting streaming terrain in an efficient runtime format. By adding watermask generation to the STK Terrain Server, we are now able to easily produce high resolution tilesets that contain the superset of all terrain visualization features available to Cesium, currently terrain lighting and water effects.