Display the globe (Blueprints)

Learn how to set a basemap and elevation, and display the globe by using Blueprints.

Global scene Blueprints result

In this tutorial, you will create a global scene using a Web Map from ArcGIS Online as a basemap. The surface of the scene is defined with an elevation layer and the camera is positioned to display an area of New York City.

Prerequisites

Before starting this tutorial, you should:

  1. Have an ArcGIS account and an API key to access ArcGIS Online services while you are developing. If you don't have an account, sign up for free.
  2. Ensure your development environment meets the system requirements.
  3. Take Install and setup steps, and create a new project, and select Blueprints as your scene setting option.

Steps

Initialize Level Blueprint

  1. Click on File on the Menu Bar and select New Level.

  2. Select Empty Level in the popup window and click Create.

    New Level

  3. Click Window in the menu bar and select World Settings.

    Open World Wettings

  4. Open Advanced under World and check the Enable Large Worlds.

    Enable Large Worlds

  5. Click on File on the Menu Bar and select Save Level As. Name your level and click Save.

  6. From the Quick Add menu on the Tool Bar, drag an empty Actor and drop into the Viewport.

    Add an empty Actor

  7. Click the newly created Actor in the Outliner panel and rename the Actor to ArcGISRenderer in the Details panel.

    New Level

  8. Click on + Add in the Details panel and select ArcGIS Renderer component. When you attach the ArcGIS Renderer component to an empty Actor, it will add ArcGIS Map View Actor automatically to the Outliner panel.

    Attach ArcGIS Renderer component

  9. ArcGIS Map View Actor will place your GIS content in Unreal Engine space, and you can enable/disable the editor mode and Mesh Colliders. In this tutorial, you will configure where your GIS content is to be placed at 0, 0, 0 of the game engine space. Click on ArcGIS Map View Actor in the Outliner panel and set the Origin Position in the Details panel.You need to configure the Origin Position with a WKID for the values. In this tutorial, you are setting up the following Origin Position values for New York City.

    • Longitude: -74
    • Latitude: 40
    • Altitude: 0
    • Spatial Reference WKID: 4326

    This is the result of the ArcGIS Map View Actor.

    ArcGIS Map View Result

  10. Click the Blueprints button in the Level Editor Toolbar and select Open Level Blueprint.

    Open Level Blueprint

    This opens the Level Blueprint in the Blueprint Editor.

    Blueprint Editor

Create ArcGIS Map

ArcGIS Map is a container of your GIS content. First, create this container to add your content for the level.

  1. Access the Context Menu by right-clicking on an empty space in the Graph Editor and search for ArcGIS.

  2. Select ArcGIS Maps SDK > ArcGIS Map > Create ArcGIS Map with Map Type to create a map.

    Create with Map Type

  3. Make sure that the Map Type is set to Global and connect the Event BeginPlay to the new node.

    Connect ArcGIS Map

  4. Right-click on the Return Value pin, and select Promote to variable.

  5. In the Details panel, name the variable ArcGISMap.

This is the final result of the map.

Create ArcGIS Map

Set up a basemap and set the API key

  1. In ArcGIS Maps SDK > ArcGIS Basemap, select Create ArcGIS Basemap with Basemap Source and add it to the graph.

    ArcGIS Map variable

  2. Connect it to the Set node.

  3. Go to your developer dashboard to get your API key.

  4. Go back to Unreal Engine the Blueprint Editor, click the + Add button in My Blueprint and select Variable.

  5. Select newly created variable in My Blueprint.

  6. Rename the variable name to API Key and select String for the Variable Type in the Details panel.

    Create API key variable

  7. In the Toolbar, click Compile and the API key will appear in the Details below the Default Value.

    Compile Blueprints

  8. Enter your API key.

    Enter API Key

  9. Drag the API Key variable into the Event Graph.

  10. Select Get API Key and connect the variable to the API Key pin.

  11. In the Source pin, copy the URL:

    Use dark colors for code blocksCopy
     
    1
    https://www.arcgis.com/sharing/rest/content/items/716b600dbbac433faa4bec9220c76b3a/data

    In this tutorial, use Imagery with Labels as a basemap. To format a web map URL used for ArcGIS Maps SDK for Unreal Engine, refer to ArcGIS REST API.

  12. In ArcGIS Maps SDK > ArcGIS Map, select Set Basemap and add it to the graph.

    Note: If the node doesn't appear uncheck the Context Sensitive checkbox at the top right of the Context Menu.

  13. Connect it to the Create ArcGIS Basemap with Basemap Source node.

  14. Drag the ArcGISMap variable into the Event Graph.

  15. Select Get ArcGISMap and connect the variable to the Target pin.

This is the final result of the basemap.

Basemap result

Create elevation

  1. In ArcGIS Maps SDK > ArcGIS Image Elevation Source, select Create ArcGIS Image Elevation Source and add it to the graph.

  2. Connect it to the Set Basemap node.

  3. Drag the API Key variable into the Event Graph.

  4. Select Get API Key and connect the variable to the API Key pin.

  5. In the Source pin, copy and paste the URL:

    Use dark colors for code blocksCopy
     
    1
    https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer

    In this tutorial, you use Terrain3D as the elevation source. You can find more elevation layers in ArcGIS Online.

  6. In ArcGIS Maps SDK > ArcGIS Map Elevation, select Create ArcGIS Map Elevation with Elevation Source and add it to the graph.

  7. Connect it to the Create ArcGIS Map Elevation with Elevation Source node.

    Create elevation

  8. In ArcGIS Maps SDK > ArcGIS Map, select Set Elevation and add it to the graph.

  9. Connect it to the Create ArcGIS Map Elevation with Elevation Source node.

  10. Drag the ArcGISMap variable into the Event Graph.

  11. Select Get ArcGISMap and connect the variable to the Target pin.

This is the final result of the elevation.

Blueprints elevation

Compile and Save the Blueprint by using the Toolbar button, then close the Blueprint Editor once.

Set View Options and Map

Set the Map you create with Blueprints to ArcGIS Map View Actor to be rendered in the Viewport. Also, you can select either you load data from invisible layers or not depending on your needs.

  1. Click on the ArcGIS Map View Actor in the Outliner panel.

  2. Reopen the Level Blueprint editor window and right-click to open the All Actions for this Blueprint window. Click on Create a Reference to ArcGIS Map View to add it to the Event Graph.

    Create a Reference to ArcGISMapView

  3. Click the + Add button in My Blueprint and select Variable.

  4. Rename the variable to ArcGISRenderer View Options in the Details panel.

  5. CLick Variable Type drop-down and select Structure > ArcGIS Renderer View Options.

  6. In the Toolbar, click Compile and the ArcGIS Renderer View Options will appear in the Details below the Default Value. When you set the Load Data from Invisible Layers option to True, you can change the layer visibility during runtime.

    ArcGIS Renderer View Options

  7. Drag the ArcGISRenderViewOptions variable into the graph and select Get ArcGIS Renderer View Options.

  8. ArcGIS Map View Actor communicates with ArcGIS Renderer view. You can set either you load data from invisible layers or not for the ArcGIS Map View Actor to use the setting in the ArcGIS Renderer. In ArcGIS Maps SDK > ArcGIS Map View, select Set View Options and add it to the graph.

    Set View Options

  9. Connect it to the previous Set node.

  10. Connect ArcGIS Map View to the Target pin and ArcGIS Renderer View Options to the View Options pin.

  11. In ArcGIS Maps SDK > ArcGIS Map View, select Set Map and add it to the graph.

  12. Connect the Set Map node to the Set View Options node and ArcGIS Map View to the Target pin.

  13. Drag and drop the ArcGIS Map variable to the graph and select Get ArcGIS Map.

  14. Connect ArcGIS Map to the Map pin.

This is the result of set View Options and Map.

View Options and Map result

Compile and Save the Blueprint by using the Toolbar button, then close the Blueprint Editor.

Set up ArcGIS Pawn

ArcGIS Maps SDK for Unreal Engine comes with a ArcGIS Pawn that you can use in your ArcGIS scenes. This Pawn Actor correctly wraps and moves around the Earth in both Global and Local mode, and it is controlled by using the WASD keys and mouse during runtime. It contains an ArcGIS Camera component and an ArcGIS Location component.

You can find the ArcGIS Pawn here:

Plugins\ArcGIS Maps SDK for Unreal Engine C++ Classes\ArcGISSamples\Public\

To configure the camera, add the ArcGIS Pawn into the level.

  1. Select ArcGIS Pawn Actor and drag it into the level from the Content Drawer.

    Pawn

  2. Click the Actor and select ArcGIS Location Component in the Details panel.

  3. In the ArcGIS Location Component, set the Position to:

    • Longitude: -74.054921
    • Latitude: 40.691242
    • Spatial Reference WKID: 4326
    • Altitude: 3000000 Meters
  4. Set the Rotation to:

    • Heading: 65
    • Pitch: 68
    • Roll: 0

This is the result of the ArcGIS Pawn.

Pawn global Result

Set up the sky and the light

  1. From the quick add menu on the toolbar, select Lights > Directional Light and drag it into the level to create a Directional Light. For more information about Directional Lights, see Lights.

    Directional Light

  2. Select the Directional Light in the Outliner, and open the Transform section in the Details window.

  3. Reset the Location and Set the Rotation to:

    • X: 0
    • Y: -28
    • Z: -28
  4. Set the Mobility to Movable.

    Directional Light Transform

  5. In the Light section, change the Intensity Value to 3.1416.

  6. In the Cascaded Shadow Maps section, change the Dynamic Shadow Distance MovableLight from 20000 to 2000000.

  7. In the Atmosphere and Cloud section, enable Atmosphere Sun Light.

  8. In the Actor > Spawn Collision Handling Method section, select Always Spawn, Ignore Collisions.

    Directional Light Actor

  9. From the quick add menu on the toolbar, select Lights > Sky Light and drag it into the level to create a Sky Light. For more information about Sky Light, see Lights.

  10. In the Transform section, reset the Location and set the Mobility to Movable.

  11. In the Light section, enable Real Time Capture.

    SkyLight

  12. From the quick add menu on the toolbar, select Visual Effects > Sky Atmosphere and drag it into the level to create a Sky. For more information about Sky Atmosphere, see Fog Effects.

  13. In the Planet section, change the Ground Radius to 6378.137207.

You have successfully configured the Blueprints. You can click the Play icon and see your map.

You can use the WASD Keys to move left/right/forward/backward. Use the left mouse button to pan around the scene, the right button to orbit, and the scroll wheel to zoom in or zoom out.

What's next?

To explore more features and learn how to use additional services, try these tutorials:

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.