Hi,
I just posted this question in github but was directed here.
Essentially my question was whether it's possible to use DEM-files that represent depth rather than height in Cesium. Can "below surface" representations be visualised? For example to create bathymetric maps.
Thanks.
-ra
My wet dream would be something like
-ra
Hi, sorry about redirecting you here, but GitHub issues are for feature and bug tracking. This forum is a better place for discussions.
As I mentioned on GitHub, rendering undersea terrain is possible out-of-the-box, with a few caveats. With a little bit of work it should work nicely.
The first caveat is that the CesiumTerrainProvider does not currently support heights less than -100 meters relative to the WGS84 ellipsoid. It’s just a limitation of the current format. We’ll be moving to a new format in the next few months that will not have that limitation. Also, it is not as big a limitation as it may sound even now, because TerrainProviders are a plugin point, so writing a new one that interfaces with your data, expressed in a different format without this limitation, is not hard at all.
The second caveat is that you may run into some problems with horizon culling. I describe the problem at the end of my second horizon culling blog post (http://cesium.agi.com/2013/05/09/Computing-the-horizon-occlusion-point/):
Also, please keep in mind an important caveat when using this approach. In the real world, objects occluded by the WGS84 ellipsoid are not necessarily occluded by the real surface of the Earth. This is because the Earth’s surface is actually slightly below the ellipsoid in parts of the world. Depending on your application, using WGS84 as the occluding volume may be acceptable, or you may need to use a more conservative ellipsoid.
With undersea terrain, it is clearly the case that terrain is substantially below the WGS84 ellipsoid. Thus, the horizon culling is likely to be too aggressive and cause parts of the surface to not render. As a quick work around, we can just hack out the horizon culling. A better solution is to use a more conservative (smaller) ellipsoid for horizon culling; specifically, one that doesn’t stick up past the bathymetric surface anywhere.
Kevin
Thanks for such a comprehensive answer!
Perhaps I should have mentioned that my interest is actually more towards lakes and waterways rather than seas and oceans, so the culling horizon issue you mention sound to me like it may not be a great issue for me as lakes are typically smaller and much more shallow. Perhaps this is still an issue at certain zoom levels?
As for the issue with the 100m depth levels it poses a more direct limitation of course, but it sounds to me like it both can be worked around and later solved entirely down the road.
I guess a POC is in order..
-ra
Hi,
If you’re only concerned with lakes and rivers, you may avoid both caveats, actually. As long as the underwater terrain stays above “100 meters below the ellipsoid”, it doesn’t matter what its depth is relative to the surrounding terrain. And yes, there are workarounds if necessary.
Kevin
Sounds great.
If I may ask.. "where" is 100 meters below the ellipsoid? Roughly? Compared to mean sea level that is. A lake surface will to begin with typically be some distance above mean sea level, but may very well be a couple of hundred meters deep, which will put the bottom some hundreds of meters below mean sea level.
-ra
The difference between WGS84 and MSL various over the surface of the Earth. The image on this page shows the geoid height (height of mean sea level relative to the WGS84 ellipsoid) over the surface of the Earth: http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008/egm08_wgs84.html
I just realized I misspoke before. The CesiumTerrainProvider format supports heights as low as 1000 meters below the ellipsoid (not 100 as I said before). I think that will help you out. You may still have some horizon culling issues with deep lakes, but that is an easier problem to solve than the format limitation.
Kevin
By the way, the format of the terrain accessed by CesiumTerrainProvider is documented here:
https://github.com/AnalyticalGraphicsInc/cesium/wiki/Cesium-Terrain-Server
Great. Thanks a lot for your prompt replies. Next step is to make a small POC of this. Don't be surprised if you see me here again soon.
-ra