Cesium for Unreal v1.7.0 was just released, bringing improvements to performance and workflow. This release also changed how sublevels work with Cesium for Unreal, and renamed/removed some C++ functions. Read on to learn how these changes may impact your existing projects, and how to use the new workflows.
Want to see the full changelog? Find it here.
Using Sublevels
Previously, you would have to manually check for sublevels to add them to the Georeference, and you’d have to switch between them using a parameter on the Georeference. Here’s how this workflow has changed:
-
Changing the active Sublevel
Changing the active Sublevel is much easier than before. Simply double-click on the level in the Levels panel. The Jump to Current Level button has been removed.
In the Cesium Sublevels section of the Details of CesiumGeoreference, you’ll see a new Enabled parameter.
This parameter allows you to ignore a sublevel during play without removing it entirely. It also affects how the camera moves when switching between sublevels.- If Enabled is checked on a sublevel, when you switch to that level the main Georeference Origin will automatically change to the sublevel’s origin, and the camera will be at the location of the sublevel.
- If Enabled is NOT checked on a sublevel, the camera and main Georeference Origin will not change when you double-click on that sublevel. This can be useful if you need to set a sublevel’s origin to where your camera currently is. As such, the Place Georeference Origin Here button will still change the origin of a sublevel if Enabled is not checked. Using this button will automatically change Enabled to true.
-
Adding a new Sublevel
When creating a new sublevel, use the Levels window. Unlike in the previous workflow, you do not have to set the Georeference Origin prior to creating the level - you’ll do it later. After your new sublevel is created, make sure to set it to the correct Layer.
You’ll see that your new level has automatically appeared on the Georeference.
Double-click it in the Levels panel to set it as the active sublevel. The name of the level should become blue and bold, and you’ll see the level name in the lower right side of the viewport.
Once that level is active, you can use the Place Georeference Origin Here button to set the origin of your sublevel. -
Changing a Sublevel’s Georeference Origin
The Place Georeference Origin Here button on the CesiumGeoreference Actor will always set the origin of the active sublevel, even if the Enabled parameter on the sublevel is not checked. This means it’s easier to change the location of a sublevel by mistake. If you want to avoid changing the position of any sublevels, be sure the Persistent Level is the active level before changing the Georeference Origin. If you make a mistake in changing the Georeference Origin, you can use Ctrl-Z/Undo.
You no longer have to manually edit the longitude, latitude, and height of the sublevel in the Details panel, though you still can if you would like. Be advised that changing the sublevel’s origin manually will not change the main Georeference Origin, and so you will not see the camera view change until you switch to another level and back. -
Cesium Tilesets and Actors in Sublevels
If you were previously using Cesium tilesets or other actors inside of sublevels, the plugin would automatically create a CesiumGeoreference inside the sublevel. Now, tilesets and Cesium actors in sublevels can use the CesiumGeoreference in the persistent level. You should remove any instances of CesiumGeoreference or CesiumCreditSystem from sublevels.
CesiumSunSky
CesiumSunSky has undergone the following changes that may be confusing to those familiar with the old system:
- CesiumSunSky has been converted from Blueprints to C++. All variables and functions are still accessible via Blueprint.
- The CesiumGeoreference Actor no longer has a SunSky property - Connecting the CesiumSunSky and CesiumGeoreference should now be done on the CesiumSunSky actor.
- There’s a new parameter in the Details panel of CesiumSunSky called Update Atmosphere At Runtime, which is enabled by default. When this is enabled, the SkyAtmosphere will automatically adjust its radius to avoid the atmospheric artifacts that can appear when viewing the world from a distance. If you notice that the atmosphere is changing in a way that negatively impacts your project, disable it here. Disabling this setting may also improve performance.
CesiumGeoreference Component
The CesiumGeoreference component has been renamed to CesiumGlobeAnchor component. The Georeference property of GlobeAwareDefaultPawn, DynamicPawn, and CesiumSunSky is now accessed through each actor’s CesiumGlobeAnchor component.
CesiumGeoreference C++ Changes
Some C++ functions in CesiumGeoreference have changed. If you’re using any of the below functions, be sure to adjust your code accordingly. If you were previously accessing them via Blueprint, they should redirect automatically.
The following Blueprints and C++ functions on CesiumGeoreference
have been renamed.
TransformLongitudeLatitudeHeightToUe
toTransformLongitudeLatitudeHeightToUnreal
InaccurateTransformLongitudeLatitudeHeightToUe
toInaccurateTransformLongitudeLatitudeHeightToUnreal
TransformUeToLongitudeLatitudeHeight
toTransformLongitudeLatitudeHeightToUnreal
InaccurateTransformUeToLongitudeLatitudeHeight
toInaccurateTransformUnrealToLongitudeLatitudeHeight
TransformEcefToUe
toTransformEcefToUnreal
InaccurateTransformEcefToUe
toInaccurateTransformEcefToUnreal
TransformUeToEcef
toTransformUnrealToEcef
InaccurateTransformUeToEcef
toInaccurateTransformUnrealToEcef
TransformRotatorUeToEnu
toTransformRotatorUnrealToEastNorthUp
InaccurateTransformRotatorUeToEnu
toInaccurateTransformRotatorUnrealToEastNorthUp
TransformRotatorEnuToUe
toTransformRotatorEastNorthUpToUnreal
InaccurateTransformRotatorEnuToUe
toInaccurateTransformRotatorEastNorthUpToUnreal
The following C++ functions on CesiumGeoreference have been removed:
GetGeoreferencedToEllipsoidCenteredTransform
andGetEllipsoidCenteredToGeoreferencedTransform
moved toGeoTransforms
, which is accessible via thegetGeoTransforms
function onCesiumGeoreference
.GetUnrealWorldToEllipsoidCenteredTransform
has been replaced withTransformUnrealToEcef
except that the latter takes standard Unreal world coordinates rather than absolute world coordinates. If you have absolute world coordinates, subtract the World’sOriginLocation
before calling the new function.GetEllipsoidCenteredToUnrealWorldTransform
has been replaced withTransformEcefToUnreal
except that the latter returns standard Unreal world coordinates rather than absolute world coordinates. If you want absolute world coordinates, add the World’sOriginLocation
to the return value.AddGeoreferencedObject
should be replaced with a subscription to the newOnGeoreferenceUpdated
event.
If you’re experiencing other problems after updating to the latest plugin version, let us know here!