SuperMap Scene SDKs - Unreal Engine (Basic) User Instruction
SuperMap Scene SDKs - Unreal Engine (Basic) User Instruction
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
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.5 Features
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.
Open UE4.25, enter and create a new project, select the game. Then
select the blank template.
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-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.
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.
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.
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. .
(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.
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.
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.
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
Figure 3-25 The viewport after loading a globe scene and performing mouse operations
Open the project settings and find the map and mode sub-items.
(1) Modify the default game mode to PlaneGameMode.
(2) The editor starts the map: choose according to user needs.
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.
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.
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