Cesium: Cesium Functionality
Toggling Cesium
Although the settings can enable Cesium for all levels, it is possible to override the setting and enable Cesium for particular levels. This can be done by calling the Enable Cesium
function from the Nominal Systems function library. For example, a button press can turn on Cesium and switch between the default Earth model and the Cesium Earth model.
The parameters that come with this function include:
- Enabled: A flag that will enable or disable Cesium. Disabling Cesium will switch back to the original Earth model.
- Planet: The planet (or body) to switch the Cesium for.
- Override Ion Access Token: This will override the project settings with a new access token that can be passed in. This will apply the token to the current level’s Cesium assets. If left blank, the default settings token will be used.
- Override Terrain Asset ID: This will override the terrain asset ID stored in the project settings with a new asset ID. If this is left as
0
, it will use the default settings for this asset type. - Override Imagery Asset ID: This will override the imagery asset ID stored in the project settings with a new asset ID. If this is left as
0
, it will use the default settings for this asset type.
Warning
Switching on Cesium, without any override settings, will only work on the associated body if that body has the correct terrain and imagery tokens loaded in the user’s Cesium account.
Additionally, in the viewport options, there is a toggle to enable and disable Cesium (if the key has been configured already within the settings) during runtime.
Cesium Subsystem
There exists a system within Nominal Editor that can be used for toggling Cesium settings for particular planets and configuring the new access token for the solar system. This can be found on the Cesium Subsystem
object. The Configure Planet
will adjust the imagery and terrain IDs for a particular planet, while the Enable Cesium
will enable or disable the Cesium terrain on the planet from the spherical mode.
Free-Moving the Observer
The observer is normally configured to follow spacecraft and objects within the simulation. The observer has a reference point in which rotating the camera around will appear to ‘orbit’ that point. For a standard free-looking observer, the reference point needs to be moved to within the observer. This can be done by first detaching from any followed objects and then scrolling the mouse wheel, changing the distance to the focal point to zero.
Note
To detach from simulation object tracking, press 0. Pressing any of the number keys will begin following the spacecraft and ground stations in the order that they were created. Pressing 9 is the exception and the observer will be able to orbit the Earth.
Disabling Clouds
By default, the clouds will be present around the Cesium Earth, in the same location as the standard Earth. These clouds are not created by Cesium Ion and are part of the atmosphere shader present in Nominal’s architecture. To disable the clouds present in Cesium, the following function can be called from the level blueprint, noting that the enable flag is deselected.