Map data processing method and device, electronic equipment and storage medium

By loading game scenes in chunks and adding material information, the problem of low terrain data loading efficiency is solved, achieving the effects of fast preview and efficient terrain data processing.

CN119925937BActive Publication Date: 2026-01-27NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510024714.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2026-01-27
Estimated Expiration
2045-01-07

AI Technical Summary

Technical Problem

During game development, the terrain data loading efficiency is low when outputting contour maps, which makes it impossible to quickly preview the map corresponding to the terrain data. In addition, when the data volume is large, the import and export time is increased, which affects the processing efficiency.

Method used

The target scene is divided into several blocks. The terrain data of each block is loaded through a virtual camera and shooting perspective. Scene material information is added and screenshots are taken to output a set of terrain images.

Benefits of technology

It improves map loading efficiency, simplifies data flow processes, reduces the difficulty of use, and enables fast previewing and efficient processing of terrain data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119925937B_ABST
    Figure CN119925937B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a kind of map data processing method, device, electronic equipment and storage medium, it is related to game development technical field, the method comprises: obtaining the terrain data corresponding to target scene, the target scene is divided into several blocks;Determine the virtual camera for the target scene and the shooting visual angle corresponding to the virtual camera;Obtain the coordinate information corresponding to each block, and according to the shooting visual angle and the coordinate information, the terrain data corresponding to each block is loaded in turn, obtains the scene graph corresponding to the target scene;Determine at least one scene material information for the scene graph, and add the image effect corresponding to the scene material information for the scene graph, display the target scene corresponding to the target scene graph;The screenshot of the target scene graph is carried out, and the terrain image set corresponding to the target scene graph is output, improve the efficiency of data flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game development technology, and in particular to a method for processing map data, a device for processing map data, an electronic device, and a computer-readable storage medium. Background Technology

[0002] In game development, game engines are widely used in fields such as game development, virtual reality, and architectural visualization. Their powerful rendering and post-processing capabilities make them ideal for handling complex graphics tasks. In managing and optimizing large-scale game worlds, it is often necessary to dynamically load and unload different parts of the game world within the engine to optimize memory and performance. Additionally, it is necessary to export the game world's terrain data to corresponding terrain creation software to output contour maps. However, outputting contour maps often requires loading the corresponding terrain data first. Loading limitations prevent quick previewing of maps corresponding to specific terrain data. Furthermore, as the size of the terrain increases, the amount of data it contains also increases. When data needs to be transferred between multiple processing software programs, this can increase import and export times, lengthen the processing flow, and severely impact processing efficiency. Summary of the Invention

[0003] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for processing map data, to solve or partially solve problems such as slow map loading efficiency and cumbersome processing procedures in the process of exporting contour maps corresponding to the terrain of a game world.

[0004] This invention discloses a method for processing map data, including:

[0005] Acquire terrain data corresponding to the target scene, which is divided into several blocks;

[0006] Determine the virtual camera for the target scene and the corresponding shooting angle of the virtual camera;

[0007] Obtain the coordinate information corresponding to each of the blocks, and load the terrain data corresponding to each block in sequence according to the shooting angle and the coordinate information to obtain the scene map corresponding to the target scene;

[0008] Determine at least one scene material information for the scene graph, add image effects corresponding to the scene material information to the scene graph, and display the target scene graph corresponding to the target scene;

[0009] Take a screenshot of the target scene map and output the terrain image set corresponding to the target scene map.

[0010] This invention also discloses a map data processing apparatus, comprising:

[0011] The data acquisition module is used to acquire terrain data corresponding to the target scene, which is divided into several blocks;

[0012] A camera determination module is used to determine a virtual camera for the target scene and the shooting angle corresponding to the virtual camera;

[0013] The loading module is used to obtain the coordinate information corresponding to each of the blocks, and load the terrain data corresponding to each block in sequence according to the shooting angle and the coordinate information to obtain the scene map corresponding to the target scene.

[0014] An image processing module is used to determine at least one scene material information for the scene image, add image effects corresponding to the scene material information to the scene image, and display the target scene image corresponding to the target scene.

[0015] The image capture module is used to capture the target scene map and output the terrain image set corresponding to the target scene map.

[0016] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0017] The memory is used to store computer programs;

[0018] When the processor executes a program stored in the memory, it implements the method described in the embodiments of the present invention.

[0019] This invention also discloses a computer-readable storage medium storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this invention.

[0020] The embodiments of the present invention have the following advantages:

[0021] In this embodiment of the invention, regarding the terrain data processing of the target scene, when a user edits the terrain of the target scene and needs to export the corresponding data for further processing in another graphics processing software, the user can export the terrain image set corresponding to the target scene through a corresponding plugin. This allows the user's modifications to the target scene's terrain to be reflected in the corresponding scene map. Specifically, this can be achieved by acquiring the terrain data corresponding to the target scene, dividing the target scene into several blocks, determining the virtual camera for the target scene and its corresponding shooting angle, and during the loading process, acquiring the coordinate information corresponding to each block, and then sequentially processing the terrain data corresponding to each block according to the shooting angle and coordinate information. The system loads the shape data to obtain the scene map corresponding to the target scene. By dividing the entire scene into several small blocks that support fast loading, the map loading efficiency is improved and the data loading time is reduced. Furthermore, by determining at least one scene material information for the scene map and adding image effects corresponding to the scene material information to the scene map, the target scene map corresponding to the target scene is displayed. Then, a screenshot of the target scene map is taken, and the terrain image set corresponding to the target scene map is output. By taking a screenshot of the scene map with the corresponding materials added, users can import the terrain image set into the corresponding image processing software for further map management and processing, simplifying the data flow process and reducing the difficulty of use. Attached Figure Description

[0022] Figure 1 This is a flowchart of the steps of a map data processing method provided in an embodiment of the present invention;

[0023] Figure 2 This is a top view of the target scene provided in the embodiments of the present invention;

[0024] Figure 3 This is a top view of the target scene provided in the embodiments of the present invention;

[0025] Figure 4 This is a schematic diagram of the target scene provided in the embodiments of the present invention;

[0026] Figure 5 This is a schematic diagram of the target scene provided in the embodiments of the present invention;

[0027] Figure 6 This is a schematic diagram of the target scene provided in the embodiments of the present invention;

[0028] Figure 7 This is a schematic diagram of the target scene provided in the embodiments of the present invention;

[0029] Figure 8 This is a structural block diagram of a map data processing device provided in an embodiment of the present invention. Detailed Implementation

[0030] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0031] As an example, after a user modifies the terrain of a scene in a graphics processing software, the modified terrain data needs to be exported and imported into another graphics processing software. As the size of the terrain increases, the amount of data it contains also increases. When the data needs to be transferred between multiple processing software programs, it can easily increase the import and export time, increase the processing flow, and seriously affect the processing efficiency.

[0032] In this invention, regarding the processing of terrain data for a target scene, if a user needs to export the corresponding data for further processing in another graphics processing software after editing the terrain of the target scene, the user can export the terrain image set corresponding to the target scene through a corresponding plugin. This allows the user's modifications to the terrain of the target scene to be reflected in the corresponding scene map. Specifically, this can be achieved by acquiring the terrain data corresponding to the target scene, dividing the target scene into several blocks, determining the virtual camera for the target scene and its corresponding shooting angle, and acquiring the coordinate information corresponding to each block during the loading process. Then, based on the shooting angle and coordinate information, the terrain data corresponding to each block is processed sequentially. The system loads the shape data to obtain the scene map corresponding to the target scene. By dividing the entire scene into several small blocks that support fast loading, the map loading efficiency is improved and the data loading time is reduced. Furthermore, by determining at least one scene material information for the scene map and adding image effects corresponding to the scene material information to the scene map, the target scene map corresponding to the target scene is displayed. Then, a screenshot of the target scene map is taken, and the terrain image set corresponding to the target scene map is output. By taking a screenshot of the scene map with the corresponding materials added, users can import the terrain image set into the corresponding image processing software for further map management and processing, simplifying the data flow process and reducing the difficulty of use.

[0033] Reference Figure 1 The diagram illustrates a flowchart of a map data processing method provided in an embodiment of the present invention, which may specifically include the following steps:

[0034] Step 101: Obtain terrain data corresponding to the target scene, wherein the target scene is divided into several blocks;

[0035] Optionally, the present invention can be applied to graphics processing software. A plugin matching the technical solution of the present invention can be created and run in the graphics processing software so that the user can input the corresponding operation to execute the technical solution corresponding to the present invention.

[0036] Among them, graphics processing software can be software that processes terrain data, such as software that processes the terrain of game scenes. In practical applications, users can edit the game scene in graphics processing software ①. Based on the editing results, users can export the corresponding terrain data in graphics processing software ① and import the exported terrain data into graphics processing software ② for further processing to meet the user's actual needs.

[0037] In one example, a user can edit the terrain of a target scene in graphics processing software ①, and then export the corresponding terrain image set, such as a contour map, based on the editing results.

[0038] In this embodiment of the invention, the user can process the terrain data of the target scene in the corresponding graphics processing software. Specifically, the user can run the corresponding plugin in the graphics processing software and input the corresponding operation through the software graphical interface provided by the plugin. For example, the software graphical interface can provide a data import interface, through which the user can import the terrain data of the target scene so that the terrain data can be loaded in the graphics processing software to display the terrain corresponding to the target scene.

[0039] It's worth noting that, to improve terrain data loading efficiency, the plugin can segment the target scene into several identical, fast-loading segments. Furthermore, to further enhance loading efficiency, these segments can be further subdivided into smaller sub-segments. For example, a target scene can be divided into 25 segments, and each segment can be further subdivided into 25 sub-segments, resulting in 25 groups of sub-segments, totaling 625 sub-segments. During loading, terrain data for the target scene can be loaded in units of "segments," thereby improving loading efficiency and reducing loading time.

[0040] Step 102: Determine the virtual camera for the target scene and the corresponding shooting angle of the virtual camera;

[0041] After importing the terrain data corresponding to the target scene, users can enter the corresponding settings to configure the virtual camera for the target scene and the shooting angle of the virtual camera.

[0042] The virtual camera is a tool for loading terrain data of a target scene, while the shooting angle is the perspective from which the target scene is captured. By creating a corresponding virtual camera in the graphics processing software and setting the corresponding shooting angle, the loading range of the target scene can be precisely controlled to improve the loading efficiency of terrain data.

[0043] It's worth noting that after determining the virtual camera for the target scene, users can also create a post-processing box for the virtual camera in graphics processing software using a plugin, and set the virtual camera within the post-processing box. The post-processing box contains different post-processing material information. Post-processing refers to additional processing of the image after rendering the scene to enhance visual effects, such as adding various special effects like depth of field, motion blur, and color correction.

[0044] In its implementation, by placing a virtual camera in a post-processing box and turning on the corresponding material processing switch, the virtual camera can apply the post-processing material information configured in the post-processing box to process the loaded target scene, thereby obtaining a target scene image with added material information. Furthermore, the post-processing material information configured in the plugin can be made available to users through a corresponding interface. Users can select the appropriate post-processing material information and begin adding materials through this interface; this invention does not impose any limitations on this.

[0045] Step 103: Obtain the coordinate information corresponding to each of the blocks, and load the terrain data corresponding to each block in sequence according to the shooting angle and the coordinate information to obtain the scene map corresponding to the target scene;

[0046] After importing the relevant terrain data and determining the virtual camera, the terrain data can be loaded using the virtual camera. Specifically, since the target scene is divided into several blocks, during the loading process, the coordinate information corresponding to each block can be obtained first, and the terrain data corresponding to each block can be loaded sequentially according to the shooting angle and coordinate information to obtain the scene map corresponding to the target scene. By dividing the entire scene into several small blocks that support fast loading, the amount of data loaded is reduced by loading them one by one during the loading process, thereby effectively improving the overall loading efficiency and reducing the data loading time.

[0047] In some feasible implementations, the coordinate information can be the center coordinates of the blocks, and the shooting perspective can be an orthogonal perspective. Therefore, the terrain data loading process can be performed by loading the terrain data of each block sequentially along each center coordinate according to the orthogonal perspective, and obtaining the scene map corresponding to the target scene based on the loading results. Specifically, by setting the shooting perspective of the virtual camera to an orthogonal perspective, the size of all objects in the image does not change with distance.

[0048] In addition, refer to Figure 2 The diagram shows a top view of the target scene provided in an embodiment of the present invention. To more intuitively illustrate the segmentation process of the target scene, in... Figure 2In the image, the target scene is presented from a vertical top-down perspective. Assuming the target scene is divided into 25 blocks, and each block is further divided into 25 sub-blocks, the center coordinates can be the coordinates of the center point of the sub-block located in the middle of each block. Specifically, it can be the coordinates of the sub-block in the horizontal plane, i.e. (x, y). The loading position of the virtual camera when loading terrain data can be determined through these center coordinates.

[0049] In practical implementation, to further improve the loading efficiency of terrain data, a corresponding sequence marker can be set for each block. During the loading process of terrain data, by obtaining the sequence markers corresponding to each block, the virtual camera is controlled to move directly above the position of each center coordinate according to the order of the sequence markers. The terrain data of the block is loaded from an orthogonal perspective. Based on the recorded results, the scene map corresponding to the target scene is obtained. By dividing the entire scene into several small blocks that support fast loading, and loading them one by one in the corresponding order, the amount of data loaded is reduced, thereby effectively improving the overall loading efficiency and reducing the data loading time.

[0050] For example, refer to Figure 3 This illustration shows a top view of the target scene provided in this embodiment of the invention. During the loading of terrain data, the presentation view of the graphics processing software is first set to the shooting view of the virtual camera. Then, the virtual camera can be controlled to move sequentially above the center coordinates of the blocks A-4_B-4, A-3_B-4, A-2_B-4, A-1_B-4, A-0_B-4, A-3_B-4, etc., of the target scene to load the terrain data of the corresponding blocks. By dividing the entire scene into several small blocks that support fast loading, and loading them one by one in the corresponding order, the amount of data loaded is reduced, thereby effectively improving the overall loading efficiency and reducing the data loading time.

[0051] Step 104: Determine at least one scene material information for the scene image, add image effects corresponding to the scene material information to the scene image, and display the target scene image corresponding to the target scene;

[0052] Once the plugin has fully loaded the terrain data corresponding to the target scene, it can obtain the corresponding scene map. Simultaneously, based on user needs, if the user inputs a corresponding material addition command in the plugin, it can respond to the material addition command for the target scene by extracting at least one scene material information corresponding to the material addition command from the post-processing material information configured in the post-processing box. Then, it adds the image effect corresponding to the scene material information to the scene map to display the target scene map in the graphics processing software. Thus, by configuring the corresponding post-processing material information in the plugin, users can add corresponding materials to the target scene according to their actual needs to obtain images that meet their requirements, such as contour maps, topographic maps, etc. This invention does not impose any limitations on this.

[0053] In some feasible implementations, scene material information includes contour line material information, height color material information, and model color material information. Contour line material information can be used to process the scene map to obtain the corresponding contour map. Height color material information can be used to process the scene map to obtain the corresponding terrain height map. Model color material information can be used to process the scene model in the target scene to obtain the corresponding model color map. Thus, the contour map can intuitively present the terrain height corresponding to the target scene, the terrain height map can intuitively present the height changes corresponding to the target scene, and the model color map can intuitively present the relevant scene models in the target scene.

[0054] In the specific implementation, if the scene material information is contour line material information, the contour lines corresponding to the target scene are calculated and displayed in the scene map, showing the contour map corresponding to the target scene. If the scene material information is height and color material information, the terrain color corresponding to the target scene is calculated, and the scene map is colored according to the terrain color, displaying the terrain height map corresponding to the target scene based on the coloring result. If the scene material information is model color material information, the scene model is identified from the scene map, the target scene model is extracted from the scene model, the display color corresponding to the target scene model is obtained, and the target scene model is colored according to the display color, displaying the model color map corresponding to the target scene based on the coloring result.

[0055] The contour line processing involves acquiring the height information of each pixel in the scene image within the world coordinate system, along with the contour line interval values. The world coordinate system is constructed based on the depth map data of the target scene and the position information of the virtual camera. Then, the height information and contour line interval values ​​are used to calculate the detection value corresponding to each pixel. Pixels in the target scene with detection values ​​less than a preset threshold are designated as first pixels, and pixels with detection values ​​greater than or equal to the preset threshold are designated as second pixels. The first pixels in the target scene are then set to a first color, and the second pixels are set to a second color, displaying the contour map corresponding to the target scene. The first pixels of the first color constitute the contour lines in the contour map.

[0056] It should be noted that the world coordinate system can be constructed based on the depth map data of the target scene (the pixel value of each pixel in the depth map corresponding to the target scene represents the distance from the virtual camera to the pixel in the target scene) and the position information of the virtual camera. By constructing this world coordinate system, each pixel in the scene map can be mapped to the world coordinate system to obtain the world coordinates (x, y, z) corresponding to each pixel. The x and y coordinates can locate the horizontal position of the pixel, while the z coordinate can represent the height of the pixel in the world coordinate system, that is, the height of the corresponding position in the target scene.

[0057] For example, the process of constructing a world coordinate system can be as follows:

[0058] ① By acquiring depth map data corresponding to the target scene. A depth map is a two-dimensional image where each pixel value represents the distance from the virtual camera to the corresponding point in the scene. The depth map can be a single-channel image, and pixel values ​​are typically measured in millimeters or meters.

[0059] ② Obtaining Virtual Camera Intrinsic Parameters: The virtual camera intrinsic parameters include the focal length (fx, fy) and the image center point (cx, cy). These parameters describe the optical characteristics of the virtual camera and are used to convert pixel coordinates into three-dimensional points in the camera coordinate system.

[0060] ③ Obtain the virtual camera's extrinsic parameters: The virtual camera's extrinsic parameters include the rotation matrix and translation vector. The rotation matrix describes the virtual camera's orientation, and the translation vector describes the virtual camera's position in the world coordinate system. If the virtual camera is located at the origin of the world coordinate system and is facing forward, the rotation matrix can be an identity matrix, and the translation vector can be the zero vector.

[0061] ④ Pixel coordinates to camera coordinates: For each pixel in the depth map, it is converted into a 3D point in the camera coordinate system using the virtual camera's intrinsic parameters. Specifically, the point (x, y, z) in the camera coordinate system can be calculated using the pixel coordinates (u, v) and the depth value (z).

[0062] ⑤ Camera coordinates to world coordinates: Using the extrinsic parameters of the virtual camera (rotation matrix and translation vector), points in the camera coordinate system are transformed to the world coordinate system. This step is achieved through matrix operations, taking into account the position and orientation of the virtual camera.

[0063] ⑥ Constructing the world coordinate system: Through the above steps, each pixel in the depth map corresponds to a 3D point in the world coordinate system. These points together constitute the world coordinate system representation of the scene.

[0064] After constructing the corresponding world coordinate system through the above process, the world coordinates of each pixel can be obtained, thereby determining the height information corresponding to each pixel. Then, a modulo operation can be performed based on this height information. For example, assuming that the height of a pixel in the world coordinate system is 10.03 meters, and the contour line interval is every 5 meters, then by taking the modulo, 10.3%5 = 0.03. When this value is less than 0.05, the pixel is set to black; otherwise, it is set to white. Thus, based on the black and white pixels, a contour map corresponding to the target scene can be presented. In the contour map, a line segment with a width of 0.05 decimeters is displayed every 5 meters in height. By adding the corresponding material information to the scene map, the contour map corresponding to the target scene can be obtained, so that users can intuitively perceive the terrain height corresponding to the target scene.

[0065] For terrain height maps, the height information of each pixel in the scene map in the world coordinate system, as well as the upper limit of the height, can be obtained. The world coordinate system is a coordinate system constructed based on the depth map data of the target scene and the position information of the virtual camera. Then, the height information and the upper limit of the height are used to calculate and obtain the color ratio coefficient corresponding to each pixel. Then, the color ratio coefficient corresponding to the pixel is used to sample the color in a preset color map to obtain the terrain color corresponding to each pixel. Finally, the scene map is colored according to the terrain color, and the height color map corresponding to the target scene is displayed based on the coloring result.

[0066] It should be noted that the process of constructing the world coordinate system can be referred to the description in the previous embodiments, and will not be repeated here. After obtaining the height of each pixel in the world coordinate system, the corresponding color ratio coefficient can be obtained by comparing the height of the pixel with the preset height upper limit. The color ratio coefficient can be used to determine the color of the pixel. For example, by constructing a color map from bottom to top to show the color from low to high, the highest height corresponding to the entire target scene can be set. Then, the height of each pixel is compared with this highest height. For example, if the highest world height is 2000 meters, and the obtained pixel height is 1500 meters, then 1500 / 2000 = 0.75. That is, the pixel can sample the color with V of 0.75 in the UV of the color map as the terrain color. Then, the pixel is colored according to this terrain color. By coloring the entire scene map, the corresponding terrain height map can be obtained, so that the height change of the target scene can be intuitively presented through the terrain height map.

[0067] For the model color map, the target scene model is a road model, and the model color map is a road color map. After extracting the road model from the scene model, different road models can correspond to different colors. Then, the display color corresponding to each road model can be obtained, and the road model is colored according to the display color. Based on the coloring result, the road color map corresponding to the target scene is displayed.

[0068] For example, different Stencil values ​​can be set for different road models, and different Stencil values ​​correspond to different display colors. In the process of constructing the model color map, after reading the Stencil values ​​corresponding to each road model, the color corresponding to the Stencil value is further obtained. Then, the road model is colored according to the obtained color to obtain the road color map corresponding to the target scene. Thus, the relevant scene model in the target scene can be intuitively presented through the model color map.

[0069] For Stencil values, different Stencil values ​​can correspond to different material information (such as display color). By setting different Stencil values ​​for different scene models, different material information can be added to different scene models, so that different scene models can be displayed intuitively in the scene graph. For example, for the first type of road, the Stencil value can be set to 1; for the second type of road, the Stencil value can be set to 2; and for the third type of road, the Stencil value can be set to 3. 1, 2, and 3 correspond to blue, yellow, and green, respectively. When displaying these three types of roads, the first type of road can be displayed in blue, the second type in yellow, and the third type in green, etc., so as to intuitively display three different types of road models in the scene graph.

[0070] It should be noted that the above process is illustrated by adding a single material to the scene image. It is understood that the plugin provides multiple material addition entry points. Users can choose to process the target scene according to at least one material to obtain the corresponding image. For example, the contour map can be combined with the road color map to display the terrain height of the target scene and the road model in the target scene at the same time. Alternatively, the terrain height map can be combined with the road color map to display the terrain height change of the target scene and the road model in the target scene at the same time. Users can choose flexibly, and the present invention does not limit this.

[0071] Step 105: Take a screenshot of the target scene map and output the terrain image set corresponding to the target scene map.

[0072] After constructing the corresponding target scene map through the input process, users can take screenshots of the target scene map using the plugin to obtain multiple images corresponding to the target scene map. Based on these multiple images, a corresponding terrain image set can be constructed, which can then be exported and imported into another graphics processing software. By taking screenshots of the scene map with the corresponding materials added, users can import the terrain image set into the corresponding image processing software for further map management and processing, simplifying the data flow process and reducing the difficulty of use.

[0073] It should be noted that the embodiments of the present invention include, but are not limited to, the examples described above. It is understood that those skilled in the art can make further settings according to actual needs under the guidance of the ideas in the embodiments of the present invention, and the present invention does not limit such settings.

[0074] In this embodiment of the invention, regarding the terrain data processing of the target scene, when a user edits the terrain of the target scene and needs to export the corresponding data for further processing in another graphics processing software, the user can export the terrain image set corresponding to the target scene through a corresponding plugin. This allows the user's modifications to the target scene's terrain to be reflected in the corresponding scene map. Specifically, this can be achieved by acquiring the terrain data corresponding to the target scene, dividing the target scene into several blocks, determining the virtual camera for the target scene and its corresponding shooting angle, and during the loading process, acquiring the coordinate information corresponding to each block, and then sequentially processing the terrain data corresponding to each block according to the shooting angle and coordinate information. The system loads the shape data to obtain the scene map corresponding to the target scene. By dividing the entire scene into several small blocks that support fast loading, the map loading efficiency is improved and the data loading time is reduced. Furthermore, by determining at least one scene material information for the scene map and adding image effects corresponding to the scene material information to the scene map, the target scene map corresponding to the target scene is displayed. Then, a screenshot of the target scene map is taken, and the terrain image set corresponding to the target scene map is output. By taking a screenshot of the scene map with the corresponding materials added, users can import the terrain image set into the corresponding image processing software for further map management and processing, simplifying the data flow process and reducing the difficulty of use.

[0075] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the following examples are provided for illustrative purposes:

[0076] As an example, when a user runs a plugin in a corresponding graphics processing software to implement the technical solution of this invention, the plugin can provide a corresponding control interface. This interface can include a file import entry, a material processing entry, a model processing entry, and a resolution processing entry. Specifically, the file import entry is used to import terrain data corresponding to the scene; the material processing entry can be used to determine whether to enable or disable the display of contour lines, landscapes or terrain, roads or paths, etc. When the corresponding content is enabled, the scene can be processed based on the corresponding material information to display the corresponding content; the model processing entry allows the user to change the display material of the model, such as display color; and the resolution entry can be used to adjust the resolution of the image after rendering the terrain data, etc., which is not limited in this respect.

[0077] For example, when a user enables the display of terrain and roads, a corresponding virtual camera can be created, and terrain data can be loaded based on the virtual camera to display features such as... Figure 4 The target scene diagram shown can intuitively present the terrain corresponding to the target scene and the corresponding road models in the scene. Figure 4The "crisscrossing" paths in the model represent roads, etc. Correspondingly, such as... Figure 5 As shown, when the user only enables the display of contour lines, after loading the corresponding scene map, the scene map can be processed and the contour map corresponding to the target scene can be displayed; for example... Figure 6 As shown, when the user only enables terrain display, after loading the corresponding scene map, the scene map can be processed to display the terrain corresponding to the target scene using colors of different depths; for example... Figure 7 As shown, when the user enables the display of road models, after the corresponding scene map is loaded, the road models in the target scene can be identified, and the road models can be assigned corresponding colors according to the Stencil map values ​​corresponding to each road model, so that various road models can be displayed in different colors in the scene map to obtain the corresponding road color map.

[0078] Furthermore, after obtaining the target scene image by enabling the corresponding material processing function, users can use a high-precision screenshot tool to capture the target scene image to obtain the corresponding image set. It should be noted that during the screenshot process, the captured images can be sorted according to corresponding encoding rules so that the image set can be merged based on the corresponding order in subsequent processes to reconstruct the target scene image. For example, the dimensions of each image can be read, and then the values ​​after the letters A and B in each image name can be read. Based on these two numbers, the corresponding plot coordinate system of each image when it was captured in the graphics processing software can be reconstructed. Then, based on this coordinate system, each image can be restored to its corresponding position to obtain the corresponding target scene image. Thus, by capturing the scene image with the corresponding materials added, users can import the terrain image set into the corresponding image processing software for further map management processing, simplifying the data flow process and reducing the difficulty of use.

[0079] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0080] Reference Figure 8 The diagram illustrates a structural block diagram of a map data processing device provided in an embodiment of the present invention, which may specifically include the following modules:

[0081] The data acquisition module 801 is used to acquire terrain data corresponding to the target scene, wherein the target scene is divided into several blocks;

[0082] The camera determination module 802 is used to determine the virtual camera for the target scene and the shooting angle corresponding to the virtual camera;

[0083] The loading module 803 is used to obtain the coordinate information corresponding to each of the blocks, and load the terrain data corresponding to each block in sequence according to the shooting angle and the coordinate information to obtain the scene map corresponding to the target scene.

[0084] Image processing module 804 is used to determine at least one scene material information for the scene image, add image effects corresponding to the scene material information to the scene image, and display the target scene image corresponding to the target scene;

[0085] The image capture module 805 is used to capture the target scene map and output the terrain image set corresponding to the target scene map.

[0086] In some feasible implementations, the coordinate information is the center coordinate of the block, the shooting angle is an orthogonal angle, and the loading module 803 is specifically used for:

[0087] Along each of the central coordinates, the terrain data of each of the blocks is loaded sequentially according to the orthogonal perspective, and the scene map corresponding to the target scene is obtained based on the loading results.

[0088] In some feasible implementations, the loading module 803 is specifically used for:

[0089] Obtain the sequence markers corresponding to each of the aforementioned blocks;

[0090] According to the order of the sequence marks, the virtual camera is moved sequentially to directly above the positions of the center coordinates, and the terrain data of the blocks is loaded from the orthogonal perspective. Based on the recorded results, the scene map corresponding to the target scene is obtained.

[0091] In some feasible implementations, the apparatus further includes:

[0092] The box creation module is used to create a post-processing box for the virtual camera and set the virtual camera in the post-processing box. The post-processing box is configured with different post-processing material information.

[0093] In some feasible implementations, the image processing module 804 is specifically used for:

[0094] In response to a material addition instruction for the target scene, at least one scene material information corresponding to the material addition instruction is extracted from the post-processing material information.

[0095] In some feasible implementations, the scene material information includes contour line material information, the target scene map includes a contour map, and the image processing module 804 is specifically used for:

[0096] If the scene material information is the contour material information, then the contour line corresponding to the target scene is calculated, and the contour line is displayed in the scene map, thus displaying the contour map corresponding to the target scene.

[0097] In some feasible implementations, the image processing module 804 is specifically used for:

[0098] The height information and contour interval value of each pixel in the scene image are obtained in the world coordinate system. The world coordinate system is a coordinate system constructed based on the depth map data of the target scene and the position information of the virtual camera.

[0099] The detection value corresponding to the pixel is obtained by calculating using the height information and the contour line interval value;

[0100] Pixels in the target scene whose detection value is less than a preset threshold are designated as first pixels, and pixels in the target scene whose detection value is greater than or equal to the preset threshold are designated as second pixels.

[0101] Set the first pixel in the target scene to a first color and the second pixel in the target scene to a second color, and display the contour map corresponding to the target scene;

[0102] The first pixel of the first color constitutes the contour line in the contour map.

[0103] In some feasible implementations, the scene material information includes height and color material information, the target scene map includes a height and color map, and the image processing module 804 is specifically used for:

[0104] If the scene material information is the height color material information, then calculate the terrain color corresponding to the target scene, color the scene map according to the terrain color, and display the terrain height map corresponding to the target scene based on the coloring result.

[0105] In some feasible implementations, the image processing module 804 is specifically used for:

[0106] Obtain the height information of each pixel in the scene image in the world coordinate system, as well as the upper limit of the height. The world coordinate system is a coordinate system constructed based on the depth map data of the target scene and the position information of the virtual camera.

[0107] The color ratio coefficient corresponding to each pixel is obtained by calculating using the height information and the upper limit value of the height.

[0108] The color ratio coefficients corresponding to the pixels are sampled in a preset color map to obtain the terrain color corresponding to each pixel.

[0109] The scene map is colored according to the terrain color, and the height color map corresponding to the target scene is displayed based on the coloring result.

[0110] In some feasible implementations, the target scene includes a scene model, the scene material information includes model color material information, the target scene image includes a model color image, and the image processing module 804 is specifically used for:

[0111] If the scene material information is the model color material information, then the scene model is identified from the scene image, and the target scene model is extracted from the scene model;

[0112] Obtain the display color corresponding to the target scene model;

[0113] The target scene model is colored according to the display color, and the color map of the model corresponding to the target scene is displayed based on the coloring result.

[0114] In some feasible implementations, the target scene model is a road model, the model color map is a road color map, and the image processing module 804 is specifically used for:

[0115] The road model is colored according to the displayed colors, and a road color map corresponding to the target scene is displayed based on the coloring results.

[0116] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0117] In addition, this invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described map data processing method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0118] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the map data processing method embodiments described above, achieving the same technical effects. To avoid repetition, these will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0119] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0120] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, EEPROM, Flash, and eMMC, etc.) containing computer-usable program code.

[0121] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0122] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0123] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0124] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0125] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0126] The above provides a detailed description of a map data processing method and a map data processing apparatus provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for processing map data, characterized in that, include: Acquire terrain data corresponding to the target scene, which is divided into several blocks; Determine the virtual camera for the target scene and the corresponding shooting angle of the virtual camera; Obtain the coordinate information corresponding to each of the blocks, and load the terrain data corresponding to each block in sequence according to the shooting angle and the coordinate information to obtain the scene map corresponding to the target scene; Determine at least one scene material information for the scene graph, add image effects corresponding to the scene material information to the scene graph, and display the target scene graph corresponding to the target scene; Take a screenshot of the target scene map and output the terrain image set corresponding to the target scene map; The scene material information includes contour line material information, the target scene map includes a contour map, and the step of adding image effects corresponding to the scene material information to the scene map and displaying the target scene map corresponding to the target scene includes: If the scene material information is the contour line material information, then obtain the height information of each pixel in the scene image in the world coordinate system and the contour line interval value. The world coordinate system is a coordinate system constructed based on the depth map data of the target scene and the position information of the virtual camera. The detection value corresponding to the pixel is obtained by calculating using the height information and the contour line interval value; Pixels in the target scene whose detection value is less than a preset threshold are designated as first pixels, and pixels in the target scene whose detection value is greater than or equal to the preset threshold are designated as second pixels. Set the first pixel in the target scene to a first color and the second pixel in the target scene to a second color, and display the contour map corresponding to the target scene; The first pixel of the first color constitutes the contour line in the contour map.

2. The method according to claim 1, characterized in that, The coordinate information is the center coordinate of the block, the shooting angle is an orthogonal angle, and the step of loading the terrain data corresponding to each block sequentially according to the shooting angle and the coordinate information to obtain the scene map corresponding to the target scene includes: Along each of the central coordinates, the terrain data of each of the blocks is loaded sequentially according to the orthogonal perspective, and the scene map corresponding to the target scene is obtained based on the loading results.

3. The method according to claim 2, characterized in that, The process of loading terrain data for each block sequentially along each of the central coordinates according to the orthogonal perspective, and obtaining a scene map corresponding to the target scene based on the loading results, includes: Obtain the sequence markers corresponding to each of the aforementioned blocks; According to the order of the sequence marks, the virtual camera is moved sequentially to directly above the positions of the center coordinates, and the terrain data of the blocks is loaded from the orthogonal perspective. Based on the recorded results, the scene map corresponding to the target scene is obtained.

4. The method according to claim 1, characterized in that, After determining the virtual camera for the target scene, the method further includes: A post-processing box is created for the virtual camera, and the virtual camera is set in the post-processing box, which is configured with different post-processing material information.

5. The method according to claim 4, characterized in that, Determining at least one scene material information for the target scene includes: In response to a material addition instruction for the target scene, at least one scene material information corresponding to the material addition instruction is extracted from the post-processing material information.

6. The method according to claim 1, characterized in that, The scene material information includes height and color material information, and the target scene image includes a height and color image. Adding the image effect corresponding to the scene material information to the target scene to obtain the target scene image includes: If the scene material information is the height color material information, then calculate the terrain color corresponding to the target scene, color the scene map according to the terrain color, and display the terrain height map corresponding to the target scene based on the coloring result.

7. The method according to claim 6, characterized in that, The process of calculating the terrain color corresponding to the target scene, coloring the scene map according to the terrain color, and displaying the terrain height map corresponding to the target scene based on the coloring result includes: Obtain the height information of each pixel in the scene image in the world coordinate system, as well as the upper limit of the height. The world coordinate system is a coordinate system constructed based on the depth map data of the target scene and the position information of the virtual camera. The color ratio coefficient corresponding to each pixel is obtained by calculating using the height information and the upper limit value of the height. The color ratio coefficients corresponding to the pixels are sampled in a preset color map to obtain the terrain color corresponding to each pixel. The scene map is colored according to the terrain color, and the height color map corresponding to the target scene is displayed based on the coloring result.

8. The method according to claim 1, characterized in that, The target scene includes a scene model, the scene material information includes model color material information, the target scene image includes a model color image, and adding image effects corresponding to the scene material information to the scene image and displaying the target scene image corresponding to the target scene includes: If the scene material information is the model color material information, then the scene model is identified from the scene image, and the target scene model is extracted from the scene model; Obtain the display color corresponding to the target scene model; The target scene model is colored according to the display color, and the color map of the model corresponding to the target scene is displayed based on the coloring result.

9. The method according to claim 8, characterized in that, The target scene model is a road model, and the model color map is a road color map. The step of coloring the target scene model in the scene map according to the display colors, and displaying the model color map corresponding to the target scene based on the coloring results, includes: The road model is colored according to the displayed colors, and a road color map corresponding to the target scene is displayed based on the coloring results.

10. A map data processing apparatus, characterized in that, include: The data acquisition module is used to acquire terrain data corresponding to the target scene, which is divided into several blocks; A camera determination module is used to determine a virtual camera for the target scene and the shooting angle corresponding to the virtual camera; The loading module is used to obtain the coordinate information corresponding to each of the blocks, and load the terrain data corresponding to each block in sequence according to the shooting angle and the coordinate information to obtain the scene map corresponding to the target scene. An image processing module is used to determine at least one scene material information for the scene image, add image effects corresponding to the scene material information to the scene image, and display the target scene image corresponding to the target scene. The image capture module is used to capture the target scene map and output the terrain image set corresponding to the target scene map; The scene material information includes contour line material information, the target scene map includes a contour map, and the image processing module is specifically used for: If the scene material information is the contour line material information, then obtain the height information of each pixel in the scene image in the world coordinate system and the contour line interval value. The world coordinate system is a coordinate system constructed based on the depth map data of the target scene and the position information of the virtual camera. The detection value corresponding to the pixel is obtained by calculating using the height information and the contour line interval value; Pixels in the target scene whose detection value is less than a preset threshold are designated as first pixels, and pixels in the target scene whose detection value is greater than or equal to the preset threshold are designated as second pixels. Set the first pixel in the target scene to a first color and the second pixel in the target scene to a second color, and display the contour map corresponding to the target scene; The first pixel of the first color constitutes the contour line in the contour map.

11. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method as described in any one of claims 1-9.

12. A computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Scene map generation method and device, computer storage medium and electronic equipment

    CN111773709A

  • Map generation method and device, computer equipment and computer readable storage medium

    CN114053708A