How to provide GeoReference at Runtime, via Parameter?

@Kevin_Ring
We are spawning,multiple 3dTilesSet at runtime, and we want to set the same GeoReference for all the 3dTileSet Object, and GeoReference Object is already available inside level.

It always spawns a new GeoReference we want to bypass that, how should we do this?

Hi @carlrealvr,

You should be able to set the Georeference property on each tileset with the appropriate CesiumGeoreference to use from your level.

If a Georeference isn’t explicitly specified, the tileset will try to find one by 1) looking for a CesiumGeoreference in the level that has the DEFAULT_GEOREFERENCE tag attached to it, or, failing that, 2) looking for a CesiumGeoreference in the level with the name “CesiumGeoreferenceDefault”.

Kevin

Hello,

I am trying to spawn multiple scenes around a planet, using geographic coordinates received from an API. In Unreal Engine 5, I know that the replacement for Georeferenced Sublevels is now mostly solved using level instances, and is in the pipeline for the Cesium 2.0 release.

However, at the moment, that’s not my issue - I know that I can create multiple Globe Anchored Components to place around the level… but I was trying to create multiple Georeferences (from an uninstantiated Cesium Georeference variable) to attach to each Globe Anchor Component for each Actor, using ‘Set Georeference’ (target is Cesium Globe Anchor Component), and providing the null new Georeference as a variable. It doesn’t work, and there doesn’t seem to be a way to set up individual georeferences and store them to attach them separately to individual globe anchor components.

Am I misunderstanding the Georeference? Is there only one per world, and rather than switching between them, the idea is to update the georeference’s coordinates? If so, what is the purpose of the Set Georeference on the Cesium Globe Anchored Component?

Thanks

It’s very rare to have multiple georeferences in a world. That’s because a CesiumGeoreference defines how globe coordinate map into the Unreal world. I doesn’t make any sense to have multiple mappings like that simultaneously, except in unusual cases like a tileset that is not georeferenced or is georeferenced incorrectly.

Sub-levels are the way by which you can conceptually have multiple georeferences (each sub-level has its own georeference origin) and switch between them. But still only one is ever active at a time.

It might be possible to have multiple georeferences and switch between them by setting the Georeference property on all globe anchors and tilesets. That’s basically implementing a version of the sub-level system yourself. I haven’t tried it, though, so I’m not sure what problems you might run into. I think using the sub-level system itself will be easier.