As a gamer and geographer, I was curious and excited when I found a way to incorporate my two passions with the ArcGIS Maps SDKs for Unity and Unreal Engine. Through games we can immerse ourselves in virtual worlds, usually either entirely fictional (like Skyrim’s Tamriel) or loosely based on a real place (like Grand Theft Auto’s Los Santos/Los Angeles). Wouldn’t it be cool if these fictional worlds were also real worlds, based on real-world data? And wouldn’t it be cooler still if the presentation of our geographic information could be as immersive and engaging as it is in video games?
The Maps SDKs for Unity and Unreal Engine enable developers to use real-world geospatial data from the ArcGIS system to create interactive, immersive, and photo-realistic 3D and extended reality (XR) experiences. They allow us to combine both the geospatial components of ArcGIS software, together with the powerful graphics capabilities that go into triple-A video games. Capabilities like advanced lighting, animated assets, and life-like physics that have been refined in the game development field.
For the Architecture, Engineering, and Construction (AEC) sector, this could mean creating realistic and geographically accurate representations of a future development to engage with stakeholders, complete with dynamic weather and populated with animated humans. Those in the defense sector could make use of controllable assets like helicopters to allow personnel to rehearse a mission before being deployed.
Developing these types of experiences would be a technically complex task, requiring significant game development expertise. However, if you are looking to make initial in-roads into game development with your geospatial data, then you’re in the right place! Here, we will focus on all the practical steps required to start becoming familiar with Unreal Engine and the Maps SDK for Game Engines.
What do I need to get started?
- An ArcGIS Developers account. This is needed to generate API keys, and access documentation on the Maps SDK for Unreal Engine. This is free to get started.*
- ArcGIS Maps SDK for Unreal Engine Plugin. Download the plugin here once you’ve created your Developers account.
- Unreal Engine 5.0 or 5.1 (note: the latest version – Unreal Engine 5.2 – is not currently supported by the Maps SDK). You will need to install the Epic Games Launcher before installing the Unreal Engine itself. Again, this is free.** Make sure to check out the system requirements.
- Visual Studio. This documentation from Epic Games will help you configure it to work with Unreal Engine.
*There is a free tier of access to a number of ArcGIS services.
**If your game makes more than $1 million, you will need to pay royalties to Epic Games.
Getting familiar with Unreal Engine
Epic Games have produced a helpful series of videos to guide you through your first hour in Unreal Engine. Once you have got a relatively good handle on concepts like Levels, Actors, and a basic understanding of Lighting, you’re ready to start looking at bringing in the geospatial components with the Maps SDK for Unreal Engine.
Getting familiar with the Maps SDK
The Maps SDK for Unreal Engine is well-documented in ArcGIS Developers, from getting started to deploying your application. The tutorials which take you through adding the plugin to Unreal Engine and displaying your first map are particularly helpful.
To sum up, the integration of geospatial data and game engines through the ArcGIS Maps SDKs for Game Engines offers an exciting opportunity to create some truly immersive and engaging experiences. While developing certain experiences may require game development expertise, this article has given you a taste of what’s possible with the Maps SDK as well as what you would need to get started yourself. What’s great about Unreal Engine and ArcGIS Developer technologies is that they’re both free to get started.
So, if this has whetted your appetite for game development and you’re eager to get hands on, then read on. I’ve pulled together a fun step-by-step guide to creating a sunset cinematic in Unreal Engine using only the UI (i.e. no code involved!).
Getting hands on with the Maps SDK for Unreal Engine
Before getting started with our sunset cinematic you’ll need to create a new project and add the plugin, following the steps in this Add a plugin tutorial.
You should now have a blank project with access to the Maps SDK plugin and can begin displaying a map. This Display a Map tutorial steps through adding various forms of geospatial data, and setting up a sky and lighting. It is a great place to start becoming familiar with the Maps SDK – I come back here whenever I need a little refresher.
Creating a sunrise/sunset animation
If you enjoyed the first two tutorials, then there is a simple way we can take our experience to the next level. I’ll take you through how I created a simple sunset cinematic using Unreal Engine’s Sequencer (a key-framing capability similar to Adobe’s Premiere Pro).
Here we follow-on from the Display a Map tutorial…
- Remove the data layers added in the tutorial. Leave only the basemap and elevation data.
- Under Layers in the ArcGIS Maps SDK Mode Panel, add the San Francisco layer. Building models are loaded from a 3D object scene layer hosted by Esri and is publicly available. (If you have access you can also use data in your own ArcGIS Online account or ArcGIS Living Atlas of the World, but you’ll need to change the coordinate values in steps 3 and 4, and add some additional authentication).
- Type: ArcGIS 3D Object Scene Layer
- Source: https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/SanFrancisco_Bldgs/SceneServer
- Name: SanFranBuildings
- Authentication: None
- Opacity: 1.0
- As we’ve changed the data, we’ll also need to change Origin Position, Map Extent, and Camera Position. Under Map > Map Type, set to Global.
- Under Map > Origin Position set the parameters to the following:
- Longitude: -122.4
- Latitude: 37.79
- Altitude: 0
- Spatial Reference WKID: 4326
- Under Camera, set the parameters of Camera Position and Rotation to the following:
- X: -122.40436
- Y: 796131
- Z: 113.116413
- Spatial Reference WKID: 4326
- Heading: 144.999924
- Pitch: 90.400002
- Roll: 0
- From the Quick Add menu on the toolbar, select Visual Effects > Volumetric Cloud to add it to the level.
- Again from the Quick Add menu, select Visual Effects > Exponential Height Fog to add it to the level.
- Select the Directional Light in the Outliner. In the Details panel search for and enable Light Shaft Occlusion and Light Shaft Bloom.
We’re heading a little off the beaten track now, so I’ve created a short video to guide you the rest of the way through. Steps 9 – 19 are listed below to follow along as you watch.
- Now that we’ve updated our data we can begin working on our cinematic. First, in the toolbar, add a Level Sequence and save it as “SunsetCinematic”.
- Set View Range End Time and Working Range End to 1100.
- Drag the Playback Range (red vertical line) to (approximately) 1000 frames.
- Select the Directional Light in the Outliner. Right-click on the Sequencer, go to Actor to Sequence, and select Add Directional Light.
- Click the + icon next to Directional Light and add a Transform.
- With the Slider at the 0000 frame position, position starting point for the sun (Directional Light). Under Transform, next to Rotation, click the + icon. Three red dots will appear in the Sequencer. Set Roll, Pitch and Yaw to these values:
- Roll: 0.0
- Pitch: 390
- Yaw: 64. 8
- With the Slider at the 1000 frame position, next to Rotation, click the + icon. Set Roll, Pitch and Yaw to these values:
- Roll: 0.0
- Pitch: 170
- Yaw: 64.8
- Move the Slider back to the 0000 frame position (you’ll get a sneak preview of what the final cinematic will look like here!). Click the Camera icon. Create a new camera cut and set it as the current camera cut.
- Current Aperture: 2.8
- Current Focal Length: 10.5
- Manual Focus Distance: 219.0
- This can now be rendered to a video file. Click the Clapper board icon (right of the Camera icon).
- In Render Movie Settings, scroll to Animation and drop-down the advanced settings. Set the Warm Up Frame Count to 500. This applies a short warm up period before the cinematic starts, allowing the data to render.
- Keep the rest of the settings as default and click Capture Movie. A popup window will open giving you a preview of your cinematic. It can also be found in the Saved folder of Unreal Project, under Video Captures.
- Note: If you find the data is not fully rendered at the start of the animation, the Warm-Up Frame Count may need to be increased.
- There is no native option to output the cinematic as an MP4, so we used the AVI format. To convert to an MP4, we used Adobe Express which is free to use if you sign-up for an account.
Next Steps and Additional Resources
We’ve only scratched the surface of what’s possible with animations in Unreal Engine. If you’re hungry for more then there is plenty left to do. We animated the track of a static actor (the Directional Light) and began to use the game engine’s more advanced lighting features. With a little more time and familiarity with the Unreal Engine, we could have an animated actor like a human, animal or vehicle, and added multiple camera shots to take our cinematic a step further.
There is an abundance of material online to guide you through next steps. A favourite of mine has been Virtus Learning Hub on YouTube (which is where I got the idea for my tutorial). There you can find bitesize tutorials for creating fully-fledged games using Unreal Engine. Equally, freeCodeCamp has a full Unreal Engine 5 for Beginners course that should give you a solid foundation to develop a multitude of games.