Hi everybody, I’m Alessio and I’m new to the whole Cesium environment. I’m actually developing a model of the Moon on Nvidia Omniverse using Cesium and data from Nasa missions (digital elevation map and images of the surface taken from here SVS: CGI Moon Kit ).
I’m actually having trouble uploding my models to Celsium Ion, since the only reference models for height are related to the Earth ellipsoid. Is there any way to define a custom ellipsoid as a referende? Do i have to use a different pipeline for getting to the desired result? Thank you!
Hi @deroxa99 - I believe the terrain tiler in cesium ion is hardcoded for the Earth ellipsoid. Plus there are other aspects of cesium-native and cesium-omniverse that would be updated to support non-Earth ellipsoids. We’ll keep this use case in mind though, and see what we can do to generalize it in the future.
Sinpah
December 25, 2023, 3:45pm
3
@sean_lilley I would like to also inquire about the likelihood of Cesium supporting non-Earth ellipsoids in the future. Our team has specific use cases where we would like to model celestial bodies such as the moon and other planets within the Omniverse platform.
@und_miller the likelihood is very high
We’re in the process of rolling out non-Earth ellipsoid support across our runtimes, starting with CesiumJS and Cesium for Unreal, followed by Unity and Omniverse.
CesiumGS:main
← CesiumGS:ellipsoids
opened 08:30PM - 24 May 24 UTC
<!--
Thanks for the Pull Request!
Please review [Contribution Guide](https:/… /github.com/CesiumGS/cesium/blob/main/CONTRIBUTING.md) before opening your first Pull Request.
To ensure your Pull Request is reviewed and accepted quickly, please refer to our [Pull Request Guidelines](https://github.com/CesiumGS/cesium/blob/main/CONTRIBUTING.md#pull-request-guidelines).
-->
# Description
This PR is designed to make the API for setting an alternative ellipsoid throughout the API more streamlined. There are some additional changes needed for 3D Tiles, but that is coming in a follow-up PR.
The main addition is `Ellipsoid.default`, which is now used throughout the API as the default ellipsoid rather than `Ellipsoid.WGS84` directly. That means instead of having to do `Cartographic.fromCartesian(0, 1, 3, myEllipsoid)` everywhere, you can now set `Ellipsoid.default = myEllipsoid` once.
There were a few places which assumed WGS84 even before instantiation, so setting `Ellipsoid.default` modifies a few other classes. This is counterintuitive, but done to avoid circular dependencies (ie. `Ellipsoid` needs to depend on `Cartesian3`, so `Cartesian3` can't depend on `Ellipsoid`).
Furthermore, we make a few Earth-centric assumptions throughout the API.We now disable them when the ellipsoid is set to something other than `Ellipsoid.WGS84` or use a default proportionate to the selected ellipsoid. This includes:
* atmosphere (ground and sky)
* fog
* lighting and night imagery; fade in and fade out distances
* default camera position
* the star skybox
* the moon
In particular, I had to make some configuration changes to the base layer picker to 1) Ensure the WGS84 ellipsoid was always used when relevant, and 2) not override when you set the viewer's ellipsoid to something other than the WGS84 ellipsoid
Last, but not least, there were some instances of naming things with `WGS84` when we just mean any arbitrary ellipsoid. These have been changed, and where needed functions have been renamed and the old versions deprecated.
## Issue number and link
Fixes https://github.com/CesiumGS/cesium/issues/4245
Fixes https://github.com/CesiumGS/cesium/issues/3543
Fixes https://github.com/CesiumGS/cesium/issues/11231
## Testing plan
[Testing Sandcastle](https://ci-builds.cesium.com/cesium/ellipsoids/Apps/Sandcastle/index.html#c=lVZtc9o4EP4rGmZuBmaosGxDIJf2jgBloATCS9qS4+ZG2ALU2JJriRC3k/9+K4N5SZhe7ottrXaf3X12V3KDKb4OcUcK7LMFXQd6zOJHFqP3aJZbaR2py1KJRvyd0nTJxRJ7WwNPhrPc7zNRKqF2TIVGjVTeHSPqgYpCWqJErmPEpUBUKabVTDReOaunyhP5wAR6PxMInLKku5q3PT7g3c7djw7p847qiFHZa3QqnYfo6+dGt4ZB6bvffjBKq/vmXdKfePZ0TFY34TDpTYZ2v32np2HL7icWuQ+H5ZtwFPbbrWTQHvJeoxvdA9jNZAjA/W9z5zrwkk7lCzj2nI7ZF9Ok6xu96dchH3xrkUFz+TRo1p/6zesa/u586n6mk4mmN8q1XLq4n0p7NBzPp8ugZdW+LuLw4vrh/rZSc1OO9om3goBHSnI/Sx9YfrV1Mxj0wciTQmkUSikGkQYSFej+NAxpFseUi9tYPnKfxZeIbijP+Mfb1+RUBy9iGQLrdVOHjp83MAgR26mar0LRPOdUsR5NDGBWppAuWZykwhQhg6urRHg7kENJd+onPjOHxLaqhczXc0rJNr9HzjZpswm2ybA+p7L8LLdttYYUGnJh8SxX3DKAMT7iJY1+rdh1LDeKxSMGrRky4TN/xJQM1kbpEi1ooFiqqnnIAsA7llHBQ/pScc/ILfceDC+HrSWTnvSPZc8FyGqbDVYeEwyHitIxDaOAmdK5adIwLbdS8W09PRgPzVSC5AJlk7bZbMCcM+Exn8fM02bQSjtJicaaewG856oUcV4aWxapEcspk4pjkTKp/vHI6W9Ok6/W84zhSHKh1WDREdA4TJmW+8uk8HNbP82e9CVMXT2SQSARIcDydicAQvTaB54sXLlwSSWTS7HcbdgOdi8cUk53nou/gHXPwL5zcMV1ycVrXMe1cdkmzhuAy2eA7QomjuOSM8C4Yld/gdpbC/mwkj46R4NTxZDruXjtMq46tmO/Adg+F++x+Wm8Fq7Z9hHBf6dttJAxyu/La/rnZZUL2wB2DckEuOJMYer7+V1k0a4P9+PeoKYbORVOOrpNtowZU7sxN/oc7yMrnkh3iWxlhX16cxZcZjxkTBh987UHWMB0G4KIG2kkI7gGFBVqTxJCcq3NtDZkIA9HU7rCzfro07hXn7Tao9b0pcEX7usVcLuXK50EbI/QM+GNjQh/7PR6/9T7zX8Gd5Nep986JMefWDBYLOAMuzw+oPZM2XmriN7ZduHgxKMBu06aHK5LmNgTsz6j8Ucaj0GFxnmCy8wuIoIt8yiziyLMWfmApOFWVcEajhIveRNgZoiQncId1sbHYeVi62TXwla2yLw/F7Me4aY6P08IGfMfEAY5QHpnSmM66DoBlvK26xSR7UKqtVrhLVU9MiU1MCVVIIiQwn8X+H9x7+y439IBLJDT7NMD/TlXzF2ljfMh8/InDyMZa7SOgzzGJc3ghKcQbWm+hlsCzmuljKVRvSodm175/BFx//2Zew15Afwiwc5iHaT8znIfrkqg/8o0kNSHv7AB/KEFNDFqK/KhtxXCtXhVguV5Sy1lMKfxC+R/AQ)
Additionally to test this, I iterated through many Sandcastle examples, setting `Cesium.Ellipsoid.default = Cesium.Ellipsoid.MOON;` or another arbitrary ellipsoid as the first line.
`Cesium.Ellipsoid.default = Cesium.Ellipsoid.UNIT_SPHERE;` is also a possibility, and while nothing should crash, there is some weirdness purely due to the size disparity.
# Author checklist
- [x] I have submitted a Contributor License Agreement
- [x] I have added my name to `CONTRIBUTORS.md`
- [x] I have updated `CHANGES.md` with a short summary of my changes
- [x] I have added or updated unit tests to ensure consistent code coverage
- [x] I have update the inline documentation, and included code examples where relevant
- [x] I have performed a self-review of my code
CesiumGS:main
← CesiumGS:custom-ellipsoid
opened 08:36PM - 24 May 24 UTC
Currently, Cesium for Unreal is hardcoded to use the WGS84 ellipsoid. This chang… e adds support for specifying other ellipsoids by creating assets for them and assigning them to georeferences.
One main issue that needs to be fixed before this can be merged in is that changing the ellipsoid of a georeference should cause all of its associated tilesets to be reloaded.
1 Like