Does Cesium support Mars or other planetary imagery currently? or does Cesium team have plans to make Cesium support Mars and other planetary in the future?
I am interested in how to use Cesium to display some Mars data.
Cesium uses Ellipsoid.WGS84 by default to define the shape of the globe. For a Mars app, you should change this to use the ellipsoid definition for Mars. There’s not a trivial way to do this right now, but you could just change the numbers used by WGS84.
To change the ellipsoid used by the globe to use the Mars ellipsoid, you’ll need to create a new Globe object and pass in an ellipsoid with the appropriate x/y/z values. For example:
var viewer = new Cesium.Viewer(…);
viewer.scene.globe = new Cesium.Globe(new Cesium.Ellipsoid(…));
You’ll then need to configure imageryLayers on the new Globe object to add the appropriate Mars imagery.
There are likely to be other Earth-specific assumptions in the code. For example, you’ll want to remove Earth’s moon.
Is there a reason we don’t have an option to CesiumWidget and Viewer to specify a different Globe to use? Seems like it would be a easy change to make since the CesiumWidget constructor is simply creating the WGS84 Globe instance itself anyway.
I’d love to be able to use new planets/moons to display NASA science data. If there were a relatively easy way to define new bodies with body-specific geometry, that would make a big impression with our community. I expect, once such a feature were available, the community could create definitions for planets in our solar system, the sun, and then the moons.