Height Detection/Correction with Google Photorealistic Terrain Tiles

Thanks Kevin. Indeed there has been much confusion about the Cesium Georeference system.

Takeaways:

  • Your recommendation would be to use v2.0 with sublevels instead of GlobeAnchorComponents
    • I tried v2.0, but I documented some issues with the Atmosphere in my post. Reverting until that works:
    • v2.0 issues
  • There is usually ONE master Georeference, and that is the ‘Georeference Actor’ in the outliner

Could you please confirm?:

  • ‘Fly To Location’ function DOES NOT actually rebase the Unreal world’s coordinates to the Georeference of the location that has been flown to? If I’m not using Sublevels, I DO need to call ‘Set Georeference Origin’ at the same time as ‘Fly To Location’ in order to make sure that the Unreal scene at that point is oriented correctly and has the correct accuracy?
  • ‘Set Georeference Origin’ is the function to call to actually rebase the Origin. The other ‘Set Georeference’ functions are just storing a location which can be resolved later?
  • Resolve Georeference and Set Georeference on CesiumGlobeAnchor Component do what exactly?

Thanks!

Your recommendation would be to use v2.0 with sublevels instead of GlobeAnchorComponents

No, there are valid use-cases for both sublevels and globe anchoring. In fact it sometimes makes sense to combine both in a single project.

There is usually ONE master Georeference, and that is the ‘Georeference Actor’ in the outliner

Yes, there is usually only one CesiumGeoreference Actor in a level.

‘Fly To Location’ function DOES NOT actually rebase the Unreal world’s coordinates to the Georeference of the location that has been flown to?

Correct. In v2.0 there’s a CesiumOriginShiftComponent that can (optionally) rebase the origin as the object to which it is attached moves.

If I’m not using Sublevels, I DO need to call ‘Set Georeference Origin’ at the same time as ‘Fly To Location’ in order to make sure that the Unreal scene at that point is oriented correctly and has the correct accuracy?

Well, it depends on your application. It’s certainly not required. UE5 uses double-precision coordinates, so there’s little reason to rebase for accuracy purposes.

But you might want to set the Georeference origin in order to guarantee that +Z is “up” after you arrive. Depending on what you’re doing after you arrive, that might be essential. Or it might be irrelevant.

‘Set Georeference Origin’ is the function to call to actually rebase the Origin.

I’m not sure exactly what you’re referring to here. There’s no Blueprint function called Set Georeference Origin in either v1.31 or v2.0. There’s a C++ function called SetGeoreferenceOrigin, but it’s deprecated. You should use SetGeoreferenceOriginLongitudeLatitudeHeight or SetGeoreferenceOriginEcef in v1.31. In v2.0 they have better names: SetOriginLongitudeLatitudeHeight and SetOriginEarthCenteredEarthFixed, respectively.

The other ‘Set Georeference’ functions are just storing a location which can be resolved later?

I’m not sure exactly what you’re referring to here, but “storing a location which can be resolved later” is not something Cesium for Unreal does anywhere AFAIK.

Resolve Georeference and Set Georeference on CesiumGlobeAnchor Component do what exactly?

A globe anchor is always associated with a CesiumGeoreference Actor, because we can’t anchor something to the globe unless we know the relationship between the globe and the Unreal world, which is the exact purpose of the CesiumGeoreference Actor.

ResolveGeoreference finds the appropriate CesiumGeoreference Actor. It’s almost never necessary to call this yourself.

SetGeoreference allows you to tell the globe anchor which exact CesiumGeoreference to use, in the extremely unlikely case that you have multiple in your level. If you SetGeoreference with a specific CesiumGeoreference instance, then that’s the one your get when ResolveReference is called.