- Learning Center
- CesiumJS Quickstart
- CesiumJS Getting Started Tutorials
- Build CesiumJS Apps
- CesiumJS No-Code Tutorials
- Cesium for Unreal Quickstart
- Cesium for Unreal Getting Started Tutorials
- Tile & Host Data on Cesium ion
- Integrate with Cesium ion
- API References
- Data Formats
- Live Code Examples
- Migrate from Google Earth
This tutorial shows you how to use Cesium for Unreal to import a photogrammetry model from Cesium ion. You’ll use a model of one of the world’s most livable cities: Melbourne, Australia.
Melbourne, Victoria, Australia photogrammetry in Unreal Engine. Data modified from City of Melbourne 3D Textured Mesh CC BY 4.0
You’ll learn how to:
- Add a city-scale 3D Tiles photogrammetry model from Cesium ion to your level.
- Use the CesiumGeoreference Actor to geoposition your level on the globe.
- Unreal Engine (at least 4.26 or later) and the Cesium for Unreal plugin are installed.
- A Cesium ion account to stream the Melbourne tileset into Unreal Engine.
See the Cesium for Unreal Quickstart to learn how to install Cesium for Unreal and connect it with Cesium ion.
Step 1. Create a project and level
See the Quickstart for detailed instructions. Stop before Step 6, Add global 3D buildings to your scene, because you will be adding photogrammetry-derived buildings instead.
Step 2. Add the Melbourne photogrammetry model from Cesium ion
Open the Cesium panel by clicking the icon in the toolbar.
Connect to Cesium ion if you haven’t already.
Click the Add button to open the Cesium ion Assets panel.
Find Melbourne Photogrammetry in the asset list, click on it, and then click Add to Level.
Is Melbourne Photogrammetry missing from the asset list? Visit the Melbourne Photogrammetry Asset Depot page and click Add to my assets. Then return to Unreal Engine, close the Cesium ion Assets panel, and click the Add button again on the Cesium panel to re-open and refresh the asset list.
Double-click Melbourne Photogrammetry in the World Outliner to point the viewport at Melbourne.
It will likely be oriented strangely, and you may even be looking at the bottom of it.
Step 3. Center the Unreal world at Melbourne
The orientation of Melbourne on the screen is strange because the Unreal Editor camera is maintaining its normal “+Z direction is up” orientation. On planet Earth - unlike in most games - the “up” direction in an Earth-centered coordinate system changes depending on where you are in the world.
Let’s reposition the Unreal Engine world in a more useful way:
Click on the CesiumGeoreference-1 in the World Outliner.
On the Details tab, click the Place Georeference Origin Here button.
The city will flip upright. If the scene turns black, it’s probably because it’s nighttime in Melbourne. Try adjusting the Solar Time property on the CesiumSunSky.
The Place Georeference Origin Here button didn’t just change the orientation. If you watched closely, you may have noticed that the Longitude, Latitude, and Height fields below the button also changed when you pressed it. In precise terms, the button repositioned the coordinate system of the Unreal Engine level so that its center point, (0, 0, 0), is located exactly where the camera was located previously. And it aligned the Unreal axes so that +X points to the East at that point, +Y points to the South, and +Z points up.
It’s also possible to type in the Longitude, Latitude, and Height values directly to position the world at a precise location.
This ability to position the world origin somewhere on the globe is very helpful because many things in Unreal Engine, from cameras to foliage to physics, prefer a coordinate system with relatively small values and with +Z pointing up. By “georeferencing” the Unreal world in this way, we allow normal Unreal objects to be placed in and around Melbourne and act just as they would in any other game.
Step 4. Adding global context
At this point, Melbourne is a city floating in a sea of darkness. Let’s add some global context:
In the Cesium panel, click the + next to Cesium World Terrain + Bing Maps Aerial imagery, or another Cesium World Terrain option of your choosing.
The area around Melbourne will be filled in with the global assets you added:
This looks good from a distance, but when we zoom in close we can see some places where the Cesium World Terrain sticks up through the photogrammetry model:
This happens because Cesium World Terrain and Melbourne photogrammetry are both high-resolution datasets, and may overlap the same geography. A future version of Cesium for Unreal will allow you to “clip away” Cesium World Terrain to make room for the photogrammetry model. For now, let’s move the photogrammetry model upward so that the terrain model no longer pokes through.
Select the Melbourne Photogrammetry Actor and adjust the Location Z coordinate by clicking inside the Z coordinate box and dragging toward the right, or by typing a number.
Continue to the Using Custom Controllers tutorial, where you’ll learn how to add a physics-based controller to your level, and use it to explore a photogrammetry model.