Cesium: Connecting Cesium Access Tokens
Creating a Token
To include data from Cesium within Nominal Editor, access tokens are required. An access token can be created on the Cesium portal and these tokens are not commercially free. The user is required to fund these tokens and the data the token is associated with is up to the user. Nominal Systems is not responsible for creating or using these tokens and they are a user-specific control. For a simple test token, only the assets: read
and geocode
properties are required. The token should be copied from the Cesium Ion Portal for use in Nominal Editor.
Warning
Cesium requires an active Internet connection to pull in imagery and tile-set data. Currently, caching Cesium data is not supported in Nominal Editor.
Updating the Settings
Once in Nominal Editor, the access token is required to be added to the Nominal For Unreal
settings. This can be found in the Edit → Project Settings
tab of the application. On the right-hand side of the project, there will be a section with the header for the settings. Select the section and some settings are present.
Enter the valid Cesium Ion Access Token into the Cesium Ion Access Token
field from the account. Make sure the access token is valid before entering. Hitting save on the Unreal project will ensure that this token is kept in the settings in the future. Additionally, there are two options for the asset IDs:
- Terrain: This is the asset ID of the terrain asset. The value is defaulted to
1
which is the correct asset ID for Cesium’s default terrain geometry. - Imagery: This is the asset ID of the imagery asset. The value is defaulted to
2
which is the asset ID for the Bing Maps Aerial Imagery asset which is included with any Cesium account.
As mentioned in the previous tutorial, the asset IDs can be found on the Cesium Ion dashboard and correlate to the particular assets that have been added; either from a personal storage link or from the asset depot. These assets must be subscribed. If the number is not valid, then Cesium may not load correctly.
Enabling Cesium
Cesium can be enabled on all levels by selecting the Cesium Default Enabled
flag in the settings. This will ensure that the Earth model at all levels includes the Cesium 3D model and its associated imagery.
Debugging Cesium
Often, when changing the asset IDs, Cesium may not load correctly and will appear to look like the following:
If Cesium does not load and only the atmosphere is present, make sure to diagnose with the following steps:
- Internet Connection: Cesium requires a valid Internet connection to stream the data. Currently, data is not cached offline.
- Access Token: Ensure that the Cesium access token has been correctly added to the
Nominal For Unreal
settings and that the token is valid to your account. - Asset IDs: Ensure that the asset IDs in the settings are not
0
and that they correspond to valid imagery and terrain assets. The assets must be added to your account’sMy Assets
section of the dashboard for them to be valid.
The output log may also appear to have some error messages such as the following if the asset ID is invalid or not associated with the asset token.