Model building method based on unreal engine, electronic device and storage medium

By building a coordinate system in Unreal Engine and importing remote sensing image data to generate a virtual model, the problem of inaccurate correspondence between the virtual model and the real world location is solved, improving the model's realism and construction efficiency.

CN115409960BActive Publication Date: 2026-06-19ZHEJIANG DAHUA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG DAHUA TECH CO LTD
Filing Date
2022-07-15
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

The current Unreal Engine does not accurately correspond the virtual models to the real world, resulting in low model realism and high construction difficulty.

Method used

A coordinate system is built in Unreal Engine, importing DEM images, raster data, and vector data from remote sensing images to generate terrain, maps, planar and 3D models. Based on this data, a virtual model is generated in the coordinate system.

🎯Benefits of technology

It improves the realism and construction accuracy of virtual models, and reduces the difficulty of building virtual models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115409960B_ABST
    Figure CN115409960B_ABST
Patent Text Reader

Abstract

This application discloses a model building method, electronic device, and storage medium based on Unreal Engine. The method includes: constructing a coordinate system in Unreal Engine; obtaining DEM imagery, raster data, and vector data based on remote sensing images; importing the DEM imagery, raster data, and vector data into Unreal Engine to generate terrain corresponding to the DEM imagery, a map corresponding to the raster data, and a plane and a solid corresponding to the vector data; and generating a virtual model corresponding to the remote sensing image in Unreal Engine based on the positions of the terrain, map, plane, and solid in the coordinate system. This solution can improve the realism of the virtual model and reduce the difficulty of virtual model construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of virtual reality technology, and in particular to a model building method, electronic device, and storage medium based on Unreal Engine. Background Technology

[0002] With the continuous development of virtual reality technology, the application of digital twins is receiving increasing attention. Digital twin technology can map the real world to the virtual world, thereby constructing a virtual model that corresponds to the real world, allowing for the analysis of problems existing in the real world based on this virtual model. However, in current technology, virtual models created in Unreal Engine struggle to accurately correspond to their real-world locations, and the lack of accurate references during modeling results in low realism and significant difficulty in constructing virtual models. Therefore, improving the realism of virtual models and reducing the difficulty of their construction has become an urgent problem to be solved. Summary of the Invention

[0003] The main technical problem addressed by this application is to provide a model building method, electronic device, and storage medium based on Unreal Engine, which can improve the realism of virtual models and reduce the difficulty of building virtual models.

[0004] To address the aforementioned technical problems, the first aspect of this application provides a model construction method based on Unreal Engine, comprising: constructing a coordinate system in Unreal Engine; obtaining DEM imagery, raster data, and vector data based on remote sensing images; importing the DEM imagery, raster data, and vector data into Unreal Engine to generate terrain corresponding to the DEM imagery, a map corresponding to the raster data, and a plane and a solid corresponding to the vector data; and generating a virtual model corresponding to the remote sensing image in Unreal Engine based on the positions of the terrain, map, plane, and solid in the coordinate system.

[0005] To address the aforementioned technical problems, a second aspect of this application provides an electronic device comprising: a memory and a processor coupled to each other, wherein the memory stores program data, and the processor invokes the program data to execute the method described in the first aspect.

[0006] To address the aforementioned technical problems, a third aspect of this application provides a computer-readable storage medium storing program data thereon, wherein the program data, when executed by a processor, implements the method described in the first aspect.

[0007] The above scheme constructs a coordinate system within Unreal Engine to accurately map the real world to the virtual world. It obtains DEM imagery, raster data, and vector data based on remote sensing images. The remote sensing images serve as the source data for constructing the virtual model. The DEM imagery is imported into Unreal Engine to obtain the corresponding terrain, the raster data is imported to obtain the corresponding map, and the vector data is imported to obtain the corresponding planes and solids. Based on the positions of the terrain, map, planes, and solids within the coordinate system, a virtual model corresponding to the remote sensing image is generated in Unreal Engine. Therefore, Unreal Engine is compatible with remote sensing images and can use them as source data for generating virtual models. Furthermore, the remote sensing images can serve as a reference for the virtual model in the real world, reducing the difficulty of constructing virtual models within Unreal Engine. In addition, the terrain, map, planes, and solids are all constructed in Unreal Engine based on remote sensing images, and their positions in the Unreal Engine's coordinate system correspond to their real-world positions, thereby improving the realism of the virtual model. Attached Figure Description

[0008] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0009] Figure 1 This is a flowchart illustrating one implementation method of the Unreal Engine-based model construction method of this application;

[0010] Figure 2 This is a flowchart illustrating one implementation method of constructing a coordinate system within the Unreal Engine of this application;

[0011] Figure 3 This is a flowchart illustrating one implementation method of the terrain construction method based on Unreal Engine in this application;

[0012] Figure 4 This is a schematic diagram illustrating an application scenario of one implementation method of the terrain construction method based on Unreal Engine in this application;

[0013] Figure 5 This is a flowchart illustrating one implementation method of the map construction method based on Unreal Engine in this application;

[0014] Figure 6 This is a flowchart illustrating one implementation method of the planar construction method based on Unreal Engine in this application;

[0015] Figure 7 This is a flowchart illustrating one implementation method of the 3D modeling method based on Unreal Engine in this application;

[0016] Figure 8 This is a schematic diagram illustrating an application scenario of one implementation method of the Unreal Engine-based 3D modeling method of this application;

[0017] Figure 9 This is a flowchart illustrating one implementation method of the icon construction method based on Unreal Engine in this application;

[0018] Figure 10 This is a flowchart illustrating one implementation method of the heatmap construction method based on Unreal Engine in this application;

[0019] Figure 11 This is a schematic diagram of the structure of one embodiment of the electronic device of this application;

[0020] Figure 12 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0022] In this paper, the terms "system" and "network" are often used interchangeably. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this paper means two or more.

[0023] The Unreal Engine mentioned in this article is a game development engine used to build virtual worlds. The execution entities corresponding to the various methods provided in this article are the Unreal Engine's corresponding servers or processing terminals.

[0024] Please see Figure 1 , Figure 1 This is a flowchart illustrating one implementation method of the Unreal Engine-based model construction method of this application. The method includes:

[0025] S101: Building a coordinate system in Unreal Engine.

[0026] Specifically, a coordinate system is built in Unreal Engine so that locations in Unreal Engine can be correlated with the real world through the coordinate system.

[0027] In one application approach, a coordinate system is constructed in Unreal Engine and the engine origin is determined. The coordinate system includes a geographic coordinate system, a projected coordinate system, and an engine global coordinate system. The geographic coordinate system and the projected coordinate system are related to the Global Positioning System (GPS). The engine global coordinate system is used to locate any object in Unreal Engine. The engine origin has corresponding origin coordinates in the projected coordinate system. The engine global coordinates in the engine global coordinate system are obtained by subtracting the origin coordinates from the projected coordinates in the projected coordinate system.

[0028] In another application, a geographic global object is created in Unreal Engine and a coordinate system is constructed. The coordinate system includes a geographic coordinate system, a projected coordinate system, an engine global coordinate system, and engine local coordinates. The geographic global object includes the engine origin and the transformation relationship between any two coordinate systems. The geographic coordinate system and the projected coordinate system are related to the Global Positioning System (GPS). The engine global coordinate system is used to locate any object in Unreal Engine. The engine origin has corresponding origin coordinates in the projected coordinate system. The engine global coordinates in the engine global coordinate system are obtained by subtracting the origin coordinates from the projected coordinates in the projected coordinate system. The engine local coordinates in the engine local coordinate system are determined based on the offset of the vertices on the current object relative to the engine global coordinates of the current object.

[0029] S102: Obtain DEM images, raster data, and vector data based on remote sensing images, import the DEM images, raster data, and vector data into Unreal Engine, and generate terrain corresponding to the DEM images, maps corresponding to the raster data, and planar and 3D models corresponding to the vector data.

[0030] Specifically, remote sensing images are raster structures with pixels as the unit. Raster data can be obtained based on remote sensing images. Vector data can be obtained by extracting vectors from the raster structure in the remote sensing image. A Digital Elevation Model (DEM) is obtained after extracting data from the remote sensing image using algorithms. DEM imagery is obtained from the DEM. The raster data includes the image information of the remote sensing image, the DEM imagery includes the height information in the remote sensing image, and the vector data includes vector lines and vector surfaces extracted from the remote sensing image.

[0031] In one application method, a DEM image based on a remote sensing image is acquired, the remote sensing image is read, image information in the remote sensing image is extracted to obtain raster data, vector data is obtained by vector extraction of the raster structure in the remote sensing image, the DEM image is imported into Unreal Engine to obtain the terrain corresponding to the DEM image, the raster data is imported into Unreal Engine to obtain the map corresponding to the raster data, and the vector data is imported into Unreal Engine to obtain the plane and solid corresponding to the vector data. Among them, the plane corresponds to the vector line or vector plane, and the solid corresponds to the vector plane. After widening the vector line, a plane can be generated in Unreal Engine. A plane can be generated in Unreal Engine based on the vector plane. After raising the vector plane, a solid can be generated in Unreal Engine.

[0032] In another application, a DEM image based on a remote sensing image is obtained, and the DEM image is imported into Unreal Engine to generate a terrain corresponding to the DEM image in Unreal Engine; and, raster data based on a remote sensing image is obtained, and the raster data is imported into Unreal Engine to generate a map corresponding to the raster data in Unreal Engine; and, vector data based on a remote sensing image is obtained, and vector lines or vector surfaces in the vector data are imported into Unreal Engine to generate a plane corresponding to the vector data in Unreal Engine; and, vector data based on a remote sensing image is obtained, and vector surfaces in the vector data are imported into Unreal Engine to generate a solid corresponding to the vector data in Unreal Engine.

[0033] Specifically, remote sensing images are read using a spatial data conversion library to make Unreal Engine compatible with remote sensing images. Remote sensing images are used as source data for building virtual models, and they can also serve as a reference for virtual models in the real world. In Unreal Engine, terrain corresponding to DEM images, maps corresponding to raster data, and planes and solids corresponding to vector data are generated to reduce the difficulty of building virtual models in Unreal Engine.

[0034] In one application scenario, the spatial data conversion library is the open-source Geospatial Data Abstraction Library (GDAL) under the X / MIT license, which enables Unreal Engine to be compatible with remote sensing images with a raster structure in pixels.

[0035] S103: Generates virtual models corresponding to remote sensing images in Unreal Engine based on the positions of terrain, maps, planes, and solids in the coordinate system.

[0036] Specifically, the coordinates of terrain, map, plane, and solid in the Unreal Engine's coordinate system are determined. Virtual terrain, virtual map, virtual plane, and virtual solid are generated in Unreal Engine according to the coordinates corresponding to the terrain, map, plane, and solid. Virtual models corresponding to remote sensing images are generated in Unreal Engine.

[0037] In one application method, the coordinate system includes a geographic coordinate system, a projected coordinate system, and an engine global coordinate system. Based on the engine global coordinates of terrain, map, plane, and solid in the engine global coordinate system, virtual terrain, virtual map, virtual plane, and virtual solid are generated in Unreal Engine according to the engine global coordinates of terrain, map, plane, and solid, respectively. This constructs a virtual model corresponding to the remote sensing image in Unreal Engine, improving the realism of the virtual model.

[0038] In another application, the coordinate system includes a geographic coordinate system, a projected coordinate system, an engine global coordinate system, and engine local coordinates. Based on the engine global coordinates of terrain, maps, planes, and solids in the engine global coordinate system, and the engine local coordinates of the corresponding vertices of terrain, maps, planes, and solids in the engine local coordinate system, virtual terrain, virtual maps, virtual planes, and virtual solids are generated in Unreal Engine according to the engine global coordinates of terrain, maps, planes, and solids, respectively. This allows for the construction of virtual models corresponding to remote sensing images in Unreal Engine, improving the realism of the virtual models and the accuracy of positioning.

[0039] The above scheme constructs a coordinate system within Unreal Engine to accurately map the real world to the virtual world. It obtains DEM imagery, raster data, and vector data based on remote sensing images. The remote sensing images serve as the source data for constructing the virtual model. The DEM imagery is imported into Unreal Engine to obtain the corresponding terrain, the raster data is imported to obtain the corresponding map, and the vector data is imported to obtain the corresponding planes and solids. Based on the positions of the terrain, map, planes, and solids within the coordinate system, a virtual model corresponding to the remote sensing image is generated in Unreal Engine. Therefore, Unreal Engine is compatible with remote sensing images and can use them as source data for generating virtual models. Furthermore, the remote sensing images can serve as a reference for the virtual model in the real world, reducing the difficulty of constructing virtual models within Unreal Engine. In addition, the terrain, map, planes, and solids are all constructed in Unreal Engine based on remote sensing images, and their positions in the Unreal Engine's coordinate system correspond to their real-world positions, thereby improving the realism of the virtual model.

[0040] In some embodiments, please refer to Figure 2 , Figure 2 This is a flowchart illustrating one implementation method of constructing a coordinate system within the Unreal Engine, as described in this application. The process of constructing a coordinate system within the Unreal Engine specifically includes:

[0041] S201: Import geographic coordinate system and projected coordinate system into Unreal Engine, where the geographic coordinate system and projected coordinate system are related to the Global Positioning System.

[0042] Specifically, geographic coordinate system and projected coordinate system are imported into Unreal Engine. Both geographic coordinate system and projected coordinate system are related to the Global Positioning System. The geographic coordinate system is a spherical coordinate system that determines the location based on longitude, latitude and altitude. The projected coordinate system is a coordinate system that projects the sphere onto a cylinder based on the geographic coordinate system and unfolds it into a plane.

[0043] In one application approach, a spatial data transformation library is used to import the geographic coordinate system and the projected coordinate system into Unreal Engine, and the geographic coordinate system and the corresponding projected coordinate system are determined in Unreal Engine.

[0044] In another application, based on the planet types defined in Unreal Engine, the georeferencing plugin in Unreal Engine is used to import geographic coordinate systems and projected coordinate systems that match the planet type. The planet types include flat planets and circular planets. On flat planets, a plane approximation is used, and the model is built according to the projection mode. All coordinates are defined using transfer offsets in the projected coordinate system. On circular planets, when the origin is at the center of the planet, the geocentric coordinate system can be used for modeling. Alternatively, the origin can be set at any point on the planet's surface, and the model can be built using either geographic coordinate systems or projected coordinate systems.

[0045] In one application scenario, the geographic coordinate system includes the WGS84 coordinate system, and the projected coordinate system includes the Mercator projection coordinate system corresponding to the WGS84 coordinate system.

[0046] Specifically, the WGS84 coordinate system is a coordinate system established for use by the GPS global positioning system. The Mercator projection coordinate system is obtained by assuming a cylinder aligned with the Earth's axis, tangent to or intersecting the Earth, projecting the latitude and longitude grid onto the cylindrical surface under the condition of conformity, and then unfolding the cylindrical surface into a plane. The Universal Mercator projection divides the Earth's surface between 84 degrees North latitude and 80 degrees South latitude into north-south longitudinal zones of 6 degrees longitude, resulting in the Universal Mercator projection coordinate system. By setting the geographic coordinate system and the projected coordinate system as commonly used coordinate systems, the compatibility of coordinate systems in Unreal Engine is improved, and the difficulty of Unreal Engine matching positions with the real world is reduced.

[0047] S202: Create a geographic global object in Unreal Engine. Based on the position of the geographic global object in the geographic coordinate system, obtain the engine origin of Unreal Engine. Transform the engine origin from the geographic coordinate system to the projected coordinate system to obtain the origin coordinates of the engine origin.

[0048] Specifically, a geographic global object is created in Unreal Engine. The geographic global object is used to define the engine origin in Unreal Engine. The geographic coordinates of the geographic global object in the geographic coordinate system are transformed to the projected coordinate system to obtain the origin coordinates of the engine origin in the projected coordinate system.

[0049] In one application scenario, a geographic global object is created in Unreal Engine. This geographic global object is called AGeoActor. AGeoActor is used to define the engine origin in Unreal Engine and determine the geographic coordinates of the geographic global object in the geographic coordinate system. The geographic coordinates corresponding to the geographic global object are transformed to the projected coordinate system using a spatial data transformation library to obtain the projected coordinates of the geographic global object. The projected coordinates of the geographic global object are then used as the origin coordinates of the engine origin in the projected coordinate system.

[0050] S203: Establish the engine global coordinate system and the engine local coordinate system based on the origin coordinates. The engine global coordinate system takes the origin coordinates as its origin, while the engine local coordinate system takes the engine global coordinates of the object in the Unreal Engine in the engine global coordinate system as its origin.

[0051] Specifically, the origin coordinates are used as the origin of the engine global coordinate system to establish the engine global coordinate system. The engine global coordinates of the objects in the Unreal Engine are used as the origin to establish the corresponding engine local coordinate system of the objects. Thus, the engine global coordinate system is used to locate any object in the Unreal Engine, and the engine local coordinate system is used to locate the vertices of any object in the Unreal Engine.

[0052] In one application method, the origin coordinates are used as the origin of the engine global coordinate system to establish the engine global coordinate system, and the position of the current object in the engine global coordinate system is used as the origin to establish the engine local coordinate system corresponding to the current object.

[0053] In another application, the origin coordinates are used as the origin of the engine's global coordinate system to establish the engine's global coordinate system. The position of the vertex of a preset part on the current object in the engine's global coordinate system is specified as the origin to establish the engine's local coordinate system corresponding to the current object.

[0054] Specifically, the engine global coordinates of any object in the engine's global coordinate system are the position offset of the current object relative to the engine origin. Therefore, the engine global coordinates of any object in the engine's global coordinate system are offset values ​​from the origin coordinates, not offset values ​​from the geographic coordinate system. The closer an object in Unreal Engine is to the engine origin, the smaller the corresponding engine global coordinate value. When Unreal Engine includes multiple objects, at least some objects have smaller corresponding engine global coordinate values. This effectively reduces the processing burden of Unreal Engine and improves computational efficiency when calling the engine global coordinates of objects or performing calculations based on engine global coordinates. Vertices on any object can be located based on the engine local coordinate system. The engine local coordinate system is constructed with the engine global coordinates of the corresponding object in the engine's global coordinate system as the origin. Therefore, the corresponding values ​​of the engine local coordinates in the engine local coordinate system are smaller, which effectively reduces the processing burden of Unreal Engine and improves computational efficiency.

[0055] S204: Determine the transformation relationship between any two of the geographic coordinate system, projected coordinate system, engine global coordinate system, and engine local coordinate system to obtain the coordinate system within Unreal Engine.

[0056] Specifically, the geographic coordinate system has a transformation relationship between any two coordinate systems. The transformation relationship between any two coordinate systems among the geographic coordinate system, projected coordinate system, engine global coordinate system, and engine local coordinate system is determined to determine the final coordinate system.

[0057] Optionally, the engine origin and the transformation relationship between any two coordinate systems in the coordinate system can be bound to the geographic global object so that any object that inherits from the geographic global object can obtain the engine origin and the transformation relationship.

[0058] In one application approach, two coordinate systems are arbitrarily extracted from the coordinate system. Based on the construction method of each coordinate system in the coordinate system, the transformation relationship between any two coordinate systems in the coordinate system is determined. The engine origin and the transformation relationship between any two coordinate systems in the coordinate system are bound to the geographic global object so that any object that inherits from the geographic global object can obtain the engine origin and the transformation relationship.

[0059] In another application, the engine global coordinate system is used as the core of the coordinate system. The transformation relationships between the geographic coordinate system, the projected coordinate system, and the engine local coordinate system and the engine global coordinate system are determined. The transformation relationship between the geographic coordinate system and the projected coordinate system is determined using a spatial data transformation library. Based on the transformation relationship between the geographic coordinate system and the projected coordinate system, as well as the transformation relationships between the geographic coordinate system, the projected coordinate system, and the engine local coordinate system and the engine global coordinate system, the transformation relationship between the geographic coordinate system and the engine local coordinate system, and the transformation relationship between the projected coordinate system and the engine local coordinate system are determined.

[0060] In this embodiment, a coordinate system is constructed in Unreal Engine, including a geographic coordinate system, a projected coordinate system, an engine global coordinate system, and an engine local coordinate system. The geographic and projected coordinate systems are related to the Global Positioning System (GPS), reducing the difficulty of Unreal Engine matching locations with the real world. A geographic global object is created in Unreal Engine, and its coordinates in the projected coordinate system are used as the origin. Based on the origin coordinates, the engine global and engine local coordinate systems are established. The engine global coordinate system uses the origin coordinates as its origin, while the engine local coordinate system uses the engine global coordinates of the object in the engine global coordinate system as its origin. Thus, the engine global coordinate system is used to locate any object in Unreal Engine, and the engine local coordinate system is used to locate the vertices of any object in Unreal Engine. At least some objects have relatively small values ​​for their engine global coordinates, and the corresponding values ​​for their engine local coordinates are also relatively small. This effectively reduces the processing burden on Unreal Engine and improves computational efficiency. A transformation relationship between any two coordinate systems is determined so that the coordinates of any object in the coordinate system can be converted between each other, improving the convenience of coordinate transformation.

[0061] In some implementation scenarios, step S202 specifically includes: creating a geographic global object in Unreal Engine; wherein the geographic global object corresponds to geographic coordinates in the geographic coordinate system; taking the position corresponding to the geographic coordinates of the geographic global object in the geographic coordinate system as the engine origin of Unreal Engine; using a spatial data conversion library to convert the geographic coordinates of the engine origin from the geographic coordinate system to the projected coordinate system, and taking the projected coordinates of the engine origin in the projected coordinate system as the origin coordinates.

[0062] Specifically, a global geographic object is created in Unreal Engine to define the engine origin. This global geographic object corresponds to geographic coordinates in the geographic coordinate system. Based on these geographic coordinates, the position of the global geographic object in the geographic coordinate system is determined. This position is then used as the engine origin. A spatial transformation library is used to transform the geographic coordinates of the engine origin from the geographic coordinate system to the projected coordinate system, obtaining the projected coordinates of the engine origin. These projected coordinates are then used as the origin coordinates. In this process, the global geographic object is used to define the engine origin, and after determining the origin, its projected coordinates in the projected coordinate system are obtained as the origin coordinates, facilitating the construction of the global engine coordinate system.

[0063] Furthermore, the geographic coordinates of the engine origin are transformed from the geographic coordinate system to the projected coordinate system using a spatial data conversion library. After using the projected coordinates of the engine origin in the projected coordinate system as the origin coordinates, the process further includes: determining the geographic location attribute corresponding to the engine origin in the geographic coordinate system, and determining the engine position attribute corresponding to the engine origin in the projected coordinate system. The geographic location attribute includes the longitude, latitude, and altitude corresponding to the engine origin in the geographic coordinate system, and the engine position attribute includes the horizontal, vertical, and vertical coordinates that match the longitude, latitude, and altitude corresponding to the engine origin in the geographic coordinate system, respectively. The geographic location attribute and the engine position attribute are represented using floating-point numbers.

[0064] Specifically, the longitude, latitude, and altitude corresponding to the engine origin are determined in the geographic coordinate system to obtain the geographic location attribute of the engine origin. In the projected coordinate system, the horizontal coordinate that matches the longitude corresponding to the engine origin in the geographic coordinate system, the vertical coordinate that matches the latitude, and the vertical coordinate that matches the altitude are determined to obtain the engine position attribute of the engine origin. Both the geographic location attribute and the engine position attribute are represented using floating-point numbers to improve the accuracy of the geographic location attribute and the engine position attribute.

[0065] Furthermore, the geographic location attribute is defined as longitude, latitude, and altitude in floating-point type, representing the location of the geographic global object in the real world. The engine location attribute is defined as floating-point type horizontal, vertical, and vertical coordinates, representing the location of the geographic global object in the Unreal Engine.

[0066] In a specific application scenario, the geographic location attribute is defined as longitude, latitude and altitude in floating point type, which is represented by GeoCoordinate in Unreal Engine. The engine position attribute is defined as floating point type x, y and z coordinates, which correspond to X, Y and Z respectively, and is represented by EngineCoordinate in Unreal Engine.

[0067] In one application method, step S203 specifically includes: establishing an engine global coordinate system by taking the origin coordinates as the origin; establishing an engine local coordinate system corresponding to the object in the Unreal Engine by taking the global coordinates corresponding to the object in the engine global coordinate system as the origin; wherein, the engine global coordinates of the current object in the Unreal Engine in the engine global coordinate system include the offset value of the current object relative to the origin coordinates; the engine local coordinates of the vertices on the current object in the corresponding engine local coordinate system include the offset value of the vertices on the current object relative to the engine global coordinates of the current object.

[0068] Specifically, the origin coordinates are used as the origin of the coordinate system. An engine global coordinate system is established in Unreal Engine so that the engine global coordinate system can locate the position of any object in Unreal Engine. The engine global coordinates of the current object in Unreal Engine represent the offset value of the current object relative to the origin coordinates.

[0069] Furthermore, by using the global coordinates of the object in the Unreal Engine's global coordinate system as the origin, a local engine coordinate system corresponding to the object in the Unreal Engine is established. This allows the local engine coordinate system to locate the vertices of any object in the Unreal Engine. The local engine coordinates of the current object's vertices in the corresponding local engine coordinate system represent the offset of the current object's vertices relative to the current object's global engine coordinates.

[0070] Understandably, the closer an object in Unreal Engine is to the engine origin, the smaller its corresponding global coordinate value. When Unreal Engine includes multiple objects, at least some objects will have smaller global coordinate values. This effectively reduces the processing burden on Unreal Engine and improves computational efficiency when calling or calculating based on the global coordinates of an object. Vertices on any object can be located based on the local coordinate system, and the local coordinates represent the offset of a vertex on the current object relative to the current object's global coordinates. Therefore, the values ​​corresponding to the local coordinates in the local coordinate system are smaller, which effectively reduces the processing burden on Unreal Engine and improves computational efficiency when calling or calculating based on the local coordinates of an object.

[0071] In one application method, step S204 specifically includes: generating a transformation function between any two of the geographic coordinate system, projected coordinate system, engine global coordinate system, and engine local coordinate system; binding the geographic location attribute, engine location attribute, engine origin, and the transformation function between any two coordinate systems to the geographic global object to obtain the coordinate system related to the geographic global object within the Unreal Engine.

[0072] Specifically, a transformation function is generated between any two coordinate systems in the coordinate system. The geographic location attribute, engine location attribute, engine origin, and the corresponding transformation function between any two coordinate systems are bound to the geographic global object. This allows any other object that inherits from the geographic global object to obtain the geographic location attribute, engine location attribute, engine origin, and the corresponding transformation function between any two coordinate systems. This makes it easier for newly generated objects to obtain and utilize the corresponding location attributes and transformation functions.

[0073] Furthermore, generating transformation functions between any two of the geographic coordinate system, projected coordinate system, engine global coordinate system, and engine local coordinate system includes: taking any two of the geographic coordinate system, projected coordinate system, engine global coordinate system, and engine local coordinate system as the first coordinate system and the second coordinate system; determining the coordinate type and transformation type corresponding to the first coordinate system and the second coordinate system; and generating transformation functions between the first coordinate system and the second coordinate system based on the coordinate type and transformation type.

[0074] Specifically, two arbitrary coordinate systems are extracted from the geographic coordinate system as the first coordinate system and the second coordinate system, respectively. The coordinate types corresponding to the first and second coordinate systems are determined, as well as the transformation type between the first and second coordinate systems. The geographic coordinate system, the projected coordinate system, the engine global coordinate system, and the engine local coordinate system each have their own coordinate types, which are distinct from each other. The transformation type includes positive and negative values. When the transformation type is positive, it indicates a transformation from the first coordinate system to the second coordinate system. When the transformation type is negative, it indicates a transformation from the second coordinate system to the first coordinate system. Based on the coordinate types and transformation types, a transformation function between the first and second coordinate systems is generated to obtain the final determined coordinate system, so that the coordinate system includes the transformation function between any two coordinate systems.

[0075] Furthermore, when using a coordinate system, the conversion between coordinate systems can be achieved by calling the conversion function, thereby improving the conversion efficiency between any two coordinate systems.

[0076] In a specific application scenario, the first transformation function corresponds to the geographic coordinate system and the projected coordinate system. This function calls a spatial data transformation library to achieve the conversion between the geographic coordinate system and the projected coordinate system. The second transformation function corresponds to the projected coordinate system and the engine global coordinate system. This function calls the origin coordinates, subtracts the origin coordinates from the projected coordinates in the projected coordinate system to obtain the engine global coordinates in the engine global coordinate system, and adds the origin coordinates to the engine global coordinates to obtain the projected coordinates in the projected coordinate system. The third transformation function corresponds to the engine global coordinate system and the engine local coordinate system. This function calls the engine global coordinates of the current object in the engine global coordinate system, subtracts the engine global coordinates of the current object from the engine global coordinates of the current object, and obtains the engine global coordinates of the vertices of the current object in the engine global coordinate system. The engine local coordinates are obtained by adding the engine local coordinates of the vertices on the current object to the corresponding engine global coordinates. The fourth transformation function is used to convert between the engine global coordinate system and the geographic coordinate system. This function calls the first and second transformation functions to achieve the conversion between the engine global coordinate system and the geographic coordinate system. The fifth transformation function is used to convert between the engine local coordinate system and the projected coordinate system. This function calls the second and third transformation functions to achieve the conversion between the engine local coordinate system and the projected coordinate system. The sixth transformation function is used to convert between the engine local coordinate system and the geographic coordinate system. This function calls the first, second, and third transformation functions to achieve the conversion between the engine local coordinate system and the geographic coordinate system.

[0077] Specifically, the first conversion function is defined as bool Geo_Projection_convert(FVector Point, bool Geo2Pro), and the conversion between geographic coordinates and projected coordinates is implemented by the GDAL library.

[0078] Furthermore, the units and orders of magnitude of the engine global coordinates and projected coordinates are consistent. The engine global coordinates are the difference between the projected coordinates of the current point and the engine origin. The second conversion function is defined as bool Projection_EngineGlobal_convert(FVector Point, bool Pro2Engine). The implementation steps of the second conversion function are as follows: First, the projected coordinates of the engine origin AGeoAactor are calculated using the Geo_Projection_convert function. Then, the conversion of the projected coordinates to the engine global coordinates is achieved by subtracting the difference between the projected coordinates and the projected coordinates of AGeoAactor. The conversion of the engine global coordinates to the projected coordinates is achieved by adding the engine global coordinates to the projected coordinates of AGeoAactor.

[0079] Furthermore, engine global coordinates are actually the position of the current object in the engine, while engine local coordinates are used to define the vertex coordinates of the static mesh of the current object. Engine local coordinates are the difference between the current vertex and the position coordinates of the current object in the engine. The third conversion function is defined as bool EngineGlobal_Local_convert(FVectorPoint, bool Global2Local). The conversion from engine global coordinates to engine local coordinates is achieved by subtracting the difference between the current point's coordinates and the engine global coordinates. The conversion from engine local coordinates to engine global coordinates is achieved by adding the current point's coordinates to the sum of the engine global coordinates.

[0080] Furthermore, the fourth transformation function between the engine global coordinate system and the geographic coordinate system is defined as boolGeo_EngineGlobal_convert(FVector Point, bool Geo2Engine). The specific steps for converting geographic coordinates to engine global coordinates are as follows: first, the first transformation function is called to convert geographic coordinates to projected coordinates, and then the second transformation function is called to convert projected coordinates to engine global coordinates. The steps for converting engine global coordinates to geographic coordinates are the reverse.

[0081] Furthermore, the fifth transformation function between the engine local coordinate system and the projected coordinate system is defined as boolPro_EngineLocal_convert(FVector Point, bool Pro2Engine). The specific steps for converting projected coordinates to engine local coordinates are as follows: first, the second transformation function is called to convert the projected coordinates to engine global coordinates, and then the third transformation function is called to convert the engine global coordinates to engine local coordinates. The steps for converting engine local coordinates to projected coordinates are the reverse.

[0082] Furthermore, the sixth transformation function between the engine local coordinate system and the geographic coordinate system is defined as boolGeo_EngineLocal_convert(FVector Point, bool Geo2Engine). The steps for converting geographic coordinates to engine local coordinates are as follows: first, the first transformation function is called to convert geographic coordinates to projected coordinates; then, the second transformation function is called to convert projected coordinates to engine global coordinates; and finally, the third transformation function is called to convert engine global coordinates to engine local coordinates. The steps for converting engine local coordinates to geographic coordinates are the reverse.

[0083] It's important to note that in each transformation function, `Point` represents the coordinates of the point to be transformed, `FVetcor` indicates the coordinate type (longitude, latitude, and altitude for geographic coordinates, X, Y, and Z for projected coordinates, engine global coordinates, or engine local coordinates), and `Geo2Pro` indicates the coordinate transformation type, which has two options: `true` (transformation from the first coordinate system to the second) and `false` (transformation from the second coordinate system to the first). These six transformation functions allow for conversion between any two coordinate systems. When conversion between two coordinate systems is required, simply call the corresponding transformation function to improve efficiency.

[0084] It should be noted that once the coordinate system is constructed, Unreal Engine has a corresponding coordinate system and engine origin. The coordinate system includes the geographic coordinate system, the projected coordinate system, and the engine global coordinate system. Among them, the geographic coordinate system and the projected coordinate system are related to the Global Positioning System (GPS). The engine global coordinate system is used to locate any object in Unreal Engine. The engine origin has origin coordinates in the projected coordinate system. The engine global coordinates in the engine global coordinate system are obtained by subtracting the origin coordinates from the projected coordinates in the projected coordinate system.

[0085] In some embodiments, please refer to Figure 3 , Figure 3 This is a flowchart illustrating one implementation of the terrain construction method based on Unreal Engine according to this application. The process includes obtaining a DEM image based on remote sensing images, importing the DEM image into Unreal Engine, and generating terrain corresponding to the DEM image within Unreal Engine. Specifically, it includes:

[0086] S301: Obtain the DEM image based on the remote sensing image and determine the image size of the DEM image.

[0087] Specifically, a Digital Elevation Model (DEM) is obtained by extracting data from remote sensing images using algorithms. DEM images are then derived from the DEM images, and the image size of the DEM images is determined.

[0088] In one application method, the DEM image corresponding to the remote sensing image is extracted using a spatial data conversion library to obtain the data size of the DEM image. Based on the data size of the DEM image and the unit length of Unreal Engine, the DEM image is interpolated to obtain the image size corresponding to the DEM image.

[0089] In another application, a spatial data conversion library is used to read the digital elevation model to obtain the DEM image and its corresponding data dimensions. The data dimensions are then used to calculate the data range of the DEM image. Based on the data range of the DEM image, the DEM image is interpolated to obtain its corresponding image dimensions, so that the image dimensions of the DEM image match the unit length of Unreal Engine.

[0090] S302: Based on the image size and the image size threshold in Unreal Engine, divide the DEM image into at least one image block and determine the image sub-size of each image block.

[0091] Specifically, in Unreal Engine, each terrain object has an image size threshold, which limits the size range of the constructed terrain. When constructing terrain across regions or when the original size of the terrain is large, the actual size in the DEM image will be large. Thus, the image size of the DEM image is large and exceeds the image size threshold, making it difficult to construct terrain in Unreal Engine that matches the actual size.

[0092] Furthermore, when the image size is less than or equal to the image size threshold, the DEM image is divided into one image block based on the image size and the image size threshold in Unreal Engine. When the image size is greater than the image size threshold, the DEM image needs to be segmented. Based on the image size and the image size threshold in Unreal Engine, the DEM image is divided into multiple image blocks, and the image sub-size of each image block is determined.

[0093] In one application method, the DEM image has an image length and an image width, and the image size threshold has an upper limit on the area. Based on the ratio of the product of the image length and the image width to the image size threshold, the number of image blocks into which the DEM image is divided is determined and the image sub-size of each image block is obtained.

[0094] In another application, the DEM image corresponds to a pixel size, and the image size threshold corresponds to a pixel size upper limit. The ratio of the pixel size of the DEM image to the pixel size upper limit determines the number of image blocks into which the DEM image is divided and obtains the image sub-size of each image block.

[0095] S303: For each image block, based on the image sub-size corresponding to the image block, generate the terrain size, terrain height and terrain coordinates corresponding to the image block, and generate a terrain object that matches the terrain size and terrain height at the terrain coordinates in Unreal Engine.

[0096] Specifically, the terrain size corresponding to the terrain object is determined based on the image sub-size corresponding to the image block, and the terrain height and terrain coordinates corresponding to the terrain object are obtained based on the height information and position information corresponding to the image block, respectively.

[0097] Furthermore, in Unreal Engine, the terrain size of a terrain object is based on segmented pixel size, segment and component definition. Each terrain object includes multiple components, each component has a corresponding component pixel size, and the component pixel size is related to the number of segments in the component and the segment pixel size. Components use a uniform component pixel size.

[0098] In one application method, the image block corresponds to height information and position information, the component corresponds to the maximum number of segments and each segment adopts the maximum segment pixel size, the number of components in the terrain object is determined based on the image sub-size of the image block and the component pixel size, the terrain size corresponding to the terrain object is obtained based on the number of components in the terrain object, and the terrain height and terrain coordinates corresponding to the terrain object are obtained based on the height information and position information corresponding to the image block.

[0099] In another application, the image block corresponds to height and position information, the component corresponds to the maximum number of segments and each segment adopts a specified segment pixel size. Based on the image sub-size of the image block and the pixel size of the component, the number of components in the terrain object is determined. Based on the number of components in the terrain object, the terrain size corresponding to the terrain object is obtained. Based on the height and position information corresponding to the image block, the terrain height and terrain coordinates corresponding to the terrain object are obtained respectively.

[0100] S304: A terrain object generated based on all image tiles, which generates terrain corresponding to the DEM image in Unreal Engine.

[0101] Specifically, the location corresponding to the terrain coordinates is determined in Unreal Engine, and a terrain object matching the terrain size and height is generated at the terrain coordinates so that the terrain object corresponds to the location in the real world. This process continues until all the terrain objects corresponding to the image blocks are traversed, and the terrain corresponding to the DEM image is generated in Unreal Engine.

[0102] In this embodiment, a DEM image based on remote sensing images is obtained, the image size of the DEM image is determined, and the DEM image is segmented based on the image size and the image size threshold of Unreal Engine to obtain at least one image block. For each image block, based on the image sub-size corresponding to the image block, a terrain size, terrain height, and terrain coordinates corresponding to the image block are generated. A terrain object matching the terrain size and terrain height is generated at the terrain coordinates so that the terrain object corresponds to the position in the real world. This process continues until all terrain objects corresponding to all image blocks are traversed, and the terrain corresponding to the DEM image is generated in Unreal Engine. After the DEM image is divided into at least one image block, terrain of any size can be generated in Unreal Engine, increasing the degree of freedom in generating terrain in Unreal Engine.

[0103] In some implementation scenarios, step S301 specifically includes: using a spatial data conversion library to read the DEM image corresponding to the remote sensing image, obtaining the DEM image and its corresponding data size and affine matrix, and determining the spatial resolution of the DEM image based on the affine matrix; determining the data range of the DEM image based on the data size and spatial resolution of the DEM image; and interpolating the pixels in the DEM image based on the data range and the unit length of Unreal Engine to obtain a DEM image whose image size matches the unit length of Unreal Engine.

[0104] Specifically, the DEM image corresponding to the remote sensing image is read using a spatial data conversion library to obtain the DEM image, its corresponding data size, and affine matrix. The spatial resolution of the DEM image is determined from the affine matrix. Based on the product of the spatial resolution and data size stored in the affine matrix, the data range of the DEM image is obtained. Based on the data range of the DEM image and the unit length of Unreal Engine, the pixels in the DEM image are interpolated to obtain a DEM image whose image size matches the unit length of Unreal Engine. The image length and image width of the interpolated DEM image are used as the image size of the DEM image, which facilitates Unreal Engine's compatibility with DEM images and the construction of terrain using DEM images. Here, the spatial resolution includes the pixel size of the DEM image, and the data size includes the length corresponding to a single pixel.

[0105] In a specific application scenario, GDAL is used to read DEM images to obtain the data stored in the DEM images, the maximum and minimum values ​​of the data, the data size, the data format, the affine matrix, and the coordinate system information. The data size is the length corresponding to a single pixel in meters. Based on the spatial resolution value stored in the affine matrix and the data size, the data range of the DEM image is calculated, i.e., the length and width of the DEM image, both in meters. The DEM image is interpolated based on the data range and the unit length of Unreal Engine to match the image size of the DEM image with the unit length of Unreal Engine, thus obtaining the image size of the DEM image. The image size of the DEM image is stored as a 16-bit unsigned integer, where the unit length of Unreal Engine is one meter. In other application scenarios, the unit length of Unreal Engine can also be other values, and this application does not impose specific restrictions on this.

[0106] In some implementation scenarios, step S302 specifically includes: calculating the ratio of the image length and image width corresponding to the image size to the image size threshold of Unreal Engine and rounding it up to obtain the horizontal and vertical number of image blocks; determining the number of image blocks corresponding to the DEM image as a first value based on the product of the horizontal and vertical number of image blocks; determining the horizontal pixel count and vertical pixel count of each image block based on the ratio of the image size to the horizontal and vertical number of image blocks; wherein, the image sub-size of each image block includes the horizontal pixel count and vertical pixel count of each image block.

[0107] Specifically, a DEM image corresponds to an image length and an image width. The ratio of the image length to the image size threshold and rounded up is used to obtain the horizontal number of image blocks. The ratio of the image width to the image size threshold and rounded up is used to obtain the vertical number of image blocks. The horizontal number and the vertical number are multiplied to obtain a first value, which determines the number of image blocks corresponding to the DEM image. This first value allows the DEM image to be divided into multiple image blocks, thus enabling the construction of terrains of arbitrary sizes in Unreal Engine.

[0108] Furthermore, the image length corresponding to the DEM image is divided by the horizontal number to obtain the horizontal pixel count of the image block, and the image width corresponding to the DEM image is divided by the vertical number to obtain the vertical pixel count of the terrain object. The image sub-size of the image block is determined based on the horizontal and vertical pixel counts.

[0109] In a specific application scenario, the image size threshold is determined based on the maximum segment pixel size, maximum number of segments, and maximum number of components in Unreal Engine. The image length and width corresponding to the DEM image are divided by the image size threshold to obtain the horizontal number of image blocks corresponding to the segmented DEM image, denoted as num_landscape_x, and the vertical number of image blocks corresponding to the segmented image, denoted as num_landscape_y. The product of num_landscape_x and num_landscape_y is calculated to obtain the total number of terrain objects to be created, ensuring that a DEM image of any size can be segmented into at least one image block. The number of terrain objects to be created corresponding to the DEM image is recorded as the first value, enabling the construction of terrain of arbitrary size in Unreal Engine, thus overcoming the size limitations of terrain construction in Unreal Engine.

[0110] Furthermore, the image length corresponding to the DEM image is divided by the horizontal quantity num_landscape_x and rounded up to obtain the horizontal pixel quantity pixels_per_landscape_x corresponding to the image block. The image width corresponding to the DEM image is divided by the vertical quantity num_landscape_y and rounded up to obtain the vertical pixel quantity pixels_per_landscape_y corresponding to the image block.

[0111] In some implementation scenarios, the terrain size of a terrain object is based on the segmented pixel size, segment and component definition. Each terrain object includes multiple components, each component has a corresponding component pixel size, and the component pixel size is related to the number of segments in the component and the segment pixel size.

[0112] Furthermore, based on the image sub-size corresponding to the image patch, a terrain size, terrain height, and terrain coordinates corresponding to the image patch are generated. At the terrain coordinates in Unreal Engine, a terrain object matching the terrain size and terrain height is generated, including: determining the number of components in the terrain object based on the ratio of the image sub-size corresponding to the current image patch to the component pixel size; obtaining the terrain size corresponding to the terrain object based on the number of components in the terrain object; generating the terrain height corresponding to the terrain object within the range of the terrain size corresponding to the terrain object based on the height information in the current image patch; and determining the terrain coordinates corresponding to the terrain object in Unreal Engine based on the position information in the current image patch.

[0113] Specifically, the total number of pixels allocated to a single terrain object is determined based on the image sub-size corresponding to the image patch. The number of components in the terrain object corresponding to the image patch is determined based on the ratio of the total number of pixels allocated to a single image patch to the component pixel size. The terrain size corresponding to the terrain object is obtained by multiplying the number of components in the terrain object by the component pixel size. The height information in the image patch is imported into the terrain object. The terrain height corresponding to the terrain object is generated within the range of the terrain size corresponding to the terrain object. The terrain coordinates corresponding to the terrain object are determined in Unreal Engine using the position information in the image patch. Thus, the position and height information corresponding to the image patch can be imported into the terrain object in Unreal Engine. The terrain size corresponding to a single terrain object can accommodate the total number of pixels allocated to a single terrain object, so that after traversing all terrain objects, terrain of any size can be generated in Unreal Engine.

[0114] In one application scenario, each component corresponds to a preset number of segments, each segment corresponds to a preset pixel size, and the component pixel size is determined based on the product of the preset number and the preset pixel size.

[0115] Furthermore, based on the ratio of the image sub-size corresponding to the current image patch to the component pixel size, the number of components in the terrain object is determined. Based on the number of components in the terrain object, the terrain size corresponding to the terrain object is obtained, including: based on the ratio of the horizontal pixel count and the vertical pixel count to the component pixel size, determining the second value corresponding to the horizontal component of the terrain object and the third value corresponding to the vertical component; wherein the second value and the third value are the results after rounding up; based on the component pixel size, the second value, and the third value, determining the horizontal pixel size of the terrain object in the horizontal direction and the vertical pixel size in the vertical direction, and determining the terrain size corresponding to the terrain object.

[0116] Specifically, the number of horizontal pixels and the number of vertical pixels are divided by the component pixel size and rounded up to determine the second value corresponding to the component in the horizontal direction and the third value corresponding to the component in the vertical direction of the terrain object. This ensures that the terrain object can include enough components in both the horizontal and vertical directions to accommodate the number of horizontal pixels and the number of vertical pixels corresponding to the terrain object.

[0117] Furthermore, based on the product of the component pixel size with the second and third values ​​respectively, the horizontal pixel size of the terrain object in the horizontal direction and the vertical pixel size of the terrain object in the vertical direction are determined, and finally the terrain size corresponding to the terrain object is obtained, ensuring the accuracy of the terrain size.

[0118] In a specific application scenario, the preset pixel size QuadsPerSection for each segment is 255, and the preset number of segments SectionsPerComponent within each component is 2. Therefore, the component pixel size QuadsPerComponent is 510. The method for calculating the second value ComponentCountX and the third value ComponentCountY is as follows:

[0119] ComponentCountX=FMath::CeilToInt(float(pixels_per_landscape_x-1) / QuadsPerComponent);

[0120] ComponentCountY=FMath::CeilToInt(float(pixels_per_landscape_y-1) / QuadsPerComponent);

[0121] Furthermore, the method for calculating the horizontal pixel size FinalSizeX of the terrain object and the vertical pixel size FinalSizeY of the terrain object is as follows:

[0122] FinalSizeX=ComponentCountX*QuadsPerComponent+1;

[0123] FinalSizeY=ComponentCountY*QuadsPerComponent+1;

[0124] It should be noted that the preset pixel size QuadsPerSection and the preset number of segments SectionsPerComponent within each component can be customized based on the threshold limitations of Unreal Engine in other specific application scenarios. This application does not impose specific restrictions on them.

[0125] Further, please refer to Figure 4 , Figure 4This is a schematic diagram illustrating an application scenario of one embodiment of the terrain construction method based on Unreal Engine according to this application. Assume the DEM image is divided into four image blocks, each corresponding to a terrain object, with two objects in the horizontal and two in the vertical directions. Based on the component pixel size, a second value, and a third value, the horizontal pixel size of the terrain object in the horizontal direction and the vertical pixel size in the vertical direction are determined. After determining the terrain size corresponding to the terrain object, the method further includes: based on the horizontal pixel size, vertical pixel size, image size, and a first value, determining the horizontal offset coordinates corresponding to the horizontal pixel size and the vertical offset coordinates corresponding to the vertical pixel size; interpolating between the edge of the terrain object corresponding to the horizontal offset coordinate and the horizontal offset coordinate, and interpolating between the edge of the terrain object corresponding to the vertical offset coordinate and the vertical offset coordinate to obtain an interpolation result; based on the interpolation result, the component pixel size, the second value corresponding to the component in the horizontal direction, and the third value corresponding to the component in the vertical direction, generating the terrain of the terrain object in Unreal Engine.

[0126] Specifically, since the number of terrain objects and their corresponding components are both rounded up, and each parameter is a power of 2 or a power of 2 minus one, the sum of multiple terrain objects may not match the image size. When the image size is smaller than the sum of multiple terrain objects, the actual location corresponding to the image size is determined based on the image length corresponding to the image size, the horizontal pixel size corresponding to the terrain object, and the horizontal quantity corresponding to the first value. Figure 4 The shadow position in the image is determined by the difference between the horizontal pixel size of the terrain object and its actual position, which in turn determines the horizontal offset coordinates corresponding to the horizontal pixel size. Figure 4 The position of the black dot on the horizontal axis is calculated as follows:

[0127] bias_x_first=FinalSizeX-FMath::CeilToInt(float(DemL-FinalSizeX*(num_landscape_x-2)) / 2);

[0128] bias_x_last=DemL-FinalSizeX*(num_landscape_x-2)-(FinalSizeX-bias_x_first);

[0129] Based on the image width corresponding to the image size, the vertical pixel size corresponding to the terrain object, and the vertical quantity corresponding to the first value, the actual location corresponding to the image size is determined, that is... Figure 4 The shadow position in the image is determined by the difference between the vertical pixel size of the terrain object and its actual position, which in turn determines the vertical offset coordinates corresponding to the vertical pixel size. Figure 4 The position of the black dot along the vertical axis, and the calculation method for this vertical offset coordinate are as follows:

[0130] bias_y_first=FinalSizeY-FMath::CeilToInt(float(DemW-FinalSizeY*(num_landscape_y-2)) / 2);

[0131] bias_y_last=DemW-FinalSizeY*(num_landscape_y-2)-(FinalSizeY-bias_y_first);

[0132] Among them, the horizontal pixel size is FinalSizeX, the vertical pixel size is FinalSizeY, the image length corresponding to the image size is DemL, and the image width is DemW. The first value corresponds to the horizontal quantity num_landscape_x and the vertical quantity num_landscape_y.

[0133] Furthermore, interpolation is performed between the edge of the terrain object corresponding to the lateral offset coordinate and the lateral offset coordinate, that is, in Figure 4 The horizontal offset coordinate is moved to the edge of the dashed line, i.e. Figure 4 The white area on the horizontal axis is interpolated between the edge of the terrain object corresponding to the vertical offset coordinate and the vertical offset coordinate. Figure 4 The vertical offset coordinate is moved to the edge of the dashed line, i.e. Figure 4 The white area in the middle vertical direction yields the interpolation results, ensuring that each terrain object has corresponding data. The interpolation process uses zero padding for interpolation.

[0134] Furthermore, based on the interpolation results, component pixel size, and the second value corresponding to the component in the horizontal direction and the third value corresponding to the component in the vertical direction, the terrain corresponding to the terrain object is generated in Unreal Engine.

[0135] Furthermore, based on the height information in the current image block, the terrain height corresponding to the terrain object is generated within the range of the terrain size corresponding to the terrain object, including: setting a preset height between the edge of the terrain object corresponding to the horizontal offset coordinate and the horizontal offset coordinate, and setting a preset height between the edge of the terrain object corresponding to the vertical offset coordinate and the vertical offset coordinate; indexing the height information in the current image block to the area enclosed by the horizontal offset coordinate and the vertical offset coordinate, and generating the terrain height corresponding to the terrain object within the range of the terrain size corresponding to the terrain object.

[0136] Specifically, interpolation is performed between the edge of the terrain object corresponding to the lateral offset coordinate and the lateral offset coordinate, that is, in Figure 4 The horizontal offset coordinate is moved to the edge of the dashed line, i.e. Figure 4 The white area on the horizontal axis is interpolated between the edge of the terrain object corresponding to the vertical offset coordinate and the vertical offset coordinate. Figure 4 The vertical offset coordinate is moved to the edge of the dashed line, i.e. Figure 4 The white areas along the vertical axis are all set to a preset height, indexing the height information in the image block to the area enclosed by the horizontal and vertical offset coordinates. Figure 4 The area corresponding to the shaded part is used to make the height in the terrain object correspond to the height information of the image block.

[0137] In a specific application scenario, a data matrix storing height data is generated. ix and iy represent the horizontal and vertical numbers of the terrain objects, respectively, and both increment from 0. In terrain objects where ix = 0, 0 is assigned to the left of bias_x_first; in terrain objects where ix = num_landscape_x - 1, 0 is assigned to the right of bias_x_last; in terrain objects where iy = 0, 0 is assigned above bias_y_first; and in terrain objects where iy = num_landscape_y - 1, 0 is assigned below bias_y_last. The values ​​for the remaining areas are copied from the height information of the image block through an index relationship. The index relationship includes a height index and a data index. The height index index_height includes: index_height = col * FinalSizeX + row; the data index index_dem includes: index_dem = 2 * ((iy * FinalSizeY + col - bias_y_first) * DemL + ix * FinalSizeX + row - bias_x_first); where col is the Y-direction index and row is the X-direction index.

[0138] Furthermore, based on the location information in the current image patch, the terrain coordinates corresponding to the terrain object are determined in Unreal Engine, including: determining the geographic coordinates of the current image patch in the geographic coordinate system based on the location information in the current image patch; using a spatial data transformation library to transform the geographic coordinates corresponding to the current image patch to the projected coordinate system to obtain the projected coordinates of the current image patch in the projected coordinate system; determining the terrain projected coordinates of the terrain object in the projected coordinate system based on the projected coordinates and terrain size of the current image patch; and transforming the terrain projected coordinates to the engine global coordinate system to obtain the engine global coordinates of the terrain object in the engine global coordinate system.

[0139] Specifically, based on the location information within the image patch, the geographic coordinates of the image patch in the geographic coordinate system are determined. Then, using a spatial data transformation library, the geographic coordinates corresponding to the image patch are transformed from the geographic coordinate system to the projected coordinate system, obtaining the projected coordinates of the image patch in the projected coordinate system. Since the terrain dimensions corresponding to the terrain object are over-interpolated at the edges, based on the projected coordinates of the image patch and the terrain dimensions, the terrain projection coordinates of the terrain object in the projected coordinate system are determined, which is to determine... Figure 4 The dashed bounding box corresponding to each terrain object in the projection coordinate system is used to obtain the terrain projection coordinates in the projection coordinate system, thereby improving the accuracy of the projection coordinates of the terrain object. The terrain projection coordinates are then transformed into the engine global coordinate system to obtain the engine global coordinates of the terrain object in the engine global coordinate system, thus improving the accuracy of the engine global coordinates of the terrain object.

[0140] In a specific application scenario, the engine global coordinates corresponding to the terrain object are obtained by subtracting the origin coordinates corresponding to the engine origin from the projected coordinates corresponding to the top left corner of the interpolated terrain object. Here, ix and iy represent the horizontal and vertical numbers of the terrain object, and both increase from 0. For terrain objects with ix>0, the x-coordinate value is reduced by 1, and for terrain objects with iy>0, the y-coordinate value is reduced by 1, so that the coordinate values ​​match the above-mentioned terrain size calculation method.

[0141] Optionally, before dividing the DEM image into at least one image block based on the image size and the image size threshold in Unreal Engine, and determining the image sub-size of each image block, the method further includes: obtaining the coordinate setting attribute corresponding to the engine origin; when the coordinate setting attribute corresponds to an allowed setting, resetting the engine origin of the coordinate system based on the position information in the DEM image; wherein, the coordinate setting attribute includes allowed settings and prohibited settings.

[0142] Specifically, the coordinate setting attribute of the engine origin is determined. If setting is allowed, the engine origin of the coordinate system is reset based on the location information in the DEM image, and the coordinate setting attribute is set to disabled after the reset. If setting is disabled, the existing engine origin is used. Furthermore, when setting is allowed, the data center of the DEM image can be preferentially used as the new engine origin, thereby effectively reducing the value of the engine's global coordinates for the terrain objects corresponding to the DEM image, effectively reducing the processing burden of Unreal Engine and improving computational efficiency.

[0143] In a specific application scenario, location information includes coordinate system information and data center in DEM imagery. The data center is converted from coordinate system information in DEM imagery to latitude and longitude values ​​in geographic coordinate system, assigned geographic location attributes in geographic global object, and the engine origin is reset.

[0144] In some implementation scenarios, after generating terrain objects that match the terrain size and height, the process also includes: using the terrain material tool in Unreal Engine to set a material for the terrain corresponding to the DEM image that matches the terrain slope.

[0145] Specifically, the AutoLandscap terrain material tool is used in Unreal Engine to generate terrain materials. The terrain material tool automatically sets different materials according to the slope of the terrain, thereby improving the realism of the terrain.

[0146] In some embodiments, please refer to Figure 5 , Figure 5 This is a flowchart illustrating one implementation of the map construction method based on Unreal Engine according to this application. The process includes obtaining raster data based on remote sensing images, importing the raster data into Unreal Engine, and generating a map corresponding to the raster data within Unreal Engine. Specifically, it includes:

[0147] S501: Obtain raster data based on remote sensing images, and convert the raster data into a raster data matrix, wherein the size of the raster data matrix is ​​related to the size of the raster data.

[0148] Specifically, remote sensing images are raster structures with pixels as the unit. Raster data can be obtained based on remote sensing images. Based on the data size of the raster data, the raster data is converted into a raster data matrix. The size of the raster matrix is ​​related to the data size of the raster data, so that Unreal Engine can be compatible with remote sensing images and convert remote sensing images into maps with scale in Unreal Engine.

[0149] In one application, image information from remote sensing images is extracted using a spatial data conversion library to obtain raster data. The data size corresponding to the raster data is then obtained. Based on the data size of the raster data and the unit length of Unreal Engine, the raster data is interpolated to obtain a raster data matrix.

[0150] In another application, a spatial data conversion library is used to read remote sensing images to obtain raster data and the corresponding data size. The data range of the raster data is calculated using the data size. Based on the data range of the raster data, the raster data is interpolated to obtain a raster data matrix, so that the raster matrix size of the raster data matrix matches the unit length of Unreal Engine.

[0151] S502: Generate a map grid volume corresponding to the raster data based on the raster matrix size of the raster data matrix.

[0152] Specifically, a grid volume that matches the size of the raster matrix of the raster data matrix is ​​created, and a map grid volume corresponding to the raster data is generated in Unreal Engine.

[0153] In one application approach, the raster matrix size includes matrix length and matrix width. A mesh volume matching the matrix length and matrix width of the raster data matrix is ​​generated. The mesh vertices, triangular mesh indices, texture coordinates, and normals of the mesh volume are determined. Procedural modeling functions are used to model based on the mesh vertices, triangular mesh indices, texture coordinates, and normals corresponding to the mesh volume, generating a map mesh volume corresponding to the raster data in Unreal Engine.

[0154] In another application, a map object is created in Unreal Engine. The map object includes a grid property, and the grid matrix size includes the matrix length and matrix width. A grid volume matching the matrix length and matrix width of the grid data matrix is ​​generated. The grid vertices, triangular mesh indices, texture coordinates, and normals of the grid volume are determined. The grid vertices, triangular mesh indices, texture coordinates, and normals of the grid volume are stored in the grid property. In Unreal Engine, the grid property is called using procedural modeling functions to generate a map grid volume corresponding to the grid data.

[0155] In one application scenario, a rectangular mesh with the same length and width as the raster data matrix is ​​generated in Unreal Engine. Based on the coordinate information corresponding to the raster data, the mesh vertices of the rectangular mesh are located in Unreal Engine. Triangulation is performed on the rectangular mesh to obtain triangular mesh indices. The texture coordinates and normals corresponding to the mesh vertices are determined based on their positions. In other application scenarios, the raster data matrix can also be scaled.

[0156] S503: Converts raster data into textures of map grids, generating a map corresponding to the raster data in Unreal Engine.

[0157] Specifically, raster data is converted into textures of map grids, making remote sensing images texture assets for map grids. This allows the generation of maps corresponding to the raster data in Unreal Engine, enabling remote sensing images to function as both a map showing the entire region and a benchmark and reference for modeling within Unreal Engine, thus improving the accuracy of modeling in Unreal Engine.

[0158] In one application, a texture corresponding to a map grid is generated in Unreal Engine based on the data features of the raster data. This texture is then applied to the map grid to generate a map corresponding to the raster data. The data features are related to the remote sensing image corresponding to the raster data.

[0159] In another application, a texture pointer variable is created in Unreal Engine, and the data features corresponding to the raster data are stored in the texture pointer variable so that the raster data is converted into the texture of the map grid and a map corresponding to the raster data is generated. The data features are related to the remote sensing image corresponding to the raster data.

[0160] Optionally, when the image size corresponding to the remote sensing image exceeds the maximum pixel size of Unreal Engine, the remote sensing image is reduced to a size less than or equal to the maximum pixel size of Unreal Engine, thereby converting the raster data corresponding to the reduced remote sensing image into the texture of the map grid.

[0161] In this embodiment, raster data based on remote sensing images is obtained, and the raster data is converted into a raster data matrix. The size of the raster matrix is ​​related to the size of the raster data to match the size of the raster matrix. Based on the size of the raster matrix, a map grid corresponding to the raster data is generated. The raster data is converted into a texture of the map grid. A map corresponding to the raster data is generated in Unreal Engine. This allows the remote sensing image to serve as both a map in Unreal Engine, displaying the overall view of the entire region, and a benchmark and reference for modeling within Unreal Engine, thereby improving the accuracy of modeling in Unreal Engine.

[0162] In some implementation scenarios, step S501 specifically includes: reading remote sensing images using a spatial data conversion library to obtain raster data and its corresponding data size, affine matrix, and coordinate information; determining the spatial resolution of the raster data based on the affine matrix; determining the data range of the raster data based on the data size, spatial resolution, and coordinate information; interpolating the raster data based on the data range and the unit length of Unreal Engine to obtain the raster data matrix corresponding to the raster data; wherein the raster matrix size of the raster data matrix matches the unit length of Unreal Engine.

[0163] Specifically, the remote sensing image is read using a spatial data conversion library. Raster data, its corresponding data size, affine matrix, and coordinate information are obtained from the remote sensing image. Based on the product of the spatial resolution and data size stored in the affine matrix, the data range of the raster data is obtained, and the location of the data range is located based on the coordinate information. Based on the data range of the raster data and the unit length of Unreal Engine, the raster data is interpolated to determine the matrix length and matrix width of the raster data matrix, so that the raster matrix size of the raster data matches the unit length of Unreal Engine. This facilitates Unreal Engine's compatibility with raster data and the construction of maps using raster data. Here, spatial resolution includes the pixel size of the raster data, and data size includes the length corresponding to a single pixel.

[0164] In a specific application scenario, GDAL is used to read raster data to obtain the data, data size, affine matrix, and coordinate information stored in the raster data. The data size is the length corresponding to a single pixel in meters. Based on the spatial resolution value, data size, and coordinate information stored in the affine matrix, the position of the raster data is located and the data range of the raster data is determined, i.e., the length and width of the raster data in meters. Based on the data range and the unit length of Unreal Engine, the raster data is interpolated to match the raster matrix size of the raster data with the unit length of Unreal Engine, resulting in a raster data matrix. The raster data matrix is ​​stored as a 16-bit unsigned integer, where the unit length of Unreal Engine is one meter. In other application scenarios, the unit length of Unreal Engine can also be other values, and this application does not impose specific restrictions on this.

[0165] Furthermore, before generating the map corresponding to the raster data in Unreal Engine by converting the raster data into a map grid texture, the process includes: determining the geographic coordinates of the raster data in the geographic coordinate system based on the coordinate information and the preset corners of the affine matrix; converting the geographic coordinates corresponding to the raster data to the projected coordinate system using a spatial data conversion library to obtain the projected coordinates of the raster data in the projected coordinate system; and converting the projected coordinates corresponding to the raster data to the engine global coordinate system to obtain the engine global coordinates of the map grid corresponding to the raster data in the engine global coordinate system.

[0166] Specifically, Unreal Engine has a coordinate system. Based on the coordinate information and the preset corners of the affine matrix, the geographic coordinates of the preset corners of the affine matrix in the geographic coordinate system are determined. The geographic coordinates of the preset corners of the affine matrix in the geographic coordinate system are used as the coordinates of the raster data in the geographic coordinate system. The geographic coordinates are transformed into the projected coordinate system to obtain the projected coordinates of the raster data in the projected coordinate system. The projected coordinates of the raster data are then transformed into the engine global coordinate system to obtain the engine global coordinates of the map grid corresponding to the raster data in the engine global coordinate system, so that the map grid matches the position in the real world.

[0167] In one specific application scenario, the preset corner is the top-left corner of the affine matrix. Based on coordinate information and the matrix size of the affine matrix, the geographic coordinates of the top-left corner of the affine matrix in the geographic coordinate system are determined. These geographic coordinates are determined based on latitude and longitude. The geographic coordinates of the top-left corner in the geographic coordinate system are transformed to the projected coordinate system to obtain the projected coordinates of the top-left corner of the affine matrix. The engine origin coordinates are obtained by subtracting the origin coordinates of the engine origin from the projected coordinates of the top-left corner of the affine matrix. In the engine global coordinates, the horizontal axis corresponds to the longitude of the top-left corner of the affine matrix, the vertical axis corresponds to the latitude of the top-left corner of the affine matrix, and the vertical axis is assigned a value of 0. In other specific application scenarios, the preset corner can also be other corners of the affine matrix; this application does not impose specific restrictions on this.

[0168] In some implementation scenarios, step S502 specifically includes: generating a map object corresponding to the raster data in Unreal Engine; wherein the map object includes position attributes, grid attributes, material attributes, and image address attributes; wherein the position attributes are used to store coordinate information, the grid attributes are used to store the map grid volume corresponding to the map object, the material attributes are used to store the material of the map grid volume, and the image address attributes are used to store the address index of the remote sensing image; storing the address index corresponding to the remote sensing image into the image address attribute of the map object; generating a set of grid vertices corresponding to the map object in Unreal Engine based on the raster matrix size of the raster data matrix; wherein the set of grid vertices includes multiple grid vertices; generating a map grid volume corresponding to the map object based on the set of grid vertices.

[0169] Specifically, a map object ALayerActor that matches the raster data is generated in Unreal Engine. This map object ALayerActor inherits from the base class object AActor in Unreal Engine. The map object includes location attributes, grid attributes, material attributes, and image address attributes. Among them, the location attribute can facilitate the storage of coordinate information, the grid attribute can facilitate the storage of the map grid volume corresponding to the map object, the material attribute can facilitate the storage of the material of the map grid volume, and the image address attribute can facilitate the storage of the address index of the remote sensing image. The address index corresponding to the remote sensing image is traversed and stored in the image address attribute of the map object to facilitate the retrieval of the remote sensing image.

[0170] Furthermore, in Unreal Engine, based on the raster matrix size of the raster data, a mesh volume matching the raster matrix size is generated. The vertices of the mesh volume are determined to obtain the mesh vertex set, which includes multiple mesh vertices. Based on the mesh vertex set, the triangular mesh index corresponding to the mesh vertex set, as well as the texture coordinates and normals corresponding to each mesh vertex in the mesh vertex set, are determined. Procedural modeling is used to generate the map mesh volume corresponding to the mesh vertex set, thereby constructing the basic framework of the map in Unreal Engine so that the map can be generated in Unreal Engine.

[0171] In one application scenario, a set of mesh vertices includes at least four mesh vertices. Based on the set of mesh vertices, a map mesh volume corresponding to the map object is generated, including: determining multiple triangular mesh indices corresponding to the set of mesh vertices based on the positions of all mesh vertices in the set; determining the texture coordinates corresponding to the set of mesh vertices based on the position of any mesh vertex relative to the positions of other mesh vertices; determining the normals corresponding to each mesh vertex in all triangular mesh indices based on the positions of three mesh vertices in all triangular mesh indices; and generating a map mesh volume corresponding to the map object based on all triangular mesh indices and the normals and texture coordinates corresponding to each mesh vertex in Unreal Engine.

[0172] Specifically, the mesh constructed based on the raster data matrix is ​​a rectangle or other polygon. The set of mesh vertices includes at least four mesh vertices. For ease of explanation, taking a square mesh as an example, the height of the raster data matrix is ​​h, the width is w, and h = w. All the mesh vertices of the mesh corresponding to this raster data matrix are (0,0,0), (0,h,0), (w,h,0), and (w,0,0). The mesh vertices corresponding to the mesh are numbered 0, 1, 2, and 3. The triangular mesh indices of the generated mesh are 0, 1, 2 and 2, 3, 0, respectively, so that the mesh can be generated based on the triangular mesh indices. The generated texture coordinates are (0,0), (0,1), (1,1), and (1,0), respectively, for texture mapping. The normal corresponding to each vertex is calculated to determine the lighting direction corresponding to each vertex. The vertices, triangular mesh indices, texture coordinates, and normals generated in the above steps are input, and the map mesh is generated using Unreal Engine's procedural modeling functions.

[0173] In a specific application scenario, based on the positions of the three vertices in all triangular mesh indices, the normals corresponding to each vertex in all triangular mesh indices are determined. This includes: based on the positions of the three vertices in each triangular mesh index, performing a cross product of the two vectors between any vertex in each triangular mesh index and the other two vertices, and normalizing the cross product result to obtain the normals corresponding to all mesh vertices.

[0174] Specifically, the normal of each vertex in the triangular mesh index is calculated. The normal is calculated by taking the cross product of two vectors formed by the vertex and the other two vertices on the triangular face where the vertex is located, and then normalizing the cross product result to obtain the vertex and thus the accurate position of the normal.

[0175] In some implementation scenarios, step S503 specifically includes: creating a texture pointer variable in Unreal Engine, storing the data features corresponding to the raster data into the texture pointer variable, so that the raster data is converted into the texture of the map grid and a map corresponding to the raster data is generated; wherein, the data features are related to the remote sensing image corresponding to the raster data.

[0176] Specifically, a texture pointer variable is created in Unreal Engine, and the data features corresponding to the raster data are stored in the texture pointer variable. This allows the raster data to be converted into a texture of the map grid in Unreal Engine. The texture is then used to map the map grid, generating a map corresponding to the raster data. The data features are directly related to the remote sensing image corresponding to the raster data, so that the remote sensing image can be used in Unreal Engine as a map to show the overall picture of the entire region, and also as a ruler and reference for modeling in Unreal Engine, thus improving the accuracy of modeling in Unreal Engine.

[0177] Furthermore, after converting the raster data into a texture of the map mesh and generating a map corresponding to the raster data in Unreal Engine, the process also includes: creating a material pointer variable in Unreal Engine, generating a material that matches the texture for the map mesh in the material pointer variable, and obtaining the material of the map mesh.

[0178] Specifically, a material pointer variable is created in Unreal Engine, a material matching the texture is generated for the map mesh and stored in the material pointer variable, thus obtaining the material of the map mesh.

[0179] In a specific application scenario, a pointer variable TextPackage of type UPackage is created in Unreal Engine to store texture assets. A pointer variable NewTexture of type UTexture2D is created in TextPackage to store texture data. The size, channels, and type information of the remote sensing image are assigned to the PlatformData variable of NewTexture. A pointer variable Mip of type FTexture2DMipMap is created in Unreal Engine. The RGBA values ​​of the remote sensing image are written into the BulkData of Mip. If the pixel size of the remote sensing image is larger than the maximum texture size in Unreal Engine, the pixel size of the remote sensing image needs to be scaled to be smaller than or equal to the maximum texture size. This Mip is assigned to Mips of PlatformData of NewTexture, and then the texture asset TextPackage is stored to obtain the texture asset of the map grid.

[0180] Further, a pointer variable Package of type UPackage is created to store the material asset. Within Package, a pointer variable UnrealMaterial of type UMaterial is created to store the material data. A material node of type UMaterialExpressionTextureSample is generated, and the texture asset is imported and assigned to the Texture variable of this node. The material node is assigned to the Expression variable of BaseColor of UnrealMaterial. The material asset is saved. The material asset is then assigned to the map mesh using the SetMaterial function.

[0181] In some embodiments, please refer to Figure 6 , Figure 6 This is a flowchart illustrating one embodiment of the plane construction method based on Unreal Engine according to this application. The process includes obtaining vector data based on remote sensing images, importing vector lines or vector surfaces from the vector data into Unreal Engine, and generating a plane corresponding to the vector data within Unreal Engine. Specifically, it includes:

[0182] S601: Obtain vector data based on remote sensing images, and extract vector lines and vector surfaces from the vector data.

[0183] Specifically, remote sensing images are raster structures with pixels as the unit. Vector data can be obtained by extracting vectors from the raster structure in the remote sensing image. The vector lines and vector surfaces in the vector data can be read out so that Unreal Engine can be compatible with remote sensing images and obtain vector lines and vector surfaces.

[0184] In one application method, a spatial data conversion library is used to read remote sensing images, determine the raster structure of the remote sensing images, extract vector data from the raster structure in the remote sensing images, extract vector lines from the vector data based on the data attributes corresponding to the vector lines in the vector data, and extract vector surfaces from the vector data based on the data attributes corresponding to the vector surfaces in the vector data.

[0185] In another application, a spatial data conversion library is used to read the vector file in Shapefile or GeoJson format corresponding to the remote sensing image, and vector lines and vector surfaces are extracted from the vector data in the vector file.

[0186] S602: Generate a flat object in Unreal Engine.

[0187] Specifically, a planar object is generated in Unreal Engine, where the planar object corresponds to a vector line or vector surface, and the vector surface corresponding to the planar object does not include height features.

[0188] In one application approach, a planar object that inherits from the global geographic object is created in Unreal Engine.

[0189] In another application, a flat object that inherits from a base class of Unreal Engine is created within Unreal Engine.

[0190] S603: In response to the vector line corresponding to the planar object, add all the contour points of the vector line to the planar object to obtain the first original vertex in the planar object, expand the width of the first original vertex in the planar object to obtain the new vertex, and obtain the planar mesh corresponding to the vector line based on the first original vertex and the new vertex.

[0191] Specifically, when the planar object corresponds to a vector line, all the contour points obtained from the vector line are added to the planar object to obtain the first original vertex of the planar object, thereby importing the contour points on the vector line into the planar object and using the contour points as the first original vertex of the planar object.

[0192] Furthermore, the first original vertex in the planar object is not enough to form a face. The width of the first original vertex in the planar object is expanded to generate a new vertex corresponding to the first original vertex, so that the first original vertex and the new vertex together can form a plane.

[0193] In one application, based on the position of the first original vertex in the planar object, the line connecting every two adjacent first original vertices is determined, and the width is expanded in the direction perpendicular to the line connecting the adjacent first original vertices to obtain two new vertices corresponding to each first original vertex.

[0194] In another application, based on the position of the first original vertex in the planar object, a connecting line is determined to connect all the first original vertices in the planar object in sequence. A replica connecting line parallel to the connecting line is generated in Unreal Engine, resulting in at least one new vertex corresponding to each first original vertex.

[0195] Furthermore, in Unreal Engine, a planar mesh corresponding to the vector lines is generated based on the first original vertex and the newly added vertices.

[0196] In one application approach, a mesh matching the planar object is generated based on the positions of the first original vertex and the newly added vertex in Unreal Engine. The mesh vertices, triangular mesh indices, texture coordinates, and normals of the mesh are determined. Procedural modeling functions are used to model the mesh based on the mesh vertices, triangular mesh indices, texture coordinates, and normals corresponding to the mesh, generating a planar mesh corresponding to the vector lines in Unreal Engine.

[0197] In another application, the planar object includes mesh properties. Based on the positions of the first original vertex and the newly added vertex in Unreal Engine, a mesh volume matching the planar object is generated. The mesh vertices, triangular mesh indices, texture coordinates, and normals of the mesh volume are determined. The mesh vertices, triangular mesh indices, texture coordinates, and normals of the mesh volume are stored in the mesh properties. In Unreal Engine, the mesh properties are called using procedural modeling functions to generate a planar mesh volume corresponding to the vector lines.

[0198] S604: In response to the vector surface corresponding to the planar object, add all contour points of the vector surface to the planar object to obtain the second original vertex in the planar object, and obtain the planar mesh corresponding to the vector surface based on the second original vertex.

[0199] Specifically, when the planar object corresponds to a vector surface, which does not include height features, all contour points obtained from the vector surface are added to the planar object to obtain the second original vertices of the planar object. This imports the contour points from the vector surface into the planar object, using them as the second original vertices. In one application, based on the position of the second original vertex in Unreal Engine, a mesh matching the planar object is generated. The mesh vertices, triangular mesh indices, texture coordinates, and normals of this mesh are determined. Procedural modeling functions are then used to model the mesh based on these parameters, generating the planar mesh corresponding to the vector surface in Unreal Engine.

[0200] In another application, the planar object includes mesh properties. Based on the position of the second original vertex in Unreal Engine, a mesh volume matching the planar object is generated. The mesh vertices, triangular mesh indices, texture coordinates, and normals of the mesh volume are determined. The mesh vertices, triangular mesh indices, texture coordinates, and normals of the mesh volume are stored in the mesh properties. In Unreal Engine, the mesh properties are called using procedural modeling functions to generate a planar mesh volume corresponding to the vector face.

[0201] S605: Specifies the material for the planar mesh corresponding to the vector line or vector surface, generating a plane in Unreal Engine that corresponds to the vector data.

[0202] Specifically, the material corresponding to the planar mesh is related to the entity target in the real world that corresponds to the vector line or vector surface. By assigning a material to the planar mesh, a plane corresponding to the vector data is generated in Unreal Engine.

[0203] In one application scenario, vector lines correspond to roads in the real world. By assigning road-related materials to a planar mesh, a plane corresponding to the vector lines is generated in Unreal Engine, thereby generating a plane corresponding to a virtual road in Unreal Engine.

[0204] In another application scenario, vector planes correspond to canals in the real world. By assigning river-related materials to planar meshes, planes corresponding to vector planes are generated in Unreal Engine, thereby generating planes corresponding to virtual rivers in Unreal Engine.

[0205] In this embodiment, vector data based on remote sensing images is obtained. The vector lines and vector surfaces in the vector data are read out, and a planar object is generated in Unreal Engine. Contour points on the vector lines are added to the planar object, and the contour points are used as the first original vertices of the planar object. The width of the first original vertices is expanded, so that the first original vertices and the newly added vertices can jointly form a plane. Based on the first original vertices and the newly added vertices, a planar mesh corresponding to the vector lines is generated in Unreal Engine. Alternatively, contour points on the vector surfaces are added to the planar object, and the contour points are used as the second original vertices of the planar object. Based on the second original vertices, a planar mesh corresponding to the vector surfaces is generated in Unreal Engine. A material is assigned to the planar mesh, thereby enabling the convenient generation of planes corresponding to the real world in Unreal Engine, improving the ease of building planes in Unreal Engine.

[0206] In some implementation scenarios, step S601 specifically includes: reading remote sensing images using a spatial data conversion library to obtain vector data and its corresponding data attributes; wherein, the data attributes include area data attributes and line data attributes; based on the data attributes of the vector data, reading vector lines corresponding to the line data attributes and vector surfaces corresponding to the area data attributes from the vector data.

[0207] Specifically, a spatial data conversion library is used to read remote sensing images, obtain vector files corresponding to vector data from the remote sensing images, and determine the data attributes corresponding to the vector data. The data attributes include area data attributes and line data attributes. Each vector file can store multiple layers, and each layer can store multiple features. For each feature, the data attributes corresponding to the feature are determined. Vectors with line data attributes in the vector data are read out to obtain vector lines corresponding to the line data attributes. Vectors with area data attributes in the vector data are read out to obtain vector surfaces corresponding to the area data attributes. Here, the vector surfaces do not correspond to height features, that is, the vector surfaces used to construct the plane correspond to a plane in the real world.

[0208] In a specific application scenario, GDAL is used to read remote sensing images and obtain vector files composed of vector data corresponding to the remote sensing images. The vector file format includes, but is not limited to, Shapefile and GeoJson formats. Vector lines are extracted from the vector data in the vector file so that Unreal Engine can be compatible with remote sensing images. Based on the vector data corresponding to the remote sensing images, vector lines are obtained to construct a plane.

[0209] In some implementation scenarios, Unreal Engine corresponds to a coordinate system and a geographic global object. The coordinate system includes a geographic coordinate system, a projected coordinate system, an engine global coordinate system, and engine local coordinates. The geographic global object includes the engine origin and the transformation relationship between any two coordinate systems. Among them, the geographic coordinate system and the projected coordinate system are related to the Global Positioning System (GPS). The engine global coordinate system is used to locate any object in Unreal Engine. The engine origin has origin coordinates in the projected coordinate system. The engine global coordinates in the engine global coordinate system are obtained by subtracting the origin coordinates from the projected coordinates in the projected coordinate system. The engine local coordinates in the engine local coordinate system are determined based on the offset of the vertices on the current object relative to the engine global coordinates of the current object. The first original vertex, the newly added vertex, and the second original vertex are included in the engine local coordinates in the engine local coordinate system in Unreal Engine.

[0210] Specifically, the first original vertex and the newly added vertex correspond to the mesh vertices in the triangular mesh index, and the second original vertex corresponds to the mesh vertices in the triangular mesh index. The mesh vertices eventually generate a planar mesh volume. Therefore, when the first original vertex, the newly added vertex, and the second original vertex correspond to engine local coordinates, the computational load when calling the position of the mesh vertex can be effectively reduced, and the execution efficiency of steps related to the mesh vertex can be improved.

[0211] In one implementation scenario, based on the first original vertex and the newly added vertex, a planar mesh corresponding to the vector line is obtained. Specifically, this includes: performing triangulation based on the engine local coordinates corresponding to the first original vertex and the newly added vertex to obtain multiple triangular mesh indices corresponding to the planar object; storing the vertices in each triangular mesh index according to the plane-specified direction; wherein, each triangular mesh index includes three mesh vertices, and the mesh vertices correspond to the first original vertex and the newly added vertex; based on the position of each mesh vertex in the Unreal Engine, determining the normals corresponding to each mesh vertex in all triangular mesh indices, as well as the texture coordinates corresponding to each mesh vertex; in the Unreal Engine, based on all triangular mesh indices and the normals and texture coordinates corresponding to each mesh vertex, generating a planar mesh corresponding to the vector line.

[0212] Specifically, based on the engine local coordinates corresponding to the first original vertex and the newly added vertex, the plane that can be connected by the first original vertex and the newly added vertex is determined. The plane formed by the first original vertex and the newly added vertex is triangulated to obtain multiple triangular mesh indices corresponding to the planar object. The vertices in each triangular mesh index are stored according to the plane-specified direction, which includes clockwise storage towards the positive z-axis of the engine global coordinates. That is, in Unreal Engine, the vertices are stored clockwise from top to bottom. Each triangular mesh index corresponds to three mesh vertices, and the mesh vertices correspond to the first original vertex and the newly added vertex. That is, each triangular mesh index includes the first original vertex and / or the newly added vertex. The texture coordinates of the mesh vertex are generated based on the position of each mesh vertex to facilitate texture mapping. The normal corresponding to each mesh vertex is calculated based on the position of each mesh vertex to determine the lighting direction corresponding to each mesh vertex. The mesh vertices, triangular mesh indices, texture coordinates and normals generated in the above steps are input, and the planar mesh volume corresponding to the vector lines is generated using the procedural modeling functions of Unreal Engine.

[0213] In another implementation scenario, obtaining a planar mesh corresponding to the vector surface based on the second original vertex specifically includes: performing triangulation based on the engine local coordinates corresponding to the second original vertex to obtain multiple triangular mesh indices corresponding to the planar object, and storing the vertices in each triangular mesh index according to the plane-specified direction; wherein, each triangular mesh index includes three mesh vertices, and the mesh vertices correspond to the second original vertex; based on the position of each mesh vertex in Unreal Engine, determining the normals corresponding to each mesh vertex in all triangular mesh indices, as well as the texture coordinates corresponding to each mesh vertex; in Unreal Engine, generating a planar mesh corresponding to the vector surface based on all triangular mesh indices and the normals and texture coordinates corresponding to each mesh vertex.

[0214] Specifically, based on the engine local coordinates corresponding to the second original vertex, the plane that the second original vertex can connect is determined. The plane formed by the second original vertex is triangulated to obtain multiple triangular mesh indices corresponding to the planar object. The vertices in each triangular mesh index are stored according to the plane-specified direction, which includes clockwise storage towards the positive z-axis of the engine global coordinates. That is, in Unreal Engine, the vertices are stored clockwise from top to bottom. Each triangular mesh index corresponds to three mesh vertices, and the mesh vertices correspond to the second original vertex. That is, each triangular mesh index includes the second original vertex. The texture coordinates of the mesh vertex are generated based on the position of each mesh vertex to facilitate texture mapping. The normal corresponding to each mesh vertex is calculated based on the position of each mesh vertex to determine the lighting direction corresponding to each mesh vertex. The mesh vertices, triangular mesh indices, texture coordinates, and normals generated in the above steps are input, and the planar mesh corresponding to the vector surface is generated using Unreal Engine's procedural modeling functions.

[0215] Furthermore, for any of the above implementation scenarios, based on the position of each mesh vertex in the Unreal Engine, the normals corresponding to each mesh vertex in all triangular mesh indices and the texture coordinates corresponding to each mesh vertex are determined, including: based on the engine local coordinates corresponding to the three mesh vertices in each triangular mesh index, the two vectors between any mesh vertex in each triangular mesh index and the other two mesh vertices are cross-multiplied, and the cross-multiplication result is normalized to obtain the normals corresponding to all mesh vertices; the engine local coordinates corresponding to each mesh vertex are scaled to the texture coordinate range to obtain the texture coordinates corresponding to each mesh vertex.

[0216] Specifically, the normal of each vertex in the triangular mesh index is calculated. The normal is calculated by taking the cross product of two vectors formed by the vertex and the other two vertices on the triangular face where the vertex is located, and then normalizing the cross product result to obtain the vertex and thus the accurate position of the normal.

[0217] Furthermore, the engine local coordinates corresponding to each mesh vertex are scaled to the range of texture coordinates to obtain the texture coordinates corresponding to each mesh vertex, so as to facilitate the mapping of the planar mesh.

[0218] In a specific implementation scenario, the engine local coordinates corresponding to each mesh vertex are scaled to the texture coordinate range to obtain the texture coordinates corresponding to each mesh vertex. This includes scaling the horizontal and vertical coordinates of the engine local coordinates corresponding to each mesh vertex to obtain the horizontal and vertical components of the texture coordinates corresponding to each mesh vertex, thereby determining the texture coordinates corresponding to all mesh vertices.

[0219] Specifically, the horizontal and vertical coordinates in the engine local coordinates corresponding to all mesh vertices are divided by the scaling parameter to obtain the horizontal and vertical components of the texture coordinates corresponding to each mesh vertex. This scaling of the horizontal and vertical components to the texture coordinate range yields the texture coordinates corresponding to all mesh vertices, which facilitates texturing the planar mesh.

[0220] In a specific application scenario, the horizontal component U of all vertex texture coordinate UV values ​​is the horizontal coordinate of the engine local coordinates in the mesh vertex divided by 100, and the vertical component V is the vertical coordinate of the engine local coordinates in the mesh vertex divided by 100. In this application scenario, the scaling parameter is 100. In other application scenarios, the scaling parameter can be defined based on the engine local coordinates of the mesh vertex, scaling the horizontal and vertical components of the texture coordinates to 0-1.

[0221] Optionally, a planar object is generated in Unreal Engine, specifically including: generating a planar object that inherits from the geographic global object in Unreal Engine; wherein the planar object includes vertex attributes, mesh attributes and material attributes; wherein the vertex attributes are used to store the contour points on the vector line or vector surface, the mesh attributes are used to store the planar mesh corresponding to the vector line or vector surface, and the material attributes are used to store the material of the planar mesh.

[0222] Specifically, Unreal Engine includes a coordinate system and a geographic global object (AGeoActor). Within Unreal Engine, a planar object (APolylineActor) inherits from the geographic global object. This planar object includes vertex properties, mesh properties, and material properties. Vertex properties store the contour points on vector lines or vector surfaces, mesh properties store the corresponding planar mesh volumes, and material properties store the material of the planar mesh volumes, providing corresponding storage space for contour points, planar mesh volumes, and materials.

[0223] Furthermore, all contour points on the vector line are added to the planar object to obtain the first original vertex in the planar object, including: converting the positions corresponding to all contour points on the vector line to the geographic coordinate system, and storing the geographic coordinates corresponding to all contour points on the vector line to the vertex attribute to obtain the first original vertex in the planar object.

[0224] Specifically, the positions corresponding to all contour points on the vector line are converted to the geographic coordinate system, and the geographic coordinates corresponding to all contour points on the vector line are stored in the vertex attribute. Thus, the contour points on the vector line are used as the first original vertices in the planar object, and the geographic coordinates corresponding to the contour points are stored in the vertex attribute for easy retrieval.

[0225] It is understandable that adding all the contour points in the vector plane to the planar object to obtain the second original vertex in the planar object includes: converting the positions corresponding to all the contour points in the vector plane to the geographic coordinate system, and storing the geographic coordinates corresponding to all the contour points in the vector plane to the vertex attribute to obtain the second original vertex in the planar object.

[0226] Specifically, the positions corresponding to all contour points on the vector surface are transformed to the geographic coordinate system, and the geographic coordinates corresponding to all contour points on the vector surface are stored in the vertex attribute. Thus, the contour points on the vector surface are used as the second original vertices in the planar object, and the geographic coordinates corresponding to the contour points are stored in the vertex attribute for easy access.

[0227] In one application scenario, the width of the first original vertex in a planar object is expanded to obtain new vertices. This includes: using a spatial data transformation library to transform the geographic coordinates of all the first original vertices in the planar object to the projected coordinate system, transforming the projected coordinates in the projected coordinate system to the engine global coordinate system, transforming the engine global coordinates in the engine global coordinate system to the engine local coordinate system, and determining the engine local coordinates of the first original vertex in the engine local coordinate system; taking the engine global coordinates of one of the first original vertices in the engine global coordinate system as the position of the planar object in Unreal Engine; based on the engine local coordinates of all the first original vertices in the planar object in the engine local coordinate system, expanding the width of the first original vertices in the planar object in the direction perpendicular to the line connecting adjacent first original vertices to obtain new vertices; wherein, the expansion width between the first original vertices and the new vertices is related to the line width attribute of the vector line; and based on the engine local coordinates of the first original vertices in the engine local coordinate system, determining the engine local coordinates of the new vertices corresponding to each first original vertex in the engine local coordinate system.

[0228] Specifically, the geographic coordinates of the first original vertex can be obtained by calling the geographic coordinates stored in the vertex attributes. These geographic coordinates are then transformed into the projected coordinate system and then into the engine's global coordinate system. The engine's global coordinates corresponding to one of the first original vertices are used as the position of the planar object in Unreal Engine, thus matching the planar object with the position of the vector line in the real world. The engine's global coordinates of the first original vertex are then transformed into the engine's local coordinate system to obtain the engine's local coordinates corresponding to the first original vertex. In a direction perpendicular to the line connecting adjacent first original vertices, the first original vertex is expanded outwards by the width of the line width attribute, resulting in new vertices. This expands the vector line into a plane, suitable for modeling vector lines corresponding to entities such as roads and canals in the Unreal Engine. The line width attribute stored in the vector line is related to the entity object corresponding to the vector line.

[0229] Furthermore, after widening the first original vertex in the planar object to obtain the new vertex, the process also includes: determining the engine local coordinates of the new vertex corresponding to each first original vertex in the engine local coordinate system based on the engine local coordinates of the first original vertex in the engine local coordinate system.

[0230] Specifically, based on the engine local coordinates corresponding to the first original vertex, the engine local coordinates of the newly added vertices corresponding to each of the first original vertices in the engine local coordinate system are determined. The first original vertices and newly added vertices are stored according to a plane-specified direction to facilitate locating the positions of the newly added vertices, and then the first original vertices and newly added vertices are displayed.

[0231] Optionally, before obtaining vector data based on remote sensing images and reading the vector lines in the vector data, the method further includes: obtaining the coordinate setting attribute corresponding to the engine origin; when the coordinate setting attribute corresponds to an allowed setting, determining the position information in the vector data, and resetting the engine origin of the coordinate system based on the position information; wherein, the coordinate setting attribute includes allowed settings and prohibited settings.

[0232] Specifically, the system determines the coordinate setting attribute of the engine origin. If setting is allowed, the engine origin of the coordinate system is reset based on the position information in the vector data, and the coordinate setting attribute is set to disabled after the reset. If setting is disabled, the existing engine origin is used. Furthermore, when setting is allowed, the new engine origin can be set based on the position information corresponding to the vector data first, thereby effectively reducing the value of the engine's global coordinates for the planar solid objects corresponding to the vector data, effectively reducing the processing burden of Unreal Engine and improving computational efficiency.

[0233] In some embodiments, please refer to Figure 7 , Figure 7 This is a flowchart illustrating one implementation of the Unreal Engine-based 3D modeling method of this application. The method involves obtaining vector data based on remote sensing images, importing vector surfaces from the vector data into Unreal Engine, and generating a 3D model corresponding to the vector data within Unreal Engine. Specifically, the process includes:

[0234] S701: Obtain vector data based on remote sensing images, read out the vector surfaces in the vector data, and determine the height characteristics of the vector surfaces.

[0235] Specifically, remote sensing images are raster structures with pixels as the unit. Vector data can be obtained by extracting vectors from the raster structure in the remote sensing image. The vector surfaces in the vector data are then read out, and the height features of the vector surfaces are determined so that Unreal Engine can be compatible with remote sensing images and obtain vector surfaces.

[0236] In one application method, a spatial data conversion library is used to read remote sensing images, determine the raster structure of the remote sensing images, extract vector data from the raster structure in the remote sensing images, extract vector surfaces from the vector data based on the data attributes corresponding to the vector surfaces, and determine the height features of the vector surfaces based on the attribute fields corresponding to the vector surfaces. The attribute fields are used to store the height features of the entity targets corresponding to the vector surfaces.

[0237] In another application, a spatial data conversion library is used to read the shapefile or GeoJson format vector file corresponding to the remote sensing image, extract the vector surface from the vector data in the vector file, and determine the height feature of the vector surface based on the attribute field corresponding to the vector surface. The attribute field is used to store the height feature of the entity target corresponding to the vector surface.

[0238] S702: Generate a solid object in Unreal Engine, add all the contour points of the vector plane to the solid object, and obtain the planar vertices of the solid object.

[0239] Specifically, in Unreal Engine, a 3D object is generated, and all the contour points obtained from the vector plane are added to the 3D object to obtain the planar vertices of the 3D object. Thus, the contour points on the vector plane are imported into the 3D object, and the contour points are used as the planar vertices of the 3D object.

[0240] In one application, a solid object is created in Unreal Engine. The solid object includes vertex properties, which are used to store the contour points on the vector surface. All contour points obtained from the vector surface are added to the vertex properties of the solid object to obtain the planar vertices of the solid object.

[0241] In another application, a 3D object is created in Unreal Engine. The 3D object includes a position attribute, which stores the positions of contour points on the vector plane. The positions of all contour points obtained from the vector plane are added to the position attribute of the 3D object. Based on the position of the contour in the position attribute, the planar vertices of the 3D object are indexed.

[0242] S703: Based on planar vertices, obtain a 3D mesh corresponding to the 3D object. The 3D mesh includes height vertices that match the planar vertices, and the position of the height vertices in Unreal Engine is related to the height feature.

[0243] Specifically, the planar vertices in a 3D object are not sufficient to form a 3D object. Based on the height characteristics of the vector surface, the height of the planar vertices in the 3D object is extended to generate the height vertices corresponding to the planar vertices, so that the planar vertices and the height vertices can be combined to form a 3D object.

[0244] In one application, the base surface enclosed by the plane vertices is determined based on the position of the plane vertices in the 3D object. The height of the plane vertices is then expanded based on the height features in the direction perpendicular to the base surface to obtain the height vertices.

[0245] Furthermore, in Unreal Engine, a 3D mesh corresponding to a 3D object is generated based on planar vertices and height vertices.

[0246] In one application approach, a mesh matching the 3D object is generated based on the positions of the planar vertices and height vertices in Unreal Engine. The mesh vertices, triangular mesh indices, texture coordinates, and normals of the mesh are determined. Procedural modeling functions are used to model the 3D object based on the corresponding mesh vertices, triangular mesh indices, texture coordinates, and normals, generating a 3D mesh corresponding to the 3D object in Unreal Engine.

[0247] In another application, the 3D object includes mesh attributes. Based on the positions of the planar vertices and height vertices in Unreal Engine, a mesh that matches the 3D object is generated. The mesh vertices, triangular mesh indices, texture coordinates, and normals of the mesh are determined. The mesh vertices, triangular mesh indices, texture coordinates, and normals of the mesh are stored in the mesh attributes. In Unreal Engine, the mesh attributes are called using procedural modeling functions to generate the 3D mesh corresponding to the 3D object.

[0248] S704: Specifies the material for the 3D mesh, generating a 3D model in Unreal Engine that corresponds to the vector data.

[0249] Specifically, the material corresponding to the 3D mesh is related to the entity target in the real world corresponding to the vector surface. By assigning a material to the 3D mesh, a 3D object corresponding to the vector data is generated in Unreal Engine.

[0250] In one application scenario, vector planes correspond to buildings in the real world. Materials related to the buildings are assigned to the 3D mesh, and a 3D model corresponding to the vector planes is generated in Unreal Engine, thereby generating a 3D model corresponding to a virtual road in Unreal Engine.

[0251] In another application scenario, vector planes correspond to vegetation in the real world. By assigning vegetation-related materials to the 3D mesh, a 3D model corresponding to the vector plane is generated in Unreal Engine, thereby generating a 3D model corresponding to virtual vegetation in Unreal Engine.

[0252] In this embodiment, vector data based on remote sensing images is obtained, the vector surfaces in the vector data are read out and the height features of the vector surfaces are determined, a 3D object is generated in Unreal Engine, the contour points on the vector surfaces are added to the 3D object, and the contour points are used as the planar vertices of the 3D object. Based on the planar vertices, a 3D mesh corresponding to the 3D object is generated in Unreal Engine. The 3D mesh includes height vertices that match the planar vertices, and the position of the height vertices in Unreal Engine is related to the height features. A material is assigned to the 3D mesh, thereby enabling the convenient generation of 3D objects corresponding to the real world in Unreal Engine, improving the ease of building 3D objects in Unreal Engine.

[0253] In some implementation scenarios, step S701 specifically includes: reading remote sensing images using a spatial data conversion library to obtain vector data and its corresponding data attributes; wherein, the data attributes include area data attributes and line data attributes; based on the data attributes of the vector data, reading the vector surface corresponding to the area data attributes and the height features of the vector surface from the vector data.

[0254] Specifically, a spatial data conversion library is used to read remote sensing images, obtain vector files corresponding to vector data from the remote sensing images, and determine the data attributes corresponding to the vector data. The data attributes include area data attributes and line data attributes. Each vector file can store multiple layers, and each layer can store multiple features. For each feature, the data attributes corresponding to the feature are determined. Vectors with area data attributes corresponding to the area data attributes are read out to obtain vector surfaces corresponding to the area data attributes. The height features corresponding to the vector surfaces are also read out to obtain the height features corresponding to the vector surfaces.

[0255] In a specific application scenario, GDAL is used to read remote sensing images and obtain vector files composed of vector data corresponding to the remote sensing images. The vector file format includes, but is not limited to, Shapefile and GeoJson formats. Vector surfaces are extracted from the vector data in the vector file so that Unreal Engine can be compatible with remote sensing images. Based on the vector data corresponding to the remote sensing images, vector surfaces are obtained, and a stereo model is constructed based on the vector surfaces and height features.

[0256] In some implementation scenarios, Unreal Engine corresponds to a coordinate system and a geographic global object. The coordinate system includes the geographic coordinate system, the projected coordinate system, the engine global coordinate system, and the engine local coordinate system. The geographic global object includes the engine origin and the transformation relationship between any two coordinate systems. Among them, the geographic coordinate system and the projected coordinate system are related to the Global Positioning System (GPS). The engine global coordinate system is used to locate any object in Unreal Engine. The engine origin has origin coordinates in the projected coordinate system. The engine global coordinates in the engine global coordinate system are obtained by subtracting the origin coordinates from the projected coordinates in the projected coordinate system. The engine local coordinates in the engine local coordinate system are determined based on the offset of the vertices on the current object relative to the engine global coordinates of the current object. Planar vertices and height vertices are included in the engine local coordinates in the engine local coordinate system in Unreal Engine.

[0257] Specifically, the planar vertices and height vertices correspond to the mesh vertices in the triangular mesh index. The mesh vertices ultimately generate a solid mesh. Therefore, the planar vertices and height vertices can obtain the engine local coordinates of the planar vertices and height vertices in the engine local coordinate system corresponding to the solid object, thereby effectively reducing the computational load when calling the position of the mesh vertices.

[0258] In one implementation scenario, the surface enclosed by the lines connecting the vertices of the plane is the bottom surface. Step S703 specifically includes: performing triangulation based on the engine local coordinates corresponding to the plane vertices to obtain multiple triangular mesh indices corresponding to the bottom surface; generating height vertices corresponding to the plane vertices based on the plane vertices and height features; performing triangulation based on the positions of the plane vertices and height vertices in the Unreal Engine to obtain multiple triangular mesh indices for other surfaces different from the bottom surface; wherein each triangular mesh index includes three mesh vertices, and the mesh vertices correspond to the plane vertices and height vertices; determining the normals corresponding to each mesh vertex in all triangular mesh indices and the texture coordinates corresponding to each mesh vertex based on the positions of each mesh vertex in the Unreal Engine; and generating a solid mesh corresponding to the solid object in the Unreal Engine based on all triangular mesh indices and the normals and texture coordinates corresponding to each mesh vertex.

[0259] Specifically, please refer to Figure 8 , Figure 8 This is a schematic diagram of an application scenario of one embodiment of the solid-state construction method based on Unreal Engine in this application. For ease of explanation, the base surface enclosed by the plane vertices is a square as an example. The plane vertices are numbered 0-3. Based on the position of the plane vertices in Unreal Engine, triangulation is performed to obtain multiple triangular mesh indices corresponding to the base surface, including 0, 3, 2 and 2, 1, 0.

[0260] Optionally, the triangular mesh index corresponding to the bottom face is stored according to the specified direction of the bottom face so that the mesh vertices corresponding to the bottom face can be displayed, wherein the specified direction of the bottom face includes a clockwise direction towards the negative z-axis.

[0261] Furthermore, based on the height features of the vector surface and the corresponding engine local coordinates of the planar vertices in Unreal Engine, the height of the planar vertices is expanded to obtain the height vertices. Figure 8 The height vertices are numbered 4, 5, 6, and 7. Then, based on the positions of the planar vertices and height vertices in the Unreal Engine, the faces other than the bottom face are triangulated to obtain triangular mesh indices for the other five faces. Each triangular mesh index corresponds to three mesh vertices, and the mesh vertices in the triangular mesh indices corresponding to different faces include planar vertices and / or height vertices.

[0262] Furthermore, texture coordinates of each mesh vertex are generated based on its position in Unreal Engine to facilitate texture mapping. Normals corresponding to each mesh vertex are calculated based on its position to determine the lighting direction for each mesh vertex. The mesh vertices, triangular mesh indices, texture coordinates, and normals generated in the above steps are input, and a 3D mesh is generated using Unreal Engine's procedural modeling functions.

[0263] In one application scenario, based on the plane vertices and height features, height vertices corresponding to the plane vertices are generated. Triangulation is performed based on the positions of the plane vertices and height vertices in Unreal Engine, resulting in multiple triangular mesh indices for faces other than the bottom face. This includes: extruding the plane vertices based on their engine local coordinates and height features in the engine's local coordinate system to obtain the height vertices corresponding to each plane vertices, with the face enclosed by the lines connecting the height vertices being the top face; triangulating the top face based on its engine local coordinates to obtain multiple triangular mesh indices corresponding to the top face, and storing the mesh vertices in these indices according to the specified direction of the top face; similarly, the mesh vertices in the multiple triangular mesh indices corresponding to the bottom face are stored according to the specified direction of the bottom face, with the specified direction of the top face being opposite to that of the bottom face; and triangulating each side face intersecting both the top and bottom faces based on their positions, resulting in multiple triangular mesh indices corresponding to all sides.

[0264] Specifically, still in Figure 8For example, the stretching height is calculated based on the height characteristics and stretching scale of the vector surface. A set of new vertices with the same X and Y positions as the original vertices but with the stretching height as the Z value is generated as height vertices. The surface enclosed by the lines connecting the height vertices is the top surface. Based on the engine local coordinates of the height vertices in the engine local coordinate system, the top surface is triangulated to obtain multiple triangular mesh indices corresponding to the top surface. The mesh vertices in the multiple triangular mesh indices corresponding to the top surface are stored according to the specified direction of the top surface so that the mesh vertices corresponding to the top surface can be displayed. The specified direction of the top surface includes a clockwise direction towards the positive Z-axis. The mesh vertices in the multiple triangular mesh indices corresponding to the bottom surface are stored according to the specified direction of the bottom surface. The specified direction of the top surface is opposite to the specified direction of the bottom surface so that the mesh vertices corresponding to the top and bottom surfaces can be clearly displayed when viewed from the top to the bottom in Unreal Engine.

[0265] Furthermore, the corresponding mesh vertices of the top and bottom faces are used to generate triangular mesh indices for the sides in a clockwise direction facing the observer. The generation method involves traversing from ip = 1 to the total number of vertices num - 1, generating two sets of triangular indices: num + ip - 1, num + ip, ip - 1, and num + ip, ip, ip - 1. When ip = num - 1, the generated indices are num + ip, num, ip, and num, 0, ip. Figure 8 The triangular mesh indexes generated for the 3D mesh shown are 4, 5, 0 and 5, 1, 0; 5, 6, 1 and 6, 2, 1; 6, 7, 3 and 7, 3, 2; 7, 4, 3 and 4, 0, 3. This gives us the triangular mesh indexes for each side, which is then used to texture and generate materials for the 3D mesh.

[0266] Optionally, based on the position of each mesh vertex in the Unreal Engine, the normals corresponding to each mesh vertex in all triangular mesh indices and the texture coordinates corresponding to each mesh vertex are determined, including: based on the engine local coordinates corresponding to the three mesh vertices in each triangular mesh index, the two vectors between any mesh vertex in each triangular mesh index and the other two mesh vertices are cross-multiplied, and the cross-multiplication result is normalized to obtain the normals corresponding to all mesh vertices; the engine local coordinates corresponding to each mesh vertex are scaled to the texture coordinate range to obtain the texture coordinates corresponding to each mesh vertex.

[0267] Specifically, the normal of each vertex in the triangular mesh index is calculated. The normal is calculated by taking the cross product of two vectors formed by the vertex and the other two vertices on the triangular face where the vertex is located, and then normalizing the cross product result to obtain the vertex and thus the accurate position of the normal.

[0268] Furthermore, the engine local coordinates corresponding to each mesh vertex are scaled to the range of texture coordinates to obtain the texture coordinates corresponding to each mesh vertex, so as to facilitate the mapping of the planar mesh.

[0269] In a specific implementation scenario, the engine local coordinates corresponding to each mesh vertex are scaled to the texture coordinate range to obtain the texture coordinates corresponding to each mesh vertex. This includes: scaling the vertical coordinates of the engine local coordinates corresponding to each mesh vertex to obtain the vertical component of the texture coordinates corresponding to each mesh vertex; and setting the horizontal component of the texture coordinates of each mesh vertex as a preset component to obtain the texture coordinates corresponding to each mesh vertex.

[0270] Specifically, the vertical coordinates in the engine local coordinates corresponding to each mesh vertex are divided by the scaling parameter to obtain the vertical component of the texture coordinates corresponding to each mesh vertex. This scaling of the vertical component to the texture coordinate range facilitates uniform mapping of the 3D mesh in the vertical direction, generating a texture effect with uniform height. The horizontal component of the texture coordinates of each mesh vertex is set to a preset category within the texture coordinate range to obtain the texture coordinates corresponding to all mesh vertices, which facilitates mapping of the 3D mesh.

[0271] In a specific application scenario, the vertical component V of all vertex texture coordinate UV values ​​is the vertical coordinate of the engine local coordinates of the mesh vertex divided by 100, and the horizontal component U is a preset component of 0. In this application scenario, the scaling parameter is 100 and the preset component is 0. In other application scenarios, the scaling parameter can be defined based on the engine local coordinates of the mesh vertices, scaling the horizontal and vertical components of the texture coordinates to 0-1, and specifying custom preset component values ​​within the texture coordinate range. Through this UV unwrapping, all 3D meshes can display the same texture effects at the same height, such as self-illumination effects.

[0272] In one application scenario, step S702 specifically includes: generating a 3D object that inherits from a geographic global object in Unreal Engine; wherein the 3D object includes vertex attributes, mesh attributes, material attributes, and feature attributes; wherein the vertex attributes are used to store the contour points on the vector surface, the mesh attributes are used to store the 3D mesh corresponding to the 3D object, the material attributes are used to store the material of the 3D mesh, and the feature attributes are used to store the height features corresponding to the vector surface; storing the height features corresponding to the vector surface into the feature attributes, converting the positions corresponding to all contour points on the vector surface to the geographic coordinate system, and storing the geographic coordinates corresponding to all contour points on the vector surface into the vertex attributes, thereby obtaining the planar vertices in the 3D object.

[0273] Specifically, Unreal Engine includes a coordinate system and a geographic global object (AGeoActor). Within Unreal Engine, a 3D object (APolygonActor) inherits from the geographic global object. This 3D object includes vertex attributes, mesh attributes, material attributes, and feature attributes. Vertex attributes store the contour points on the vector surface, mesh attributes store the corresponding 3D mesh, material attributes store the material of the 3D mesh, providing storage space for the contour points, 3D mesh, and material, and feature attributes store the height features corresponding to the vector surface.

[0274] Furthermore, the height features corresponding to the vector surface are stored in the feature attributes, the positions corresponding to all contour points on the vector surface are converted to the geographic coordinate system, and the geographic coordinates corresponding to all contour points on the vector surface are stored in the vertex attributes. Thus, the contour points on the vector surface are used as planar vertices in the 3D object, and the geographic coordinates corresponding to the contour points are stored in the vertex attributes for easy retrieval.

[0275] Furthermore, after generating a 3D object in Unreal Engine and adding all the contour points of the vector plane to the 3D object to obtain the planar vertices of the 3D object, the process also includes: using a spatial data transformation library to transform the geographic coordinates of all planar vertices in the 3D object to the projected coordinate system, transforming the projected coordinates in the projected coordinate system to the engine global coordinate system, transforming the engine global coordinates in the engine global coordinate system to the engine local coordinate system, determining the engine local coordinates of the planar vertices in the engine local coordinate system; and using the engine global coordinates of one of the planar vertices in the engine global coordinate system as the position of the 3D object in Unreal Engine.

[0276] Specifically, the geographic coordinates corresponding to the planar vertex can be obtained by calling the geographic coordinates stored in the vertex attributes. The geographic coordinates are then converted to the projected coordinate system and then to the engine global coordinate system. The engine global coordinates corresponding to one of the planar vertexes are used as the position of the 3D object in the Unreal Engine, thereby matching the position of the 3D object with the position of the vector surface in the real world.

[0277] Optionally, before obtaining vector data based on remote sensing images and reading the vector surfaces in the vector data, the method further includes: obtaining the coordinate setting attribute corresponding to the engine origin; when the coordinate setting attribute corresponds to an allowed setting, determining the position information in the vector data, and resetting the engine origin of the coordinate system based on the position information; wherein, the coordinate setting attribute includes allowed settings and prohibited settings.

[0278] Specifically, the system determines the coordinate setting attribute of the engine origin. If setting is allowed, the engine origin of the coordinate system is reset based on the position information in the vector data, and the coordinate setting attribute is set to disabled after the reset. If setting is disabled, the existing engine origin is used. Furthermore, when setting is allowed, the new engine origin can be set based on the position information corresponding to the vector data first, thereby effectively reducing the value of the engine's global coordinates for the 3D objects corresponding to the vector data, effectively reducing the processing burden of Unreal Engine and improving computational efficiency.

[0279] In some embodiments, please refer to Figure 9 , Figure 9 This is a flowchart illustrating one implementation of the icon construction method based on Unreal Engine according to this application. After generating a virtual model corresponding to the remote sensing image in Unreal Engine based on the position of terrain, map, plane, and solid in the coordinate system, it further includes:

[0280] S901: Obtain the icon information file, and based on the icon information file, obtain at least one icon and its corresponding icon position and icon attributes.

[0281] Specifically, an icon information file is obtained, which is used to create icons in batches in Unreal Engine. The icon information file includes at least one icon and the corresponding icon position and icon attributes for each icon.

[0282] In one application method, an icon information file is obtained, and all icons, as well as the icon positions and icon attributes corresponding to each icon, are read from the icon information file. The icon attributes include the icon styles of the icons.

[0283] In another application method, an icon information file is obtained, and the icons in the icon information file are used as points of interest in Unreal Engine. The points of interest are traversed to obtain the icon position and icon attributes corresponding to each icon. The icon attributes include the icon size and icon style.

[0284] S902: Generate a current icon grid body corresponding to the current icon based on the current icon position and current icon attributes.

[0285] Specifically, all icons in the icon information file are traversed. When the current icon is obtained, a current icon mesh corresponding to the current icon is generated in Unreal Engine based on the current icon position and current icon attributes. This results in a plane that matches the current icon attributes, so that target icons can be generated in batches after the traversal is completed, and the target icons can be used for point calibration.

[0286] In one application method, the icon attributes include the icon style. Based on the current icon position and current icon attributes, a plane matching the icon style is generated at the point that matches the current icon position in Unreal Engine. Based on the vertices on the plane that matches the icon style, the triangular mesh index, texture coordinates and normals corresponding to the vertices are determined. Procedural modeling functions are used to model based on the vertices, triangular mesh indexes, texture coordinates and normals corresponding to the plane, and a current icon mesh corresponding to the current icon is generated in Unreal Engine.

[0287] In another application, the icon attributes include the icon style and icon size. Based on the current icon position and current icon attributes, a plane matching the icon style and icon size is generated at the points in Unreal Engine that match the current icon position. Based on the vertices on the plane that match the icon style and icon size, the triangular mesh index, texture coordinates, and normals corresponding to the vertices are determined. Procedural modeling functions are used to model based on the vertices, triangular mesh indexes, texture coordinates, and normals corresponding to the plane, generating the current icon mesh corresponding to the current icon in Unreal Engine.

[0288] S903: Converts the current icon's properties into the texture of the current icon's mesh, generating a target icon corresponding to the current icon in Unreal Engine.

[0289] Specifically, the current icon's attributes are converted into the texture of the current icon's mesh, a texture map is applied to the current icon's mesh, and a target icon corresponding to the current icon is generated in Unreal Engine. This process continues until all icons in the icon information file are traversed, and the corresponding icons in the icon information file are generated in batches, thus improving icon generation efficiency.

[0290] In one application method, the Unreal Engine generates a texture corresponding to the current icon's mesh based on the features corresponding to the current icon's attributes. This texture is then applied to the current icon's mesh to generate the target icon corresponding to the current icon. The features corresponding to the current icon's attributes are related to the current icon's icon style.

[0291] In another application, a texture pointer variable is created in Unreal Engine, and the features corresponding to the current icon attributes are stored in the texture pointer variable so that the icon attributes are converted into the texture of the current icon mesh and a target icon corresponding to the current icon mesh is generated. The features corresponding to the current icon attributes are related to the icon style and icon size of the current icon.

[0292] S904: In response to traversing all icons in the icon information file, adjust all target icons to face the current view based on the position of all target icons and the current view of Unreal Engine.

[0293] Specifically, when traversing all icons in the icon information file, based on the deviation of each target icon relative to the current view of Unreal Engine, all target icons are adjusted to face the current view of Unreal Engine so as to facilitate observation and use of the target icons.

[0294] In one application method, the current viewpoint corresponding to the current frame in Unreal Engine is determined, the position of all target icons in the current frame is determined, and the angle of all target icons is adjusted based on the deviation of each target icon relative to the current viewpoint of Unreal Engine so that all target icons are adjusted to face the current viewpoint of Unreal Engine. Then, the deviation of the target icon from the current viewpoint is determined frame by frame, so as to keep the target icon always facing the user's current viewpoint.

[0295] In another application, Unreal Engine has a pre-set rotation function module. After traversing all icons in the icon information file, the rotation function module is called to adjust all target icons to face the current view of Unreal Engine. The rotation function module connects different function functions based on the Blueprint function in Unreal Engine to determine the position of the target icon and the current view of Unreal Engine. Then, based on the deviation of each target icon relative to the current view of Unreal Engine, the angle of all target icons is adjusted.

[0296] In this embodiment, all icons in the icon information file are obtained from the icon information file. At least one icon and its corresponding icon position and icon attribute are obtained. Based on the current icon position and current icon attribute corresponding to the current icon, a current icon mesh corresponding to the current icon is generated. The current icon attribute is converted into the texture of the current icon mesh, and a texture map is applied to the current icon mesh to generate the target icon corresponding to the current icon. After all icons in the icon information file have been traversed, the target icons are generated in batches in Unreal Engine to facilitate point calibration using the target icons. Based on the position of all target icons and the current view of Unreal Engine, all target icons are adjusted to face the current view to facilitate observation and use of the target icons.

[0297] In some implementation scenarios, step S901 specifically includes: reading the icon information file to obtain the icon position and icon attributes corresponding to all icons in the icon information file; wherein, the icon attributes include the icon size and icon style corresponding to the icon, and the icon position includes the point coordinates corresponding to the icon, and the point coordinates include longitude, latitude and altitude.

[0298] Specifically, the icon information file is obtained, and all icons in the file, along with their corresponding icon positions and attributes, are read out. Each icon is then bound to its corresponding icon position and attribute. The icon attributes include icon size and icon style, and the icon position includes the corresponding point coordinates, which include longitude, latitude, and altitude. This allows the point coordinates corresponding to the icon to be set in the geographic coordinate system and ultimately converted to the engine's global coordinates in Unreal Engine.

[0299] Furthermore, before generating the target icon corresponding to the current icon in Unreal Engine, the process of converting the current icon's attributes into the texture of the current icon's mesh also includes: converting the current icon's point coordinates to the geographic coordinate system to obtain the current icon's geographic coordinates in the geographic coordinate system; using a spatial data conversion library to convert the geographic coordinates corresponding to the current icon to the projected coordinate system to obtain the current icon's projected coordinates in the projected coordinate system; and converting the projected coordinates corresponding to the current icon to the engine global coordinate system to obtain the current icon's mesh's engine global coordinates in the engine global coordinate system.

[0300] Specifically, the system reads the longitude, latitude, and altitude of the point coordinates corresponding to the current icon from the icon information file to determine the position of the point coordinates in the geographic coordinate system. It then uses a spatial data conversion library to convert the geographic coordinates corresponding to the current icon to the projected coordinate system, obtaining the projected coordinates of the current icon in the projected coordinate system. Finally, it subtracts the origin coordinates of the engine origin from the projected coordinates of the current icon to convert the projected coordinates of the current icon to the engine global coordinate system, obtaining the engine global coordinates of the current icon mesh in the engine global coordinate system. This ensures that the current icon in Unreal Engine corresponds to its position in the real world, improving the positional accuracy of the final generated target icon.

[0301] Furthermore, based on the current icon's position and attributes, a current icon mesh corresponding to the current icon is generated, including: generating a set of mesh vertices corresponding to the current icon in Unreal Engine based on the current icon's position and attributes; wherein the set of mesh vertices includes multiple mesh vertices; and generating a current icon mesh corresponding to the current icon based on the set of mesh vertices.

[0302] Specifically, in Unreal Engine, based on the current icon position and current icon attributes, the mesh vertices corresponding to the current icon are determined, and a set of mesh vertices is generated. The set of mesh vertices includes multiple mesh vertices. Based on the set of mesh vertices, the triangular mesh index corresponding to the set of mesh vertices, as well as the texture coordinates and normals corresponding to each mesh vertex in the set of mesh vertices, are determined. Procedural modeling is used to generate the current icon mesh corresponding to the set of mesh vertices, thereby constructing the basic framework corresponding to the icon in Unreal Engine so as to generate the target icon in Unreal Engine.

[0303] In one application scenario, the mesh vertex set includes at least four mesh vertices. Based on the mesh vertex set, a current icon mesh corresponding to the current icon is generated, including: determining multiple triangular mesh indices corresponding to the mesh vertex set based on the positions of all mesh vertices in the mesh vertex set; determining the texture coordinates corresponding to the mesh vertex set based on the position of any mesh vertex in the mesh vertex set relative to the positions of other mesh vertices; determining the normals corresponding to each mesh vertex in all triangular mesh indices based on the positions of three mesh vertices in all triangular mesh indices; and in Unreal Engine, generating a current icon mesh corresponding to the current icon based on all triangular mesh indices, the normals corresponding to each mesh vertex in all triangular mesh indices, and the texture coordinates corresponding to the mesh vertex set.

[0304] Specifically, the mesh constructed based on the current icon attributes is a rectangle or other polygon. The set of mesh vertices includes at least four mesh vertices. For ease of explanation, a square mesh is used as an example. The current icon attributes include the icon size, where the height corresponds to h and the width corresponds to w, and h = w. The mesh vertices in the set of mesh vertices are (0,0,0), (0,h,0), (w,h,0), and (w,0,0), and the mesh vertex numbers are 0, 1, 2, and 3. The triangular mesh indices of the generated mesh are 0, 1, 2 and 2, 3, 0, respectively, so that the mesh can be generated based on the triangular mesh indices. The generated texture coordinates are (0,0), (0,1), (1,1), and (1,0), respectively, so as to facilitate texture mapping. The normal corresponding to each vertex is calculated to determine the lighting direction corresponding to each vertex. The vertices, triangular mesh indices, texture coordinates, and normals generated in the above steps are input, and the current icon mesh is generated using Unreal Engine's procedural modeling functions.

[0305] In a specific application scenario, based on the positions of the three vertices in all triangular mesh indices, the normals corresponding to each vertex in all triangular mesh indices are determined. This includes: based on the positions of the three vertices in each triangular mesh index, performing a cross product of the two vectors between any vertex in each triangular mesh index and the other two vertices, and normalizing the cross product result to obtain the normals corresponding to all mesh vertices.

[0306] Specifically, the normal of each vertex in the triangular mesh index is calculated. The normal is calculated by taking the cross product of two vectors formed by the vertex and the other two vertices on the triangular face where the vertex is located, and then normalizing the cross product result to obtain the vertex and thus the accurate position of the normal.

[0307] In some implementation scenarios, step S903 specifically includes: creating a texture pointer variable in the Unreal Engine, storing the icon style corresponding to the current icon in the texture pointer variable, so that the icon style corresponding to the current icon is converted into the texture of the current icon mesh, and obtaining the target icon corresponding to the current icon.

[0308] Specifically, a texture pointer variable is created in Unreal Engine, and the icon style corresponding to the current icon is stored in the texture pointer variable. In this way, the icon style corresponding to the current icon is converted into the texture of the current icon mesh in Unreal Engine. The texture is then used to map the current icon mesh to generate a target icon corresponding to the icon style. The icon style is used as the texture asset of the current icon mesh, which enables the precise creation of a target icon with a specified style in Unreal Engine.

[0309] Furthermore, after converting the current icon properties into the texture of the current icon mesh and generating the target icon corresponding to the current icon in Unreal Engine, the process also includes: creating a material pointer variable in Unreal Engine, generating a material matching the texture for the current icon mesh in the material pointer variable, and obtaining the material of the current icon mesh.

[0310] Specifically, a material pointer variable is created in Unreal Engine, a material matching the texture is generated for the current icon mesh and stored in the material pointer variable, thus obtaining the material of the current icon mesh. The material pointer variable includes parent and child nodes, and the parameters corresponding to the texture are assigned to the parent node corresponding to the material as the child node.

[0311] In a specific application scenario, the storage location of the icon at a given point is read. The image data corresponding to the icon is then read into the `CompressedData` array using the `FFileHelper::LoadFileToArray` function in Unreal Engine. Finally, a `TSharedPtr` is created using `GetImageWrapperByExtention` in Unreal Engine. <iimagewrapper>The ImageWrapper variable passes the data from the CompressedData array to ImageWrapper. A pointer variable TextPackage of type UPackage is created to store the texture asset. A pointer variable NewTexture of type UTexture2D is created in TextPackage to store the texture data. The decompressed data is obtained through ImageWrapper, and the image size, channels, and type information are assigned to NewTexture. The texture asset TextPackage is then stored.

[0312] Furthermore, first create a material node of type UMaterial, set the blending mode to semi-transparent, add a texture node of type UMaterialExpressionSample to the material node, assign the texture to the texture node, input the RGB value of the UMaterialExpressionSample node as the base color and the Alpha value as the opacity of the material node, save the material asset, and assign the material to the current icon mesh.

[0313] In some implementation scenarios, before step S901 above, the method further includes: in Unreal Engine, connecting the position function used to determine the object's position, the view function used to determine the current view of Unreal Engine, and the rotation function used to determine the angle difference to generate a rotation function module in Unreal Engine.

[0314] Specifically, by using the Blueprint feature of Unreal Engine, various functional functions are connected to obtain functional modules. Among them, in order to realize the function of rotating with the current viewpoint, the position function used to determine the position of the object, the viewpoint function used to determine the current viewpoint of Unreal Engine, and the rotation function used to determine the angle difference are connected to obtain the rotation function module, so as to make unified adjustments to multiple target icons generated in batches, thereby improving the convenience and efficiency of adjustment.

[0315] Furthermore, in response to traversing all icons in the icon information file, based on the positions of all target icons and the current view of Unreal Engine, all target icons are adjusted to face the current view. This includes: in response to traversing all icons in the icon information file, calling the rotation function module, using the position function to determine the position of all target icons, using the view function to determine the current view of Unreal Engine; using the rotation function to determine the angle difference between the position of all target icons and the current view, and adjusting all target icons to face the current view based on the angle difference corresponding to each image.

[0316] Specifically, once all icons in the icon information file have been traversed, the rotation function module is called. The position function is used to determine the position of all target icons, the view function is used to determine the current view of Unreal Engine, and the rotation function is used to determine the angle difference between the position of all target icons and the current view. Based on the angle difference corresponding to each image, all target icons are adjusted to face the current view so that they can be observed and used.

[0317] Furthermore, the side rotation function module is invoked in every frame of Unreal Engine to ensure that the target icon in Unreal Engine is always facing the current viewpoint, so as to facilitate point calibration using the target icon.

[0318] In some implementation scenarios, please refer to Figure 10 , Figure 10 This is a flowchart illustrating one implementation of the heatmap construction method based on Unreal Engine in this application. In response to traversing all icons in the icon information file, and adjusting all target icons to face the current view based on the positions of all target icons and the current view of Unreal Engine, it further includes:

[0319] S11: Obtain the thermal information file corresponding to the heat map, and obtain multiple radiation points and the location and radiation properties of each radiation point based on the thermal information file.

[0320] Specifically, the thermal information file corresponding to the heat map is obtained. The thermal information file is used to create the target heat map in Unreal Engine so that density information can be determined in Unreal Engine. The thermal information file includes multiple radiation points and the location and radiation properties of each radiation point.

[0321] In one application method, a thermal information file corresponding to the heat map is obtained, and all radiation points, as well as the location and radiation attributes of each radiation point, are read from the thermal information file. The radiation attributes include the radiation range of the radiation point.

[0322] In another application, the thermal information file corresponding to the heat map is obtained, and the radiation points are taken as points of interest. The points of interest are traversed to obtain the location and radiation attributes of each radiation point. The radiation attributes include the maximum radiation radius and radiation intensity of the radiation point. Based on the maximum radiation radius and radiation intensity, the radiation radius centered on the radiation point can be determined.

[0323] S12: Based on the location of all radiation points, determine the corresponding thermal dimensions of the heatmap in Unreal Engine.

[0324] Specifically, the locations of all radiation points are transferred to Unreal Engine, and the thermal dimensions corresponding to the heatmap are determined in Unreal Engine.

[0325] In one application approach, the positions of all radiation points are converted to the Unreal Engine's global coordinate system, and the thermal dimensions of the heatmap in Unreal Engine are determined based on the global coordinates of all radiation points.

[0326] In another application, one radiation point is extracted from all radiation points as a designated radiation point. The position of the point corresponding to the designated radiation point is transformed into the Unreal Engine's global coordinate system. The global coordinates of the designated radiation point are used as the global coordinates of the heat map in Unreal Engine. The local coordinates of all radiation points in Unreal Engine's local coordinate system are determined. Based on the local coordinates of all radiation points, the corresponding thermal dimensions of the heat map in Unreal Engine are determined.

[0327] S13: Based on the radiation properties corresponding to all radiation points, determine the radiation values ​​of all radiation points and irradiated points within the range of thermodynamic dimensions, wherein the irradiated points are distinguished from the radiation points.

[0328] Specifically, the range that a radiation point can influence is determined based on the radiation properties of all radiation points. Within the thermal dimension, the radiation values ​​of all radiation points and irradiated points are determined. Here, irradiated points are different from radiation points, as they do not have radiation properties. When radiation points are close to each other, their radiation values ​​are superimposed.

[0329] In one application method, the radiation attribute includes the radiation range of the radiation point, and the radiation value decreases linearly with respect to the radiation point within the radiation range. Based on the radiation range corresponding to the radiation point, the radiation values ​​of all radiation points and irradiated points are determined within the range of thermal dimensions. All radiation values ​​corresponding to the same radiation point or irradiated point are superimposed to determine the final radiation value at each point.

[0330] In another application, the radiation properties include the maximum radiation radius and radiation intensity of the radiation point. Based on the product between the maximum radiation radius and radiation intensity corresponding to the radiation point, the radiation values ​​of all radiation points and irradiated points are determined within the range of thermodynamic dimensions. All radiation values ​​corresponding to the same radiation point or irradiated point are superimposed to determine the final radiation value at each point.

[0331] S14: Based on the radiation values ​​corresponding to each radiating point and each radiated point, generate a thermal texture corresponding to the heat map, set the corresponding thermal material for the thermal texture, and generate a target heat map corresponding to the heat map in Unreal Engine.

[0332] Specifically, based on the radiation values ​​corresponding to each radiation point and each radiated point, the texture corresponding to the radiation value is determined, a thermal texture corresponding to the heat map is generated, and a corresponding thermal material is set for the thermal texture, thereby generating a target heat map corresponding to the heat map in Unreal Engine, so as to observe whether there are points or display the differences between multiple points and detect whether there is a correlation between different points in Unreal Engine.

[0333] In one application method, based on the radiation values ​​of each radiating point and the radiated point in Unreal Engine, a thermal texture corresponding to the radiation value is determined, the radiation value is classified, and the corresponding thermal material is set for the thermal texture based on the classification result, thereby generating a target thermal map corresponding to the heat map in Unreal Engine.

[0334] In another application, a texture pointer variable is created in Unreal Engine, and the radiation values ​​of each radiating point and the radiated point are stored in the texture pointer variable so that the radiation values ​​are converted into thermal textures of the points. A material pointer variable is created, and the thermal material of each point is determined based on the numerical value of the radiation values ​​of each radiating point and the thermal material is stored in the material pointer variable, thereby generating a target heatmap corresponding to the heatmap in Unreal Engine.

[0335] In this embodiment, all radiation points in the thermal information file are obtained, along with the location and radiation attributes of each radiation point. Based on the location of all radiation points, the thermal dimensions of the heatmap in Unreal Engine are determined. Within the range of the thermal dimensions, the radiation values ​​of all radiation points and irradiated points are determined. Based on the radiation values ​​of each radiation point and each irradiated point, a thermal texture corresponding to the heatmap is generated, and a corresponding thermal material is set for the thermal texture. A target heatmap corresponding to the heatmap is generated in Unreal Engine to determine density information, observe the presence of points, display differences between multiple points, and detect correlations between different points.

[0336] In some implementation scenarios, step S11 specifically includes: reading the thermal information file and storing all radiation points in the thermal information file, as well as the location and radiation attributes of each radiation point, into the memory of the Unreal Engine; wherein, the location includes the longitude and latitude of the radiation point, and the radiation attributes include the maximum radiation radius and radiation intensity of the radiation point.

[0337] Specifically, the thermal information file is read, and all radiation points, their corresponding locations, and radiation attributes are retrieved and stored in the Unreal Engine's memory for later retrieval. The radiation attributes include the maximum radiation radius and radiation intensity of the radiation point. Radiation intensity defines the variation in radiation intensity at the radiation point, and the maximum radiation radius defines the maximum distance radiated outward from the radiation point.

[0338] Furthermore, the location of each radiation point includes longitude and latitude, which are used to locate the position of the radiation point, and the location of the radiation point can be customized, so that the final target heat map can be set at any location in Unreal Engine.

[0339] In one application scenario, the positions of each radiation point are set in the WGS84 coordinate system, the maximum radiation radius of each radiation point is in pixels, and each pixel corresponds to an actual length unit.

[0340] Furthermore, before determining the heatmap dimensions in Unreal Engine based on the location of all radiating points, the process includes: converting the location of each radiating point to a geographic coordinate system to obtain the geographic coordinates of each radiating point in the geographic coordinate system; using a spatial data conversion library to convert the geographic coordinates of each radiating point to a projected coordinate system to obtain the projected coordinates of each radiating point in the projected coordinate system; and converting the projected coordinates of each radiating point to the engine global coordinate system to obtain the engine global coordinates of each radiating point in the engine global coordinate system.

[0341] Specifically, the longitude and latitude of each radiation point are read to determine its position in the geographic coordinate system. The geographic coordinates of the radiation points are then converted to the projected coordinate system using a spatial data conversion library. This yields the projected coordinates of the radiation points in the projected coordinate system. The origin coordinates of the engine origin are then subtracted from the projected coordinates of the radiation points to convert them to the engine's global coordinate system. This gives the engine's global coordinates of each radiation point in the engine's global coordinate system, enabling the radiation points to be ultimately converted to Unreal Engine based on their positions defined in the geographic coordinate system. This increases the degree of freedom in setting the target heatmap in Unreal Engine.

[0342] In one implementation scenario, based on the location of all radiating points, the heat map's corresponding heat map size in Unreal Engine is determined, including: determining the bounding rectangle corresponding to each radiating point based on the radiation attributes of each radiating point and the engine global coordinates of each radiating point in the engine global coordinate system; using the size of the bounding rectangle as the heat map's heat map size in Unreal Engine, and determining the engine global coordinates of the heat map in the engine global coordinate system based on the engine global coordinates corresponding to the preset corners of the bounding rectangle.

[0343] Specifically, iterate through the engine global coordinates corresponding to all radiation points, determine the extreme values ​​of the engine global coordinates among all radiation points, including the maximum and minimum values, determine the influence range of the point corresponding to the extreme value of the engine global coordinates based on the maximum radiation radius of the radiation point, determine the bounding rectangle corresponding to all radiation points based on the influence range, use the size of the bounding rectangle as the heat map size in Unreal Engine, determine the engine global coordinates corresponding to the preset corners of the bounding rectangle, and use the engine global coordinates corresponding to the preset corners as the engine global coordinates of the heat map in the engine global coordinate system.

[0344] In a specific application scenario, the preset corner is the top left corner of the circumscribed rectangle. In other application scenarios, the preset corner can also be a corner in other directions.

[0345] In another implementation scenario, based on the radiation properties corresponding to all radiation points, the radiation values ​​of all radiation points and irradiated points are determined within the range of thermal dimensions. This includes: generating a radiation matrix corresponding to the heat map based on the thermal dimensions; determining the matrix position of each radiation point in the radiation matrix based on the engine global coordinates of each radiation point in the engine global coordinate system; and determining the radiation values ​​of all radiation points and all irradiated points in the radiation matrix based on the matrix position, radiation intensity, and maximum radiation radius of each radiation point.

[0346] Specifically, an array of size matching the thermal dimension is initialized as the radiation matrix corresponding to the heat map. Each radiation point is traversed, and based on its global coordinates in the engine's global coordinate system, its position in the radiation matrix is ​​determined. This means transforming each radiation point into the radiation matrix. Then, based on the maximum radiation radius and intensity of the current radiation point, its radiation range is determined. Within the radiation range of the current radiation point, the radiation values ​​corresponding to all points within that range are determined. After traversing all radiation points in the radiation matrix, if the same radiation point or radiated point corresponds to multiple radiation values, all radiation values ​​corresponding to the same radiation point or radiated point are superimposed to determine the final radiation values ​​corresponding to each radiation point and radiated point. This ensures that the radiation values ​​corresponding to all radiation points and radiated points are determined within the range corresponding to the thermal dimension.

[0347] In one application scenario, based on the matrix position, radiation intensity, and maximum radiation radius corresponding to each radiation point, the radiation values ​​of all radiation points and all irradiated points in the radiation matrix are determined. This includes: in response to traversing to the current radiation point, determining the radiation range corresponding to the current radiation point and the radiation receiving points within the radiation range based on the matrix position and maximum radiation radius corresponding to the current radiation point, wherein the current radiation point includes the radiation points extracted sequentially from the radiation matrix; determining the sub-radiation values ​​of all radiation receiving points within the radiation range corresponding to the current radiation point based on the distance between each radiation receiving point and the current radiation point, as well as the radiation intensity and maximum radiation radius corresponding to the current radiation point; and in response to traversing all radiation points in the radiation matrix, adding the original radiation value and all sub-radiation values ​​corresponding to each radiation point to obtain the radiation value corresponding to each radiation point, and adding all sub-radiation values ​​corresponding to each irradiated point to obtain the radiation value corresponding to each irradiated point.

[0348] Specifically, the radiation points are traversed sequentially from the radiation matrix. After obtaining the current radiation point, the radiation range corresponding to the current radiation point and the radiation receiving point within the radiation range are determined based on the matrix point position and the maximum radiation radius of the current radiation point. When traversing to the current radiation point, all points within the radiation range of the current radiation point are radiation receiving points. Therefore, the radiation receiving point can be another radiation point different from the current radiation point or a radiation receiving point.

[0349] Furthermore, the process iterates through every radiation receiving point within the radiation range, calculating the distance from each receiving point within the range to the current radiation point. Based on these distances, the sub-radiation value of the current radiation point relative to each receiving point within the radiation range is calculated. After iterating through all radiation points in the radiation matrix, the original radiation value corresponding to each radiation point is added to all the receivable sub-radiation values ​​to obtain the radiation value corresponding to each radiation point. Similarly, all receivable sub-radiation values ​​corresponding to each radiated point are added to obtain the radiation value corresponding to each radiated point, thereby improving the accuracy of the radiation values ​​for each radiation point and radiated point. The above process can be expressed using the following formula:

[0350]

[0351] Where S represents the radiation intensity, D represents the distance from the current pixel to the radiation point, and R represents the maximum radiation radius. This means that the ratio of D to R is truncated to 0-1, where 0 is taken if it is less than 0 and 1 is taken if it is greater than 1.

[0352] Optionally, when the radiation value corresponding to any radiation point or irradiated point exceeds the upper limit of radiation, the radiation value of the corresponding point is set to the upper limit of radiation to prevent radiation value overflow.

[0353] In a specific application scenario, the radiation matrix corresponds to an array of type FColor with an RGB value of 0 and an opacity of 255, matching the thermal size, and the radiation upper limit is 255.

[0354] In some implementation scenarios, step S14 specifically includes: creating a texture pointer variable in Unreal Engine, storing the radiation values ​​corresponding to each radiating point and each radiated point in the texture pointer variable to obtain a thermal texture corresponding to the heatmap; classifying each radiating point into multiple radiation class sets based on the radiation values ​​corresponding to each radiating point and each radiated point to obtain multiple radiation class sets; wherein each radiation class set corresponds to a radiation value range, and the radiation values ​​corresponding to the radiating points and / or radiated points in the same radiation class set belong to the same radiation value range; setting a material style matching the radiation class set for the thermal texture corresponding to the radiating points and / or radiated points in each radiation class set to obtain a thermal material corresponding to the thermal texture; wherein the material style is related to the radiation value range; creating a material pointer variable in Unreal Engine, storing the thermal material in the material pointer variable, and generating a target heatmap corresponding to the heatmap.

[0355] Specifically, a texture pointer variable is created in Unreal Engine, and the radiation values ​​corresponding to each radiating point and each radiated point are stored in the texture pointer variable so that the radiation values ​​are converted into thermal textures, resulting in thermal textures corresponding to the heatmap.

[0356] Furthermore, based on the numerical values ​​of the radiation values ​​corresponding to each radiating point and each radiated point, the radiating points are categorized by value, resulting in multiple radiation categorization sets. Each radiation categorization set corresponds to a radiation value range. The radiation values ​​corresponding to radiating points and / or radiated points within the same radiation categorization set belong to the same radiation value range. That is, the same radiation categorization set may contain only radiating points, only radiated points, or both. For the thermal textures corresponding to the radiating points and / or radiated points in each radiation categorization set, a material style matching the radiation categorization set is set to obtain the thermal material corresponding to the thermal texture. The material style is related to the radiation value range; that is, each radiation categorization set corresponds to one material style. The same material style is set for radiating points and / or radiated points within the same radiation categorization set, thus forming a gradient change in the material to facilitate observation of radiation value changes. A material pointer variable is created in Unreal Engine, and the thermal material is stored in the material pointer variable to generate the target heatmap corresponding to the heatmap.

[0357] In a specific application scenario, a pointer variable Texture2D of type UTexture2D is created to store texture data, a pointer variable Mip of type FTexture2DMipMap is created, the RGBA values ​​of the radiation intensity matrix are written into the BulkData of Mip, and the Mip is assigned to the Mips of the PlatformData of Texture2D.

[0358] Furthermore, create a new material pointer variable, set the material node in the material pointer variable to the non-illuminating property, and then add four constant nodes to set the material style. The color of each material style is adjustable. The range with the largest radiation value corresponds to red, and the range with the smallest radiation value corresponds to green. This is to facilitate the observation of whether there are points or to display the differences between multiple points and to detect whether there is a correlation between different points in Unreal Engine.

[0359] Optionally, based on the radiation values ​​corresponding to each radiating point and each radiated point, a thermal texture corresponding to the heatmap is generated, and a corresponding thermal material is set for the thermal texture. After generating the target heatmap corresponding to the heatmap in Unreal Engine, the process further includes: generating a thermal object corresponding to the heatmap in Unreal Engine; wherein the thermal object includes position attributes, mesh attributes, and material attributes; generating a set of mesh vertices corresponding to the heatmap in Unreal Engine based on the thermal dimensions; wherein the set of mesh vertices includes multiple mesh vertices; generating a thermal mesh body corresponding to the thermal object based on the set of mesh vertices; setting a thermal texture and thermal material for the thermal mesh body, and generating the target heatmap corresponding to the thermal mesh body; wherein the position attribute is used to store the point positions corresponding to each radiating point, the mesh attribute is used to store the thermal mesh body corresponding to the thermal object, and the material attribute is used to store the thermal material.

[0360] Specifically, a thermal object ADynamicActor is generated in Unreal Engine to match the raster data. This thermal object ADynamicActor inherits from the base class object AActor in Unreal Engine. The thermal object includes position attributes, mesh attributes, and material attributes.

[0361] Furthermore, a mesh matching the thermal dimensions is generated in Unreal Engine. The vertices of the mesh are determined to obtain a set of mesh vertices, which includes multiple mesh vertices. Based on the set of mesh vertices, the triangular mesh index corresponding to the set of mesh vertices, as well as the texture coordinates and normals corresponding to each mesh vertex in the set of mesh vertices, are determined. Procedural modeling is used to generate a thermal mesh corresponding to the set of mesh vertices. Thermal textures and thermal materials are set for the thermal mesh, and a target heatmap corresponding to the thermal mesh is generated. By creating a thermal mesh, the target heatmap can be created at the location corresponding to the thermal mesh in Unreal Engine, so that the target heatmap can be called individually.

[0362] Understandably, the location attribute is used to store the position of each radiation point, the mesh attribute is used to store the thermal mesh corresponding to the thermal object, and the material attribute is used to store the thermal material, thus providing storage space for the position of the radiation point, the thermal mesh corresponding to the thermal object, and the thermal material.

[0363] In one application scenario, the set of mesh vertices includes at least four mesh vertices. Based on the set of mesh vertices, a thermal mesh corresponding to the thermal object is generated, including: determining multiple triangular mesh indices corresponding to the set of mesh vertices based on the positions of all mesh vertices in the set; determining the texture coordinates corresponding to the set of mesh vertices based on the position of any mesh vertex relative to the positions of other mesh vertices; determining the normals corresponding to each mesh vertex in all triangular mesh indices based on the positions of three mesh vertices in all triangular mesh indices; and generating a thermal mesh corresponding to the thermal object in Unreal Engine based on all triangular mesh indices and the normals and texture coordinates corresponding to each mesh vertex.

[0364] Specifically, the mesh constructed based on thermal dimensions is a rectangle or other polygon. The set of mesh vertices includes at least four mesh vertices. For ease of explanation, a square mesh is used as an example. The thermal dimension has a height of h and a width of w, and h = w. The mesh vertices in the set of mesh vertices are (0,0,0), (0,h,0), (w,h,0), and (w,0,0). The mesh vertex numbers are 0, 1, 2, and 3. The triangular mesh indices of the generated mesh are 0, 1, 2 and 2, 3, 0, respectively, so that the mesh can be generated based on the triangular mesh indices. The generated texture coordinates are (0,0), (0,1), (1,1), and (1,0), respectively, so as to facilitate texture mapping. The normal corresponding to each vertex is calculated to determine the lighting direction corresponding to each vertex. The vertices, triangular mesh indices, texture coordinates, and normals generated in the above steps are input, and the thermal mesh is generated using Unreal Engine's procedural modeling functions.

[0365] In a specific application scenario, based on the positions of the three vertices in all triangular mesh indices, the normals corresponding to each vertex in all triangular mesh indices are determined. This includes: based on the positions of the three vertices in each triangular mesh index, performing a cross product of the two vectors between any vertex in each triangular mesh index and the other two vertices, and normalizing the cross product result to obtain the normals corresponding to all mesh vertices.

[0366] Specifically, the normal of each vertex in the triangular mesh index is calculated. The normal is calculated by taking the cross product of two vectors formed by the vertex and the other two vertices on the triangular face where the vertex is located, and then normalizing the cross product result to obtain the vertex and thus the accurate position of the normal.

[0367] Understandably, after obtaining the target icon and target heat map, the target icon and target heat map are added to the virtual model to facilitate point location marking and density information determination.

[0368] Furthermore, after adding target icons and target heatmaps to the virtual model, the process also includes: enabling the weather control plugin in Unreal Engine and using the weather control plugin to build a weather system in the virtual model; wherein, the weather system includes a variety of weather conditions.

[0369] Specifically, a set of weather presets is created in the weather control plugin. This set is equivalent to a set of parameters for specific weather conditions, including sunny, cloudy, rainy, snowy, and foggy weather. By setting the planet radius, editing time, and selecting weather presets in the weather control plugin, the weather conditions of a specific weather system at a specified time can be called. The parameter setting interface of the weather system is passed to the running interface through UMG, which enables the function of switching weather systems during runtime, thereby improving the realism of the virtual model.

[0370] In a specific application scenario, the weather control plugin is the SkyCreator plugin in Unreal Engine. The plugin creates a sky sphere that matches the Earth's atmosphere and simulates real weather conditions by setting related attributes such as the sky sphere, sky atmosphere, volumetric clouds, skylight, sun, moon, exponential altitude fog, star map, obstruction, wind, weather effects, weather material effects, and contact.

[0371] Please see Figure 11 , Figure 11 This is a schematic diagram of the structure of an embodiment of the electronic device of this application. The electronic device 110 includes a memory 1101 and a processor 1102 coupled to each other. The memory 1101 stores program data (not shown in the figure), and the processor 1102 calls the program data to implement the method in any of the above embodiments. For the description of the relevant content, please refer to the detailed description of the above method embodiments, which will not be repeated here.

[0372] Please see Figure 12 , Figure 12 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 120 stores program data 1200. When the program data 1200 is executed by the processor, it implements the method in any of the above embodiments. For related descriptions, please refer to the detailed description of the above method embodiments, which will not be repeated here.

[0373] It should be noted that the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0374] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0375] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.< / iimagewrapper>

Claims

1. A model building method based on Unreal Engine, characterized in that, The method includes: Building a coordinate system in Unreal Engine; Obtain DEM images, raster data, and vector data based on remote sensing images; import the DEM images, raster data, and vector data into the Unreal Engine to generate terrain corresponding to the DEM images, maps corresponding to the raster data, and planar and 3D representations corresponding to the vector data. Based on the positions of the terrain, the map, the plane, and the solid in the coordinate system, a virtual model corresponding to the remote sensing image is generated in the Unreal Engine. Obtain an icon information file, and based on the icon information file, obtain at least one icon and its corresponding icon position and icon attributes; Based on the current icon's position and attributes, generate a current icon grid corresponding to the current icon. The current icon attribute is converted into the texture of the current icon mesh, and a target icon corresponding to the current icon is generated in the Unreal Engine. In response to iterating through all icons in the icon information file, all target icons are adjusted to face the current view based on the position of all target icons and the current view of the Unreal Engine.

2. The model construction method based on Unreal Engine according to claim 1, characterized in that, The construction of a coordinate system in Unreal Engine includes: Import geographic coordinate system and projected coordinate system into Unreal Engine; wherein, the geographic coordinate system and the projected coordinate system are related to the Global Positioning System; Create a geographic global object in the Unreal Engine. Based on the position of the geographic global object in the geographic coordinate system, obtain the engine origin of the Unreal Engine. Transform the engine origin from the geographic coordinate system to the projected coordinate system to obtain the origin coordinates of the engine origin. An engine global coordinate system and an engine local coordinate system are established based on the origin coordinates; wherein, the engine global coordinate system takes the origin coordinates as its origin, and the engine local coordinate system takes the engine global coordinates of the object in the Unreal Engine in the engine global coordinate system as its origin; Determine the transformation relationship between any two of the geographic coordinate system, the projected coordinate system, the engine global coordinate system, and the engine local coordinate system to obtain the coordinate system within the Unreal Engine.

3. The model construction method based on Unreal Engine according to claim 1, characterized in that, The process of obtaining DEM imagery, raster data, and vector data based on remote sensing images, importing the DEM imagery, raster data, and vector data into the Unreal Engine, and generating terrain corresponding to the DEM imagery, a map corresponding to the raster data, and planar and 3D representations corresponding to the vector data includes: Obtain a DEM image based on remote sensing images, import the DEM image into the Unreal Engine, and generate terrain corresponding to the DEM image in the Unreal Engine; and... Obtain raster data based on remote sensing images, import the raster data into the Unreal Engine, and generate a map corresponding to the raster data in the Unreal Engine; and... Obtain vector data based on remote sensing images, import the vector lines or vector surfaces from the vector data into the Unreal Engine, and generate a plane corresponding to the vector data in the Unreal Engine; and... Vector data based on remote sensing images is obtained, and the vector surfaces in the vector data are imported into the Unreal Engine to generate a solid model corresponding to the vector data in the Unreal Engine.

4. The model construction method based on Unreal Engine according to claim 3, characterized in that, The process of obtaining a DEM image based on remote sensing images, importing the DEM image into the Unreal Engine, and generating terrain corresponding to the DEM image in the Unreal Engine includes: Obtain a DEM image based on remote sensing images, and determine the image size of the DEM image; Based on the image size and the image size threshold in the Unreal Engine, the DEM image is divided into at least one image block, and the image sub-size of each image block is determined. For each image block, based on the image sub-size corresponding to the image block, generate the terrain size, terrain height and terrain coordinates corresponding to the image block, and at the terrain coordinates in the Unreal Engine, generate a terrain object that matches the terrain size and terrain height; Based on the terrain objects generated from all image blocks, terrain corresponding to the DEM image is generated in Unreal Engine.

5. The model construction method based on Unreal Engine according to claim 3, characterized in that, Obtaining raster data based on remote sensing images, importing the raster data into the Unreal Engine, and generating a map corresponding to the raster data in the Unreal Engine includes: Raster data obtained from remote sensing images is acquired, and the raster data is converted into a raster data matrix; wherein the raster matrix size of the raster data matrix is ​​related to the data size of the raster data; Based on the raster matrix size of the raster data matrix, a map grid volume corresponding to the raster data is generated; The raster data is converted into the texture of the map grid, and a map corresponding to the raster data is generated in the Unreal Engine.

6. The model construction method based on Unreal Engine according to claim 3, characterized in that, The process of obtaining vector data based on remote sensing images, importing vector lines or vector surfaces from the vector data into the Unreal Engine, and generating a plane corresponding to the vector data in the Unreal Engine includes: Obtain vector data based on remote sensing images, and extract the vector lines and vector surfaces from the vector data; Generate a flat object in the Unreal Engine; In response to the vector line corresponding to the planar object, all contour points in the vector line are added to the planar object to obtain the first original vertex in the planar object. The width of the first original vertex in the planar object is expanded to obtain the new vertex. Based on the first original vertex and the new vertex, a planar mesh corresponding to the vector line is obtained. In response to the plane object corresponding to the vector surface, all contour points in the vector surface are added to the plane object to obtain the second original vertex in the plane object, and a plane mesh corresponding to the vector surface is obtained based on the second original vertex; Assign a material to the planar mesh corresponding to the vector line or the vector surface, and generate a plane corresponding to the vector data in the Unreal Engine.

7. The model construction method based on Unreal Engine according to claim 3, characterized in that, The process of obtaining vector data based on remote sensing images, importing the vector surfaces from the vector data into the Unreal Engine, and generating a solid model corresponding to the vector data in the Unreal Engine includes: Obtain vector data based on remote sensing images, extract vector surfaces from the vector data, and determine the height characteristics of the vector surfaces; In the Unreal Engine, a 3D object is generated, and all the contour points of the vector plane are added to the 3D object to obtain the planar vertices of the 3D object. Based on the planar vertices, a 3D mesh corresponding to the 3D object is obtained; wherein, the 3D mesh includes height vertices that match the planar vertices, and the position of the height vertices in the Unreal Engine is related to the height feature; Assign a material to the 3D mesh and generate a 3D model corresponding to the vector data in the Unreal Engine.

8. The model construction method based on Unreal Engine according to claim 1, characterized in that, The response, after traversing all icons in the icon information file and adjusting all target icons to face the current view based on the positions of all target icons and the current view of the Unreal Engine, further includes: Obtain the thermal information file corresponding to the heat map, and based on the thermal information file, obtain multiple radiation points and the location and radiation properties of each radiation point; Based on the location of all the radiation points, the thermal dimensions of the heat map in the Unreal Engine are determined. Based on the radiation properties corresponding to all the radiation points, the radiation values ​​of all the radiation points and the irradiated points are determined within the range of the thermal dimension; wherein, the irradiated point is distinct from the radiation point; Based on the radiation values ​​corresponding to each radiation point and each radiation-receiving point, a thermal texture corresponding to the heat map is generated, and a corresponding thermal material is set for the thermal texture. A target heat map corresponding to the heat map is generated in the Unreal Engine. Add the target icon and the target heatmap to the virtual model.

9. The model construction method based on Unreal Engine according to claim 8, characterized in that, After adding the target icon and the target heatmap to the virtual model, the process further includes: A weather control plugin is enabled in the Unreal Engine, and a weather system is constructed in the virtual model using the weather control plugin; wherein the weather system includes a variety of weather conditions.

10. An electronic device, characterized in that, include: A memory and a processor are coupled to each other, wherein the memory stores program data, and the processor invokes the program data to perform the method as described in any one of claims 1-9.

11. A computer-readable storage medium storing program data thereon, characterized in that, When the program data is executed by the processor, the method as described in any one of claims 1-9 is implemented.

Citation Information

Patent Citations

  • Three-dimensional geographical scene simulation method for virtual emergency exercises

    CN104318617A