You are on page 1of 23

Content:

1. Version Introduction..................................................................................................................... 2
1.1 Operation System.............................................................................................................. 2
1.2 Deployment System.......................................................................................................... 2
1.3 Data Types.......................................................................................................................... 2
1.4 Scene Types....................................................................................................................... 2
1.5 Features.............................................................................................................................. 2
1.6 Mouse Operation............................................................................................................... 2
1.7 Licensing............................................................................................................................. 3
2. Preparation....................................................................................................................................3
2.1 Obtaining relevant resource.............................................................................................3
2.2 Specifications of hardware and software for UE4........................................................ 3
2.3 Unreal Engine version.......................................................................................................3
3. Use plug-in.................................................................................................................................... 4
3.1 Create UE4 project............................................................................................................ 4
3.2 Install the plug-in into the project.................................................................................... 5
3.2.1 Method 1:................................................................................................................. 5
3.2.2 Method 2:................................................................................................................. 6
3.3 Use plug-ins........................................................................................................................ 8
3.3.1 Use plug-ins in preset scenes.............................................................................. 8
3.3.2 Use plug-ins in new scenes..................................................................................9
3.4 Package the project as exe............................................................................................17
3.4.1 Set the map and mode........................................................................................ 17
3.4.2 Choosing a packaged project.............................................................................18
3.4.3 Operation............................................................................................................... 19
4. Common problems.....................................................................................................................20
5. Reference.................................................................................................................................... 22
5.1 Data Producing.................................................................................................................22
5.2 Address of Sample Data.................................................................................................23
1. Version Introduction

1.1 Operation System

The SDK supports development on Windows systems.

1.2 Deployment System

The plug-in supports deployment to Windows systems.

1.3 Data Types

Support the types of cached data added to the scene, including: image
(*.sci3d), terrain (*.sct), model(*.scp). The plug-in can load the above
types of data through local or online services.

1.4 Scene Types

The plug-in supports loading globe and local scenes in UE4.


The coordinate systems are applied differently to scene types, globe
scene for data with geographic coordinate system and projection
coordinate system; local scene for data with plane coordinate system
and projection coordinate system.

1.5 Features

1. Support loading local or online data to globe and local scenes.


2. Add and delete layer.
3. Layer positioning.
4. Rest service
5. Provide data services such as SuperMap Terrain, BingMaps,
OpenStreetMap, STK Terrain, Tianditu Imagery and Tianditu Terrain
etc.

1.6 Mouse Operation

It supports the use of the mouse to browse the scene, including


operations such as translation, zoom, and rotation of the local and globe
scene.
1.7 Licensing

SuperMap Scene SDKs_Unreal Engine (Basic) is open source under


the Apache 2.0 license, and is free to use for commercial and
non-commercial use.

2. Preparation
The preparation phase will guide users how to obtain plug-in related
information, environment variable configuration, etc. Before starting,
users are required to purchase this plug-in in the mall and install it in
Unreal Engine.

2.1 Obtaining relevant resource

Relevant information acquisition: click the link here to obtain the


following information. At the same time, also click on the link to the
detailed interface documentation of the plug-in in the Unreal Mall to get
the information.
1. SuperMap Scene SDKs_Unreal Engine (Basic)_Package
2. SuperMap Scene SDKs_Unreal Engine (Basic)_User Instruction

2.2 Specifications of hardware and software for UE4

Running this plug-in needs to meet UE4's minimum requirements for


the system platform. Refer to UE4 hardware and software
specifications to deploy the running machine platform. This tutorial
takes Windows10 64-bit system as an example.

2.3 Unreal Engine version

This plug-in supports UE4.25 and UE4.26 versions. Users can


download and install the Epic Games Launcher launcher on the Unreal
Engine official website, and install the latest version of UE4.25 or
UE4.26 through the launcher. Need to use VS2017 for development,
please download and install VS2017 according to the system
requirements.
3. Use plug-in

3.1 Create UE4 project

Open UE4.25, enter and create a new project, select the game. Then
select the blank template.

Figure 3-1: Create project

Figure 3-2: Select an empty project


Select C++, name the project, pay attention to use the English path,
avoid being unable to create a C++ project, and then wait for the
project to be created. After the creation is complete, close the code
and interface.
Figure 3-3: Select the C++ project and determine the storage location

Figure 3-4: Accomplished project

3.2 Install the plug-in into the project

There are methods are provided for using the plug-in, and you can take
one of them according to your needs.

3.2.1 Method 1:

This method loads the SuperMap plug-in in the UE4 plug-in library
directly into the project. If you only use the plug-in packaged interface
to load data, and do not perform the secondary development of the
plug-in, you can use this method.

After opening the newly created UE4 project, in the Edit-Plugins panel,
you can see that the SuperMap plug-in has been installed in the UE4
engine, and it is not enabled by default. Just check the box in front of
"Enabled" .

Figure 3-5: Location of the plug-in


If there is no plug-in in the content browser panel, in the view options in
the lower right corner, check "Show engine content" and "Show plug-in
content".

Figure 3-6: Check "Show engine content" and "Show plug-in content" to display plug-in content

3.2.2 Method 2:

This method copies the SuperMap plug-in in the UE4 plug-in library to
the project project, and then loads it. If you not only use the plug-in
packaged interface to load data, but also perform secondary
development of the plug-in, you can use this method.

Note: Before using the method 2, if the plug-in has been loaded by the
method one, you need to uncheck the enabled button in the plug-in
panel to no longer use the engine plug-in to avoid accidental errors. Or
create a new project to load the plug-in.

1. Find the software installation disk: \Program Files\Epic


Games\UE_4.25\Engine\Plugins\Marketplace and copy the SuperMap
Scene SDKs_Unreal Engine (Basic) folder under the folder.

Figure 3-7 Location of SuperMap Scene SDKs_Unreal Engine (Basic) folder

2. Find the newly created UE project file, create a new Plugins folder,
and paste the files copied in step 1 into the Plugins folder.

Figure 3-8: Plugins placement directory diagram

Directly double-click to open the *.uproject project file, you can enter
the UE4 interface, view and use the plug-in.
3. Right-click the project directory and select Generate Visual Studio
project files.
Figure 3-9: Generate Visual Studio project files
Then enter the C++ project of *.sln for secondary development.

3.3 Use plug-ins

3.3.1 Use plug-ins in preset scenes

After installing the plug-in, user can directly use the preset map to view
the loading effect of the online example data. UE4 does not display
plug-in content by default. User can click the view option in the lower
right corner of the figure, check the display engine content and plug-in
content, and display the content in SuperMap.

Figure 3-10 Check the Show plug-in content and user will see the SuperMap content folder

Select the Map folder under the SuperMap content folder. After
opening the folder, user can see that some maps have been pre-made,
and the game mode and sky atmosphere in each Map have been set.
Double-click to open the Map scene, user can directly click to run, and
user will see the plane or spherical loading effect after running, as
shown in the figure.
Figure 3-11: The effect of adjusting the light angle after running the example scene

After running, user will find that the scene cannot be operated (moved).
In order to better experience the camera operation of GIS, user can
first complete the operation of importing the configuration file in 3.4.2
(1), and user can operate the scene by mouse after running the Map
again. .

3.3.2 Use plug-ins in new scenes

(1) Import configuration file


During use, the mouse will perform GIS camera operations, and a
mapping needs to be added to the mouse operations.
Open the project settings, find the "input" item on the left, then click
Import Configuration in the upper right corner, find the
Supermap.ini file under the folder ..\..\Plugins\SuperMap Scene
SDKs_Unreal Engine\Config, and confirm the import.
If it is a plug-in installed by method 1, the Plugins folder is in the
software installation disk: \Program Files\Epic
Games\UE_4.25\Engine; if it is a plug-in installed by method 2, the
Plugins folder is in the project project , The newly created Plugins
folder.
After the import is complete, user can see the operation map and
the axis map, and the values ​ ​ have been added. Then close
the project settings.
Figure 3-15 Import configuration file

(2) Create a new empty level and drag it into the relevant use class
i. Open the UE4 project and create a new default level. If user
want to load a globe scene, it is recommended to delete: skybox,
atmospheric fog, Floor and other objects. If user want to load a
local scene, it is recommended to delete: Floor object.
ii. Search for Super Map in the search category bar on the left,
and the available plug-in categories will pop up.
iii. Drag the Super Map Main Actor into the scene.
iv. In the case of a globe scene, drag the Super Map Star into the
scene and initialize its position to (0.0, 0.0, 0.0). And the sky
atmosphere that comes with UE4 is dragged into the scene, and
its parameters are changed. The transformation mode is
changed to the center of the planet at the component
transformation; the radius of the earth is changed to 6378.137.

Figure 3-13 Drag in SuperMap related content to the scene


(3) Change the game mode
In order to enable the mouse to operate the camera to browse the
scene and have the function of GIS camera operation, the game
operation needs to be modified. Open the "Blueprint" in the toolbar,
select "World Scene Reload", change its game mode, and select
PlaneGameMode in the "Select GameModeBase Class".
(4) Introduction to SuperMap control
Use the SuperMap editor controls to select scene types, add local
layers, add iServer service layers, add public service layers, delete
layers, modify the position of the insertion point, etc.
Select the SuperMap content under the content browser, then
open the BluePrints folder, find the SuperMap_CN control under
the CN folder (the English version control is SuperMap_EN under
the EN folder), and then right-click and choose to run the editor
control.

Figure 3-14 Control position

Figure 3-15 Selecting the local scene type


Figure 3-16 Selecting the globe scene type

Figure 3-17 Choose to load the online service interface


Figure 3-18 Choose to load the public service interface

(5) Realize data loading through the control UI


i. Scene type: select the type of scene to be loaded, the scene type is divided
into spherical and plane.
The globe scene will show the effect of loading in the way of the earth, can
load the globe scene data, and support the data of the geographic
coordinate system and the projected coordinate system.
The local scene loads the data in a plane way, and supports data in the
plane coordinate system and the projected coordinate system.

Position: It is the position of the data insertion point, used in a local scene,
and set the zero position for the loaded data. If it is model data, user can fill
in the value of position in its scp file, and the data center point corresponds
to the origin of the UE scene world coordinate system; if it is terrain data,
user need to refer to the Bounds value in its sct file, x Fill in the value
between Left and Right, and fill in the value between Top and Bottom for y.

ii, Add layer type


Local layer: local data such as manual modeling data, laser point cloud data,
oblique photography model data, and terrain image data can be loaded.
Click the "Add layer" button behind the local layer add to enter the file
selection dialog box. In the dialog box, select the object to be loaded, such
as a spherical surface to load a terrain image data. First, user need to find
the data folder and find it. *.sct (*.sci3d) file, after clicking OK, the
successfully loaded layer will be displayed at the bottom of the control
interface. Similarly, when loading manual modeling data and oblique
photogrammetric data, select its scp configuration file.

Figure 3-19 The local terrain image is loaded successfully

Online services: online services that can load manual modeling data, laser
point cloud data, oblique photography model data, and terrain image data.
The tile types are Terrain (terrain layer), Image (image layer), S3M
(3D tile layer), user need to use different tile types according to the type of
loaded data. When loading terrain data, use the Terrain type; when loading
image data, use the Image type; when loading manual modeling data,
laser point cloud data, and tilt photography model data, use the S3M type.
Add the network path of the layer in the text box of the layer path, as
shown in the example: copy the URL to the realspace layer and paste it
into the box.

Figure 3-20 URL location copied by online service

Select the layer name to fill in the layer name under the first 3D scene.
Note: Use the layer under the first scene in the 3D scene list, and it is not
currently supported to select scenes in other locations.
Figure 3-21 Layers copied by online services

The online service layer also supports other Rest services.


In addition, the plug-in also supports loading of public services such as
SuperMap Terrain service, BingMaps service, OpenStreetMap service,
STK Terrain service, Tiandi image, Tiandi terrain, etc. User can select the
service type according to the loaded service, and enter the layer
information, etc., to add to the layer. If user only use the default public
service, user can click Add directly.

Figure 3-22 Directly load the Bing Maps public service


Figure 3-23 The displayed effect after loading the Bing Map public service
iii. Layer management
Manage the loaded layers and support operations such as layer deletion.

Figure 3-24 Layer management interface


(6) Add latitude and longitude and camera height display
In the preset levels, this feature has been displayed on the running
interface. If it is a new level, you need to add the interface UI to the
viewport in the level blueprint. details as follows:

Figure: 3-25 Blueprint level settings


In the process of creating controls, SuperMapUI is selected for Class.
After completing the above operations and successfully compiling, run it
again and you will see the position of the mouse and the height of the
camera displayed in the interface.
(7) Operation
Select the loading scene type, after adding the data, click Run to enter the
running interface.
After that, you can use the mouse to pan and zoom the scene and view the
data.

Figure 3-25 The viewport after loading a globe scene and performing mouse operations

3.4 Package the project as exe

3.4.1 Set the map and mode.

Open the project settings and find the map and mode sub-items.
(1) Modify the default game mode to PlaneGameMode.

Figure 3-27: Modifying the default game mode

(2) The editor starts the map: choose according to user needs.

Figure 3-28: The editor starts to modify the map


(3) Game default map: Same as above.
In this way, when the packaging is complete, run the exe to load and display
the selected scene map.
If users were using method 1, the installed plug-in requires an additional
operation when packaging the project:
In the Project-Packing panel, expand "Show advanced items", and select
SuperMap content under the additional asset catalog to be cooked.
If the plug-in is installed in the second method, this step is not required.

Figure 3-29: Method 1 additional operation of packaging exe option

3.4.2 Choosing a packaged project

Click on the file, find the package project category, select Windows (64-bit),
pop up the package project file selection box, select the location where the
package project is stored. After confirmation, wait for the packaging to be
completed.
Figure 3-30: Package exe option

3.4.3 Operation

After completing the above operations, click the exe to enter the running
interface.

Figure 3-31: Click to run the exe


Figure 3-32: UI of the exe file

4. Common problems
Q1: I can’t see the loaded data after running
Solution:
(1) If the data is not in the field of view, you can click the layer positioning
function to move to the top of the data.
(2) The data path is too long. It is recommended that the total path length
does not exceed 256 characters.
(3) The data of the geographic coordinate system is loaded in the plane
scene, or the data of the plane coordinate system is loaded in the globe.
The data type can be viewed through the data configuration file (scp, sct,
sci3d), if "TileSplitType" is "LOCAL", it is flat data, if it is "GLOBAL", it is
spherical data.
(4) Load the data of the plane coordinate system in the plane scene, but
still can't see the data, please check whether the setting of the insertion
point is correct.
Q2: How does the loaded data receive the influence of the UE4 scene
lighting
Solution:
After testing, manual modeling model, tilt photography model, laser point
cloud model, BIM model, terrain image and other data can be affected by
light. Adjust the light source parameters to see the corresponding effect.
Q3: During the operation, the coordinate value of the object is found to
change with the drag of the scene
Solution:
The plug-in is loaded by moving the world coordinate origin. When the
camera viewport moves a certain distance, the world coordinate origin will
be transformed, so the coordinate value of the object in the scene will also
change.
Q4: Can not perform mouse operation
Solution:
(1) Check whether the game mode is set.
(2) Check whether the input mapping relationship has been imported in the
project settings.
(3) Check whether the attribute parameter of SuperMap Main Actor has
selected a value, and it should be disabled.

Figure 4-1 Select Disable


Q5: In the add layer panel, the layer add button does not work and data
cannot be added.
Solution:
Check the scene world outline view panel, whether the SuperMap
MainActor object is imported.
Q6: In the manual modeling model, individual models appear black, and
the lighting effect is different from the surrounding models.
Solution:
It may be a problem with the model normal. You can use SuperMap
iDesktop to remove the normal and recalculate the normal.
Q8: When loading the white model data in the scene, no matter how to
adjust the lighting, the model has no shading effect.
Solution:
It is necessary to recalculate the normals of the dialogue mode data,
regenerate the data and load it.
Q9: When browsing the scene by moving the mouse, the scene appears
blurry and freezes.
Solution:
Turn off UE4's motion blur function.
Q10: After the packaging is complete, it prompts that the third-party
library is missing.
Solution:
If the plug-in package can run normally during use, but the prompt appears
after packaging, it may be because the plug-in package is placed in the
wrong position, please refer to the relevant instructions of the packaging
operation in section 3.5.
5. Reference

5.1 Data Producing

The data loaded through the plug-in can be produced by SuperMap iDesktop.
For the specific generation method, please refer to the chapter "Generating
Scene Cache" in the help file of SuperMap iDesktop.
It should be noted that when generating the scene cache, the data of the
projection coordinate system needs to be set to the scene type of the
generated coordinate system. Please choose a globe or a local scene
according to the use scene.

Figure 5-1 Select the scene type when the projection coordinate system data is generated and
cached
At the same time, it should be noted that, in order to better experience the
powerful real-time rendering capabilities of the game engine, please select
single texture generation in the texture settings when generating the model
cache.
5.2 Address of Sample Data

In the sample map we provide, different types of sample data are loaded by
default. The name and service address of the sample data are as follows:
Scene Data Type URL Layer Name
Sample BIM http://www.supermapol.com/realspac BIM
_BIM e/services/3D-BIMChangJing/rest/rea
lspace
Sample Oblique http://www.supermapol.com/realspac config
_Obliqu Photogrammetry e/services/3D-Oblique-2/rest/realspa
e ce
Sample Point Cloud https://www.supermapol.com/realspa POINTCLOUD23
_PointC ce/services/3D-cloud/rest/realspace
loud
Sample WhiteBoxModel http://www.supermapol.com/realspac 北京白模-UE
_Baimo e/services/3D-BaiMoChangJing/rest/r
ealspace
Sample Man-made model http://www.supermapol.com/realspac Waters_color@鸟巢数据优化缓存
_Model e/services/3D-niaochao-2/rest/realsp Tree_Xiaopin@鸟巢数据优化缓存
ace Road@鸟巢数据优化缓存
Building@鸟巢数据优化缓存
Ground@鸟巢数据优化缓存
Sample Terrain and http://www.supermapol.com/realspac dixing
_LocalT Imagery e/services/3D-DiXingYingXiang/rest/r Image
errainA ealspace
ndImag
ery

You might also like