Spawn Cesium3DTileset at runtime

Hi there,

I am using Cesium with Unreal and attempting to spawn the tileset at runtime (with blueprints) as the Cesium globe is an optional part of the project. If I attempt to spawn the Cesium3DTileset via Spawn Actor From Class the globe does get listed in the World Outliner but there is nothing visible in the viewport. I imagine some setup is required to specify which globe type I am after (Cesium World Terrain + Bing Maps Aerial imagery). What is the correct way to do this?


When nothing is visible, then it most likely fails to access the tileset data from Cesium ion.

(Assuming that there is some light in the scene already - in doubt, just add a directional light for the first test).

When you look at the output log (Menu: Window → Developer Tools → Output Log), then you’ll probably see a message like

Received status code 401 for asset response

indicating that the ion access token and/or the asset ID are not set.

When you create the tileset with “Spawn Actor from Class”, you can afterwards set the “Ion Asset ID” (which would be 1 for the Cesium World Terrain), and the “Ion Access Token” (which should be your Cesium ion token, or the token from the demo tilesets for first, preliminary tests).

As an example, this blueprint spawns the Cesium World Terrain (after a few seconds, for testing) :

Adding the overlays may be a next step, but maybe you want to try out whether this works for you.

Hi Marco, thanks for your response.

Unfortunately I cant seem to access those variables, they just aren’t coming up as though they’re not exposed at all.

Sorry, I just noticed that I tried this out on the active development branch, and this functionality (i.e. exposing these variables) has only been added recently via Blueprint editable Cesium3DTileset properties by xuelongmu · Pull Request #430 · CesiumGS/cesium-unreal · GitHub . So spawning a tileset via blueprints is not possible in the currently released version, but will be possible, as described above, in the next one. Sorry for the confusion.

the PR has been merged

Thanks for that! I have the latest package and access to those variables.

The tileset now spawns as a white globe. How do I go about adding the overlays?

Admittedly, I did not know that, but just tried it out: You can pull out a link from the blue “Return Value” pin of the spawned tileset, and select “Add Cesium ion Raster Overlay”:

When selecting the resulting node, the Cesium ion Asset ID (2 for Bing Maps Aerial Imagery) and Token can be entered in the details in the upper right:

(I hope that someone who knows Unreal/Blueprints better will chime in here if this is the wrong way to do this, but it seems reasonable for me…)

1 Like

ah beautiful, that does it. My apologies I had attempted that before but had the wrong asset ID, thank you very much for your help!

I tried this method and was not able to get this to work. Has anything relevant here changed? Has anyone else gotten this to work?

  • I was not able to find the nodes for “set ion access token” or “set ion asset ID”.
  • I was able to create the “add cesium ion raster overlay” and fill in my ion access token and ion asset ID in the details panel
  • I tried using Ion asset ID “2” as shown above

But nothing seems to show up at runtime…

@cmontero3d The functions for setting the access token and asset ID on the tileset are available in version 1.3.0 and later. Are you sure that you have this (or a newer) version installed?

Thanks Marco - an update did indeed help me find this, cheers!