A few months ago, I sent you a message regarding some issues that I encountered during the developpement of my Application. My issues concerned the
definition of a new Ellipsoid diffrent from the WGS84 ellipsoid and the definition of a new occluder for ellipsoids greater or smaller than the WGS84 ellipsoid (see the
topic : Define a new Occluder and display polygons and points on a new ellipsoid #3543 - 10th feb 2016).
Recently I encountered an other issue and I assume that it is also linked to the definition of the current Ellipsoid. Indeed, I have data that
allow to display the surface of Mars and Venus in relief. Hence, I used the CesiumTerrainProvider function to display these data. Unfortunatly, there are some
tiles that disappear when I would like to perform a zoom on the surface of the planet. Here after, you will find a screenshot to illustrate my
purpose : MarsTiles.png
For Venus, I have a black body that appear : VenusBlackBody.png
Here after, you will find the code that I used to display the relief :
var newterrainProvider = new Cesium.CesiumTerrainProvider({
url : ‘https://assets.agi.com/stk-terrain/world’,
ellipsoid: new Cesium.Ellipsoid(3376200.0, 3376200.0, 3396190.0)
});
To simplify your tests, I just used, in the previous code, your data on an ellipsoid smaller than the WGS84 Ellipsoid.
I clearly understood that Cesium is optimized for the WGS84 ellipsoid but my problem is that I need to change dynamically the ellipsoid since
my application must allow the user to switch between different planets of the solar system. In consequence, I need to define a new ellipsoid at each
time because each planet has a different size and shape. I tried to modify some programs to take into account the new ellipsoid but I think that
I didn’t modifed all concerned files.
I apologize to ask a new time this question but what files I should modify to take into acount a new ellipsoid created dynamically ?
I’m not sure what would be causing the problem, but I’ll ask Dan if he can give you more information. If you are interested in fixing the issue, we would love the contribution!
But when I add a terrain provider like this :
terrainProvider : new Cesium.CesiumTerrainProvider({
url: Cesium.IonResource.fromAssetId(****),
ellipsoid: callistoEllipsoid,
}),
Some tiles deseapear when zooming on the moon.
Is this a problem because I'm using Cesium Ion (which only allow WGS84 ellipsoid) with a custom Ellipsoid ?
That sounds like it has more to do with how Cesium handles culling by default than any settings on ion. I think one thing you could try is to disable horizon culling. There’s no option for that so you’d have to edit the source (see here).
Another option would be to modify the definition of Cesium.Ellipsoid.WGS84 so it matches Callipso, and that way everything will just work.
Let me know if that helps! Otherwise, feel free to open up another thread with more details and we can give it another shot there.
Ion generates quantized-mesh terrain tiles, which include a “horizon culling point”, and that point is tied to the ellipsoid, which is (currently) always WGS84. So Maxime is right that changing the ellipsoid on the client will lead to culling problems. Modifying WGS84 on the client won’t help, because the horizon culling point returned by Ion is still tied to the real WGS84. The best workaround I can think of is to turn off horizon culling entirely, as Omar suggests.
I think you’ll need to modify the Cesium source directly to disable horizon culling. If you did can you show us what you modified?
I opened Issue #25 in the cesium-ion-community repo for processing terrain with custom ellipsoids. Please comment there if you have any additional info or feature requests.