cesium-native icon indicating copy to clipboard operation
cesium-native copied to clipboard

Add an ellipsoid tileset loader for flat terrain generation

Open jqntn opened this issue 1 year ago β€’ 6 comments

Hi,

This is a proposal to implement an ellipsoid tileset loader. It leverages the custom loader API and allows the Cesium3DTileset to generate terrain by creating an ellipsoidal surface.

I believe this is equivalent to EllipsoidTerrainProvider in CesiumJS.

In my opinion, this can be very useful, especially on low-end devices, or if you simply don't have a tileset at your disposal.

Here is a Unity example using the raster overlay, which you can try on this branch using this version of the cesium-unity package:

image image

CC @carlopiersanti

jqntn avatar Jun 12 '24 14:06 jqntn

Hi @jqntn - thanks for the pull request! Haven't dug through this yet, but I'd like to point you to PR #890, which is almost in, that adds custom ellipsoid support to cesium-native. For cesium-native, this means instead of passing the ellipsoid as a separate parameter, you can access it from TilesetOptions::ellipsoid. This will make sure it matches the ellipsoid that the georeference is using.

Alternatively, if you see a circumstance where you'd want to use a different ellipsoid for terrain generation than you use for georeferencing, I'll point you to CesiumGS/cesium-unity#465. With that PR, you can change "From WGS84 Ellipsoid" to "From Ellipsoid Asset" or something of the sort on Cesium3DTileset in Unity, and add a property to it that takes a CesiumEllipsoid asset (a ScriptableObject that contains the ellipsoid's radii).

Regardless, this looks good on a quick skim - please @ me when you're ready to have it reviewed!

azrogers avatar Jun 12 '24 20:06 azrogers

Hi @azrogers, thanks for pointing me to #890. I'm ready to make appropriate changes on my end as soon as your PR is inπŸ‘

jqntn avatar Jun 14 '24 14:06 jqntn

@jqntn Looks like #890 just made it in!

azrogers avatar Jun 21 '24 15:06 azrogers

I'm moving this out of the July release for now, to give time to make a few more changes.

kring avatar Jun 29 '24 10:06 kring

Hi @kring! Any update on this?

jqntn avatar Sep 17 '24 14:09 jqntn

Hi @jqntn, sorry for the delay. Thank you for implementing @kring 's suggestions! We'll get a pair of eyes on the changes as soon as we can, thank you for your patience :pray:

j9liu avatar Sep 17 '24 17:09 j9liu

Really sorry, but we have to move this out of this month's release again.

kring avatar Oct 31 '24 10:10 kring

Thank you for your patience on this, @jqntn. This PR is looking good, just one tiny change - can you move the additions you've made to CHANGES.md up to the "Not Released Yet" temporary section? It's currently under 0.37.0. I think that's the last bit needed to merge this in.

azrogers avatar Nov 06 '24 20:11 azrogers

Scratch that, I've made that change myself. Once CI completes I'll make the merge!

azrogers avatar Nov 06 '24 21:11 azrogers

Thanks for adding this feature, @jqntn!

azrogers avatar Nov 06 '24 21:11 azrogers

Hi @azrogers, thank you for keeping me updated πŸ™‚

jqntn avatar Nov 06 '24 21:11 jqntn