Three-dimensional war game map construction method based on DEM and remote sensing ground feature classification
Through the three -dimensional terrain generation based on DEM data, combined with remote sensing ground classification and texture hybrid technology, using the rules grid model and the second -level quad -fork tree index coding, the lack of the existing three -dimensional soldiers' map generation method is solved, and the high accuracy is achieved. Truth and immersion three -dimensional map generation.
Patent Information
- Application Number
- CN202411440616.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-16
AI Technical Summary
The existing three-dimensional war chess map generation methods have problems such as difficulty in obtaining data, complex processing, and insufficient texture mapping. They cannot effectively simulate the real battlefield environment and lack efficient and accurate three-dimensional terrain generation methods.
Use DEM -based methods to generate three -dimensional terrain, combined with remote sensing ground classification and texture hybrid technology, through regular grid models and second -level quad -fork tree oscillated codes to optimize the simplification and rendering process to achieve high precision, real sense and immersion sense. Three -dimensional map generation.
The rapid and accurate reduction of the three -dimensional deduction scene of the classic war cases has been realized, and the authenticity and rendering efficiency of the three -dimensional terrain are improved, and the contradiction between high -precision, authenticity, immersion and model real -time efficiency, and data requirements.
Smart Images

Figure CN119379937A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer application technology, and in particular relates to a three-dimensional war chess map construction method based on DEM and remote sensing object classification. Background Art
[0002] With the diversification of modern combat needs, the limitations of wargame maps based on traditional battle situation in tactical analysis and military training are gradually emerging. At present, most wargame system maps are still two-dimensional, mainly because two-dimensional maps are relatively simple to make, easy to understand and operate. However, due to the excessive information elements of the campaign map, the two-dimensional wargame map is still insufficient in spatial expression and immersion. It cannot fully express the elevation and slope of the terrain, and the extraction and processing of key information of the actual campaign terrain are limited, which makes it difficult to simulate the real battlefield environment. The map is not accurate, which is not conducive to space combat simulation. In contrast, three-dimensional maps can reproduce the three-dimensional structure of the terrain in detail, provide richer perspectives and terrain features, thereby more effectively simulating the battlefield environment, enhancing the battlefield reality, and more accurately reflecting the impact of terrain on tactics and strategy, so that students can more intuitively understand the real-time changes and decision-making complexity of the battlefield. With the advancement of virtual reality and augmented reality technology, three-dimensional wargame simulation systems will play an increasingly important role in the field of military simulation, providing a richer and more realistic experience for military training and education.
[0003] However, the current three-dimensional terrain generation faces challenges such as difficulty in data acquisition, complex processing, and unrealistic texture mapping. There is currently little research on the generation of three-dimensional wargame maps, and insufficient use of altitude information. Most research directions are three-dimensional terrain generation and terrain data processing.
[0004] Commonly used three-dimensional terrain generation methods mainly consist of terrain generation technology based on data fitting, terrain generation technology based on fractal technology, and terrain generation technology based on real elevation data. Since this paper needs to generate three-dimensional terrain of classic battle examples, it is necessary to use real geographic information for generation. Therefore, it is more suitable to use terrain generation technology based on elevation data. After digital terrain analysis, the digital elevation model (DEM) can intuitively display the ups and downs of the surface. At present, DEM has become an important spatial information material in the national basic geographic database. The two commonly used representation models of digital elevation models are regular grid models and irregular triangulated network models. The irregular triangulated network model uses irregularly distributed elevation points to form a triangular grid. Although the model is closer to the real terrain, its structure is complex. When storing, it usually needs to record the topological relationship between points, edges and triangles, which is not conducive to the efficiency of data processing and the subsequent terrain management and application process. In contrast, the regular grid model is simple and easy to use. Many researchers use the regular grid model to generate three-dimensional terrain. For example, some scholars combined low-resolution digital elevation models with aerial images to generate realistic terrain; others merged DEM with satellite images to generate three-dimensional terrain.
[0005] Considering the expansion of terrain scale and the fact that battles often involve a wide range of areas, researchers at home and abroad have begun to study terrain simplification technology in order to ensure rendering quality and rendering speed. For example, some researchers have proposed a detail simplification algorithm for continuous LOD, using a variable screen threshold to constrain the maximum geometric error of triangle vertices; while other researchers have improved this method by using quadtrees for node subdivision; some scholars have proposed a static LOD algorithm, ChunkLOD, which processes data at all levels during preprocessing and directly reads it during rendering, without the process of dynamic calculation; in addition, there are also methods such as using dual threads to implement a quadtree-based LOD terrain simplification algorithm, and using quadtrees and fill curves to manage massive terrain data. The above studies show that for the generation of real terrain, more and more research is being conducted on the use of quadtree terrain organization combined with LOD terrain simplification algorithms to simplify large-scale terrain blocks and optimize scene rendering.
[0006] In the rendering of large-scale terrain scenes, the terrain grid model can show the surface undulations, but it is not enough to show the landform features in detail. In 1974, a scholar proposed the concept of texture mapping technology. The application of this technology greatly improved the visual richness of graphic targets and was of great significance to the generation of realistic maps. In 1976, two other scholars proposed the "reflection mapping" technology, which took into account the specular reflection parameters of the texture image and the illumination mapping technology in the illumination model, thereby greatly improving the image quality after texture mapping. In 1978, another scholar proposed the concave-convex texture mapping technology, which used a perturbation function to change the normal vector of the model surface to simulate the texture of the rough surface. Texture mapping technology is also used in three-dimensional map modeling. Mapping the landform texture onto the terrain surface is an important application in the generation of three-dimensional maps. Texture mapping is an important technology to enhance the realism of three-dimensional terrain. It enriches the surface details by attaching texture images to the terrain grid model. The core of texture mapping is to establish the match between the terrain grid points and the texture coordinates to ensure the stability of the texture mapping relationship when the terrain model is deformed.
[0007] Although significant progress has been made in the research of war game simulation systems, map element extraction and generation, and 3D terrain generation, due to the diversity and complexity of map information elements, as well as the problems of rendering quality and speed in optimizing 3D terrain generation, there are still few studies on the generation of 3D maps for war game simulations based on classic battle situation diagrams. Therefore, there is an urgent need for an efficient and accurate 3D war game map generation method. Summary of the invention
[0008] In view of the problems existing in the above-mentioned prior art, the present invention proposes a method for constructing a three-dimensional war chess map based on DEM and remote sensing object classification. The present invention creatively adopts a method based on DEM data to generate three-dimensional terrain, providing a basis for the quantification of terrain and landforms of three-dimensional maps. Secondly, a texture blending-based method and object generation are adopted to simulate the environment of a real battlefield. Finally, a method of data processing and terrain simplification based on a secondary quadtree index is proposed, which optimizes the speed and smoothness of large-scale terrain loading, solves the contradiction between the high precision, realism, and immersion of three-dimensional maps and the real-time efficiency and data requirements of the model, and realizes the rapid and accurate restoration of the three-dimensional deduction scene of the classic battle situation.
[0009] In order to achieve the above technical objectives, the present invention provides the following technical solutions:
[0010] A three-dimensional war game map construction method based on DEM and remote sensing object classification, specifically including:
[0011] S1, obtaining digital elevation model DEM data, and performing block and layer processing and data conversion on it; the DEM data is a terrain data array containing terrain height information, stored in a raster format;
[0012] S2, constructing a regular grid model based on the DEM data after data transformation; then using the regular grid model and combining it with hardware to perform terrain rendering to generate a three-dimensional terrain;
[0013] S3, performing terrain texture mapping on the three-dimensional terrain obtained in step S2 based on remote sensing object classification to locate and map the texture of specific landforms on the terrain;
[0014] S4, based on the multi-channel mixed color map Splatmap, performs a mixing process between different textures on the three-dimensional terrain after terrain texture mapping, simulating the natural transition between terrain textures in real scenes;
[0015] S5. Test by adjusting the channel value of the Splatmap to affect the color performance of the final pixel o until the texture mixing effect can be effectively achieved, otherwise return to step S4.
[0016] Furthermore, the block and layer processing in step S1 is to divide the DEM data into multiple blocks through a two-level quadtree index encoding method to ensure effective data management and improve processing efficiency, which specifically includes the following steps:
[0017] The block and layer processing in step S1 is to divide the DEM data into layers and blocks through a two-level quadtree index encoding method to ensure effective data management and improve processing efficiency, which specifically includes the following steps:
[0018] 1) The large-scale terrain data in the DEM data is processed in blocks, and the terrain data is processed by vertical and horizontal segmentation methods to realize the first-level coding of the data block index: vertical-horizontal coding; that is, the data block is set with the origin as the starting coordinate, and the terrain is divided along the longitudinal and transverse axes. An index code is established for each segmented terrain data block, thereby realizing rapid retrieval and access to terrain data; the formula is expressed as:
[0019]
[0020]
[0021] Where, (X0, Y0) is the position coordinate of the target area P; (C p ,R p ) is the index coordinate of the data block in the entire terrain data, the size of the terrain block is l×l, l is an odd number;
[0022] 2) Each data block builds a secondary quadtree quasi-independently based on traditional detail evaluation, and only builds it in real time when it is needed for terrain rendering to reduce the amount of calculation; the data block uses the origin as the starting local coordinate and is adjusted to the actual position when the terrain is rendered;
[0023] 3) Use a two-dimensional matrix to mark the nodes in the secondary quadtree structure; according to whether the nodes need to be subdivided, different markings are performed to form a hierarchical detail model with multi-resolution attributes, thereby realizing the stratification and blocking of terrain data.
[0024] Furthermore, in step S1, the data conversion process specifically includes:
[0025] S11. Use the geospatial data abstraction library GDAL to convert the raster data in the DEM data into the latitude and longitude coordinates and elevation of the actual position of the earth in the WGS-84 system through the geographic affine transformation coefficient;
[0026] S12. After projection calculation, the latitude and longitude coordinates and elevation are converted into three-dimensional rectangular coordinates in a Cartesian coordinate system; the Cartesian coordinate system, that is, the geocentric rectangular coordinate system, takes the center of the earth as the origin, and the positive direction of the X axis points to the intersection of the equator and the starting meridian; the Z axis is perpendicular to the equatorial plane, and its positive direction points to the North Pole; the formula of the conversion process is expressed as:
[0027]
[0028] Where, (B, L, H) is the latitude, longitude and elevation of a point in the WGS-84 coordinate system; (X, Y, Z) is the corresponding three-dimensional coordinates of the point in the Cartesian coordinate system; N is the meridian radius, and e is the first eccentricity of the earth ellipsoid;
[0029] S13. Convert the Cartesian coordinate system in step S12 into a scene coordinate system in the terrain rendering scene through translation transformation and rotation transformation to obtain three-dimensional coordinates in the scene coordinate system.
[0030] More specifically, the translation transformation and rotation transformation in step S13 are as follows:
[0031] The translation transformation is specifically:
[0032] The formula for translating the point (X, Y, Z) in the original geocentric rectangular coordinate system to the point (X′, Y′, Z′) in the scene coordinate system is:
[0033] X′=X+T x ;
[0034] Y′=Y+T y ;
[0035] Z′=Z+T z ;
[0036] Among them, T x ,T y ,T z The location of the starting point in the terrain rendering scene relative to the center of the earth;
[0037] The rotation transformation is specifically:
[0038] When the coordinate axes in the scene coordinate system do not completely coincide with the coordinate axes in the geocentric rectangular coordinate system, a rotation transformation is performed. Suppose the scene coordinate system has a rotation angle θ around the x, y, and z axes relative to the geocentric coordinate system. x ,θ y ,θ z , then the formula of the rotation transformation process is expressed as:
[0039] Rotation matrix around the x-axis:
[0040]
[0041] Rotation matrix around the y axis:
[0042]
[0043] Rotation matrix around the z-axis:
[0044]
[0045] Transform the point (X′, Y′, Z′) according to the above three matrices:
[0046]
[0047] Among them, (X″, Y″, Z″) is the three-dimensional rectangular coordinate after translation and rotation transformation, that is, mapped to the correct position.
[0048] Further, step S2 includes:
[0049] S21, regular grid definition and grid vertex determination: define an n×m DEM data regular grid, each grid represents an area in the actual terrain; the three-dimensional coordinates of the grid vertex are (X i,j ,Y i,j ,Z i,j );
[0050] X i,j =x origin +i·Δx
[0051] Y i,j =y origin +j·Δy;
[0052] Z i,j =DEM(i,j)
[0053] Among them, i and j represent the horizontal and vertical indexes respectively; x origin ,y origin is the origin coordinate of the terrain area; Δx and Δy are the grid intervals; DEM(i,j) is the elevation value in the DEM data;
[0054] For the entire terrain area, traverse all DEM data points and read out each grid vertex as described above, where each vertex corresponds to a point on the terrain surface;
[0055] S22, assigning texture coordinates to each vertex and mapping the texture to the terrain surface; the texture coordinates are defined by the size of the regular grid of the DEM data; assuming the grid size is n×m, assigning texture coordinates (u) to each vertex in proportion i,j , v i,j ); the formula is:
[0056]
[0057]
[0058] Among them, i and j represent the horizontal and vertical indexes respectively;
[0059] S23, divide the four adjacent mesh vertices into two triangles, generate triangle indexes; the four adjacent vertices are respectively P i,j ,P i+1,j ,P i,j+1 ,P i+1,j+1 , dividing it into two triangles:
[0060] Triangle 1: P i,j ,P i+1,j ,P i,j+1 ;
[0061] Triangle 2: P i+1,j ,P i,j+1 ,P i+1,j+1 ;
[0062] The vertex indices for each triangle are:
[0063] Triangle 1=(i,j),(i+1,j),(i,j+1);
[0064] Triangle 2=(i+1,j),(i,j+1),(i+1,j+1);
[0065] Thus, all vertex indices in the entire mesh are traversed, and finally the triangle indices of all vertices are generated;
[0066] S24, defining the connection relationship between vertices through triangle indices to ensure correct connection and rendering of the mesh; the connection relationship is: each vertex is connected through a shared triangle edge, and the triangle indices of the mesh are sorted in a counterclockwise order;
[0067] S25. Combined with hardware rendering, basic texture mapping and lighting effects are applied to generate three-dimensional terrain.
[0068] More specifically, in step S1:
[0069] In the process of defining a regular grid, for the acquired DEM data, the sampling points and interpolation points are connected into a terrain surface to approximate the original surface. The formula is expressed as:
[0070] DEM={M i =ξ(P j )|P j (x j ,y j ,H j )∈D,j=1,2,...,n; i=1,2,...,m}
[0071] Among them, n and m represent the size of the regular grid model is n×m; P j Indicates sampling points and interpolation points, M i is the connected patch, x j ,y j , H j is the point corresponding to the DEM, x j ,y j is the horizontal and vertical coordinates of the mesh vertex, H j is the elevation value of the DEM data, and ξ represents the generation rule of the regular grid model.
[0072] Furthermore, step S3 is specifically as follows:
[0073] For the three-dimensional terrain obtained in step S2, different types of mask images obtained from the semantic segmentation results of remote sensing images are used to locate and map the texture of specific landforms on the terrain, thereby effectively restoring the landforms of historical battle examples in the three-dimensional terrain.
[0074] Furthermore, step S4 is specifically as follows:
[0075] A color map Splatmap based on multi-channel mixing is used to achieve mixing between different textures of the terrain and simulate the natural transition between textures of real scenes; the color map Splatmap is a RGBA four-channel color map that records the texture mapping of the terrain, and each channel represents a texture mapping;
[0076] When two texture maps are mixed, the mixed pixels are obtained through channel interpolation. The formula is expressed as:
[0077] o=a * alpha+b * (1-alpha);
[0078] Among them, o is the color of the mixed pixel, a and b are the colors of the corresponding pixels in the two texture maps respectively; alpha is the color value of a channel of the pixel in the color map Splatmap, which is used to adjust the mixing ratio between the two texture maps.
[0079] Furthermore, a multi-threading mechanism and object pool strategy are used to realize dynamic scheduling of terrain blocks and real-time rendering of scenes, including:
[0080] Use multithreading to perform view volume clipping, and the main thread is responsible for drawing terrain blocks and loading and scheduling terrain blocks;
[0081] During the terrain rendering process, the object pool is responsible for managing the storage, rendering and destruction of terrain block objects; setting a pre-storage table, a discarded table and a destruction queue; the pre-storage table is used to save the re-enabled terrain block objects; the discarded table stores the unloaded terrain block objects; the destruction queue is responsible for processing the terrain block objects that need to be destroyed.
[0082] During each frame update, the system first checks the objects in the pre-storage table. If they meet the current rendering conditions, they are transferred to the activation queue. A batch of terrain blocks are activated according to the set number in each frame. For the terrain blocks that need to be rendered, if they are not in the pre-storage table, they are added to the rendering queue. At the same time, the pre-storage table is updated, including non-rendering queue terrain blocks and terrain blocks with changed detail levels. If the pre-storage table is full, the oldest object is removed to the discarded table. Finally, the objects in the queue are quantitatively destroyed to maintain a smooth frame rate and avoid sudden frame rate drops.
[0083] When the viewpoint moves, an improved AABB bounding box view volume clipping method is used for optimization; the improved AABB bounding box clipping rule is:
[0084] (1) For a subnode of a terrain block, if it is completely within the current field of view, the node is considered visible and its visibility attribute is set to 1; based on the node evaluation criteria, determine whether the node needs to be further subdivided. If subdivision is required, the four subnodes of the node will inherit its visibility attribute, that is, the visibility attribute is also set to true;
[0085] (2) For those nodes that are completely outside the view volume, they are considered invisible nodes and will be directly excluded from the rendering process and perform clipping operations;
[0086] (3) If the node only partially overlaps with the view volume, that is, part of the terrain block extends outside the view volume, it is still set to be visible; and it is considered that the user pays less attention to these parts, and these nodes will not be further subdivided. Keep its previous state unchanged.
[0087] Based on the above technical solution, the method proposed by the present invention has the following beneficial effects:
[0088] 1. The DEM data used in the method proposed in the present invention contains information on terrain height fluctuations, which provides a basis for the quantification of three-dimensional terrain. Through multiple coordinate system transformations, the terrain information data carried by the DEM data can adapt to the rendering requirements of three-dimensional scenes, while ensuring the accurate positioning of the data in three-dimensional space.
[0089] 2. The regular grid model adopted by the present invention supports the hierarchical structure of the secondary quadtree, making the adjacency relationship and topological structure clearer and easier to handle; the combination of the two also makes the overall model convenient for terrain segmentation and dynamic scheduling operations. The regular grid model not only improves the efficiency of data processing, but also optimizes the subsequent terrain management and application process; the secondary quadtree index encoding effectively realizes the hierarchical management and display of terrain data, significantly improving the indexing speed.
[0090] 3. Through multi-threaded thread mechanism and object pool strategy, combined with secondary quadtree encoding, the overall loading speed and rendering smoothness are optimized, making real-time interaction possible, reducing the time consumption of the algorithm, and improving the terrain loading speed and running frame rate of 3D terrain generation.
[0091] 4. Remote sensing object classification and color map Splatmap are used to make the differences between different textures of the obtained three-dimensional terrain not too obvious, which is more in line with the natural transition in real nature; making the three-dimensional scene more visually attractive and immersive, suitable for military training and simulation applications, and improving the authenticity of three-dimensional terrain drawing. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 It is the overall technical roadmap of this method;
[0093] Figure 2 It is a schematic diagram of a regular grid model;
[0094] Figure 3 It is a flowchart of three-dimensional terrain generation;
[0095] Figure 4 It is the result map of three-dimensional terrain generation;
[0096] Figure 5 This is the mask result map of forest land, grassland and cultivated land;
[0097] Figure 6It is the result image of texture mapping of three-dimensional scene;
[0098] Figure 7 It is a terrain Splatmap;
[0099] Figure 8 This is a comparison of the texture effects before and after mixing;
[0100] Fig. 9 It is a schematic diagram of terrain data block processing;
[0101] Fig.10 It is a schematic diagram of the secondary quadtree index encoding;
[0102] Fig.11 It is a schematic diagram of two-dimensional matrix marking;
[0103] Fig.12 It is a schematic diagram of the multi-threaded terrain data processing strategy;
[0104] Fig.13 This is a schematic diagram of DEM data. DETAILED DESCRIPTION
[0105] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0106] Although the steps in the present invention are arranged with numbers, they are not used to limit the order of the steps. Unless the order of the steps is clearly stated or the execution of a certain step requires other steps as a basis, the relative order of the steps can be adjusted. It is understood that the term "and / or" used in this article involves and covers any and all possible combinations of one or more of the associated listed items.
[0107] like Figure 1 As shown, the present invention proposes a method for constructing a three-dimensional war chess map based on DEM and remote sensing object classification, which specifically includes the following steps:
[0108] S1, obtaining digital elevation model DEM data, and performing block and layer processing and data conversion on it; the DEM data is a data array containing terrain height information and is stored in a raster format;
[0109] As a preferred implementation, the block and layer processing in step S1 is specifically as follows:
[0110] 1) The large-scale terrain data in the DEM data is processed in blocks, and the terrain data is processed by vertical and horizontal segmentation methods to achieve the first-level encoding of the data block index: vertical-horizontal encoding; Fig. 9As shown in the figure, a 257×257 database is selected as the segmentation standard. If the elevation data value occupies 1 byte, a single data block is about 64KB; if it occupies two bytes, it is about 128KB. Data blocks of this size allow real-time scheduling and caching strategies to achieve real-time rendering of terrain and effectively reduce memory usage. The default setting is that the starting coordinates of the data block are located in the lower left corner (0, 0), and the terrain is systematically divided along the vertical and horizontal axes. Index encoding is established for each segmented data block, thereby achieving rapid retrieval and access to terrain data and improving data processing efficiency; the formula is expressed as:
[0111]
[0112]
[0113] Where, (X0, Y0) is the position coordinate of the target area P; (C p ,R p ) is the index coordinate of the data block in the entire terrain block. The size of the terrain block is l×l, where l is an odd number;
[0114] 2) Each terrain block builds a secondary quadtree quasi-independently based on traditional detail evaluation, and is only built in real time when terrain rendering is required to reduce the amount of calculation; the data block uses the origin as the starting local coordinate and is adjusted to the actual position when the terrain is rendered; the secondary quadtree encoding diagram is as follows Fig.10 As shown, the quadtree structure of data block segmentation and partial blocks is shown;
[0115] In this embodiment, the traditional detail evaluation criteria include: region segmentation, storage efficiency, query performance, dynamic update, and visualization. The following will be described in detail:
[0116] Region segmentation: Each time a segmentation is performed, a reasonable segmentation criterion is selected, such as the distribution of data points or the characteristics of the region (such as density).
[0117] Storage efficiency: Reasonable storage of node information and reduction of storage of unnecessary empty nodes can effectively utilize memory.
[0118] Query performance: Supports efficient query operations, such as range query, proximity search, etc., and can return results within a small time complexity.
[0119] Dynamic update: supports inserting and deleting nodes, and can adjust the structure without rebuilding the entire tree.
[0120] Visualization: It can support regional visualization, making the association between different regions and data more intuitive.
[0121] 3) Use a two-dimensional matrix to mark the nodes in the secondary quadtree structure, such as Fig.11As shown in the figure, whether a node is subdivided depends on the calculation results of a specific evaluation criterion. If a node needs to be subdivided, its center point will be marked as 1; otherwise, it will be marked as 0. The question mark indicates that the node has not been traversed yet. After this process is completed, a hierarchical detail model with multi-resolution attributes is formed, which effectively realizes the hierarchical management and display of terrain data.
[0122] After each terrain block has such a two-dimensional matrix, it can quickly determine whether the local adjacent terrain blocks are at the same level based on the marks, which is convenient for judging whether there are cracks between adjacent blocks, thereby saving search time and facilitating the elimination of cracks within the block.
[0123] In this embodiment, the quadtree hierarchical algorithm is used to optimize data storage, that is, after obtaining the DEM data, in order to optimize the computing efficiency and data processing, the DEM data is divided into layers and blocks through a two-level quadtree index encoding method, a quadtree structure is constructed and stored through a Boolean matrix, which can accelerate data retrieval, thereby effectively processing and rendering large-scale terrain data; in addition, in this embodiment, the terrain block is in a spatial sense, and it corresponds to the data block one by one. When the terrain block is divided, the corresponding terrain data is also divided; and when the terrain data is processed, the data block is processed, and the terrain block is also processed in a spatial sense.
[0124] In addition, as an embodiment, Figure 3 As shown in , the data conversion in step S1 also includes:
[0125] S11. Use the geospatial data abstraction library GDAL to convert the raster data in the DEM data into the latitude and longitude coordinates and elevation of the actual position of the earth in the WGS-84 system, that is, the geographic coordinate system, through the geographic affine transformation coefficient;
[0126] In this embodiment, DEM data is processed by GDAL in the form of dataset raster data. The information in the dataset mainly consists of raster bands, metadata, geographic affine transformation coefficients, and color tables. The metadata includes information such as image time, resolution, sampling method, color table space, etc., and metadata is usually stored in the form of key-value pairs in GDAL. The geographic affine transformation coefficients can convert the raster map coordinates into longitude and latitude coordinates and altitude values at the actual position of the earth in the WGS-84 system.
[0127] S12. After projection calculation, the longitude and latitude coordinates and elevation are converted into three-dimensional rectangular coordinates in the Cartesian coordinate system; this conversion process involves the calculation of parameters such as the meridian radius and the first eccentricity of the ellipsoid to ensure the accurate positioning of the data in three-dimensional space. The Cartesian coordinate system, that is, the geocentric rectangular coordinate system, takes the center of the earth as the origin, and the positive direction of the X-axis points to the intersection of the equator and the starting meridian, representing the east-west direction of the earth's surface; the Z-axis is perpendicular to the equatorial plane, and its positive direction points to the North Pole, symbolizing the north-south direction of the earth; the Y-axis forms an orthogonal relationship with the X-axis and the Z-axis, and is located in the equatorial plane, completing the construction of the coordinate system in three-dimensional space; the formula of the conversion process is expressed as:
[0128]
[0129] Where, (B, L, H) is the latitude, longitude and elevation of a point in the WGS-84 coordinate system; (X, Y, Z) is the corresponding three-dimensional coordinates of the point in the Cartesian coordinate system; N is the meridian radius, and e is the first eccentricity of the earth ellipsoid;
[0130] S13, through translation transformation and rotation transformation, the Cartesian coordinate system in step S12 is converted into the scene coordinate system in the terrain rendering scene to obtain the three-dimensional coordinates in the scene coordinate system; this process is to ensure that the data is correctly mapped to the grid points of the scene coordinate system
[0131] The translation transformation is specifically:
[0132] The formula for translating the point (X, Y, Z) in the original geocentric rectangular coordinate system to the point (X′, Y′, Z′) in the scene coordinate system is:
[0133] X′=X+T x ;
[0134] Y′=Y+T y ;
[0135] Z′=Z+T z ;
[0136] Among them, T x ,T y ,T z The location of the starting point in the terrain rendering scene relative to the center of the earth;
[0137] The rotation transformation is specifically:
[0138] When the coordinate axes in the scene coordinate system do not completely coincide with the coordinate axes in the geocentric rectangular coordinate system, a rotation transformation is performed. Suppose the scene coordinate system has a rotation angle θ around the x, y, and z axes relative to the geocentric coordinate system. x ,θ y ,θ z, then the formula of the rotation transformation process is expressed as:
[0139] Rotation matrix around the x-axis:
[0140]
[0141] Rotation matrix around the y axis:
[0142]
[0143] Rotation matrix around the z-axis:
[0144]
[0145] Transform the point (X′, Y′, Z′) according to the above three matrices:
[0146]
[0147] Among them, (X″, Y″, Z″) is the three-dimensional rectangular coordinate after translation and rotation transformation, that is, mapped to the correct position.
[0148] After the above data transformation processing, the regular network model is constructed to ensure that each mesh vertex is mapped to the correct position.
[0149] S2, constructing a regular grid model based on the DEM data after data transformation; then using the regular grid model and combining it with hardware to perform terrain rendering to generate a three-dimensional terrain;
[0150] As a preferred implementation of step S2, Figure 3 As shown, step S2 specifically includes:
[0151] S21. Definition of regular grid and determination of grid vertices; regular grid refers to a two-dimensional or three-dimensional grid with equal spacing. In three-dimensional terrain modeling, such as Figure 2 As shown, a regular grid divides the terrain surface into small triangular or rectangular units to represent the details of the terrain.
[0152] Define a regular grid of n×m DEM data, where each grid represents an area in the actual terrain; the three-dimensional coordinates of the grid vertices are (X i,j ,Y i,j ,Z i,j );
[0153] X i,j =x origin +i·Δx;
[0154] Y i,j =y origin +j·Δy
[0155] Zi,j =H j
[0156] Among them, i and j represent the horizontal and vertical indexes respectively; x origin ,y origin is the origin coordinate of the terrain area; Δx and Δy are the grid intervals; H j is the elevation value in the DEM data;
[0157] For the entire terrain area, traverse all DEM data points and read out each grid vertex as described above, where each vertex corresponds to a point on the terrain surface;
[0158] In the process of defining a regular grid, for the acquired DEM data, the sampling points and interpolation points are connected into a terrain surface to approximate the original surface. The formula is expressed as:
[0159] DEM={M i =ξ(P j )|P j (x j ,y j ,H j )∈D,j=1,2,...,n; i=1,2,...,m}
[0160] Among them, n and m represent the size of the regular grid model is n×m; P j Indicates sampling points and interpolation points, M i is the connected patch, x j ,y j , H j is the point corresponding to the DEM, x j ,y j is the horizontal and vertical coordinates of the mesh vertex, H j is the elevation value of the DEM data, and ξ represents the generation rule of the regular grid model. In three-dimensional space, DEM data is represented as a data array containing terrain ups and downs information, such as Fig.13 shown.
[0161] S22, assigning texture coordinates to each vertex and mapping the texture to the terrain surface; the texture coordinates are defined by the size of the regular grid of the DEM data; assuming the grid size is n×m, assigning texture coordinates (u) to each vertex in proportion i,j , v i,j ); the formula is:
[0162]
[0163]
[0164] Among them, i and j represent the horizontal and vertical indexes respectively;
[0165] S23. To render a regular mesh model, vertices need to be connected through triangles. A regular mesh is usually composed of two triangles forming a rectangular unit. In an n×m grid, the rows and columns divide the four adjacent vertices into two triangles, and generate triangle indices; the four adjacent vertices are recorded as P i,j ,P i+1,j ,P i,j+1 ,P i+1,j+1 , then the two triangles divided are:
[0166] Triangle 1: P i,j ,P i+1,j ,P i,j+1 ;
[0167] Triangle 2: P i+1,j ,P i,j+1 ,P i+1,j+1 ;
[0168] The vertex indices for each triangle are:
[0169] Triangle 1=(i,j),(i+1,j),(i,j+1);
[0170] Triangle 2=(i+1,j),(i,j+1),(i+1,j+1);
[0171] For each matrix cell in the entire grid, traverse all (i, j) indices, decompose them into two triangles as described above, and finally generate triangle indices for all vertices.
[0172] S24. Define the connection relationship between vertices through triangle indexes to ensure the correct connection and rendering of the mesh; the connection relationship is: each vertex is connected through a shared triangle edge, and the triangle index of the mesh is sorted in counterclockwise order to ensure that the direction is consistent during the rendering process; each triangle is composed of three vertices, and all triangles are combined to form the mesh surface of the entire terrain.
[0173] S25. Combine hardware rendering, apply basic texture mapping and lighting effects to generate three-dimensional terrain. Apply basic texture mapping and lighting effects to enhance the visual effect, and finally get the following Figure 4 The result graph is shown.
[0174] At the same time, an effective method for loading and scheduling terrain blocks plays an important role in improving the speed of three-dimensional terrain rendering. In the process of terrain rendering, this embodiment also adopts a multi-threading mechanism and an object pool strategy to realize dynamic scheduling of terrain data and real-time rendering of scenes. Specifically, multi-threading is used to perform the clipping of the view volume, while the main thread is responsible for the drawing task of the terrain block and the loading and scheduling of the terrain block, thereby optimizing the overall rendering efficiency. Fig.12 shown.
[0175] During the terrain rendering process, the object pool is responsible for managing the storage, rendering, and destruction of terrain block objects. This mechanism consists of three main parts: the pre-storage table, the discarded table, and the destruction queue. The pre-storage table is used to save terrain block objects that may be reactivated in the future; the discarded table stores unloaded terrain block objects; and the destruction queue is responsible for processing terrain block objects that need to be destroyed.
[0176] During each frame update, the system first checks the objects in the pre-storage table. If they meet the current rendering conditions, they are transferred to the activation queue. A batch of terrain blocks are activated according to the set number for each frame. For new terrain blocks that need to be rendered, if they are not in the pre-storage table, they are added to the rendering queue. At the same time, the pre-storage table is updated, including non-rendering queue terrain blocks and terrain blocks with changed detail levels. If the pre-storage table is full, the oldest object is removed to the discarded table. Finally, the objects in the queue are quantitatively destroyed to maintain a smooth frame rate and avoid sudden frame rate drops.
[0177] In addition, when the viewpoint moves, it is necessary to constantly calculate whether each terrain block is within the view volume, which will cause a great computational burden. In order to reduce the amount of calculation in this process, the view volume clipping method of the bounding box is used for optimization. Since the terrain data in this paper is organized in a two-level quadtree, the terrain block model is relatively standardized, and the AABB bounding box calculation speed is faster, the view volume clipping based on the AABB bounding box is adopted. In addition, this paper reasonably designs and modifies the clipping rules as follows:
[0178] (1) For a subnode of a terrain block, if it is completely within the current field of view, the node is considered visible and its visibility attribute is set to 1. Based on the node evaluation criteria, it is determined whether the node needs to be further subdivided. If subdivision is required, the four subnodes of the node will inherit its visibility attribute, that is, the visibility attribute is also set to true.
[0179] (2) For those nodes that are completely outside the view volume, they are regarded as invisible nodes and will be directly excluded from the rendering process and perform clipping operations.
[0180] (3) If the node only partially overlaps the view volume, that is, part of the terrain block extends outside the view volume, the node is still set to be visible. It can be assumed that the user is less interested in these parts, and these nodes will not be further subdivided. Keeping their previous state unchanged will help reduce the processing time of model simplification on these terrain blocks.
[0181] The optimized algorithm was compared with the original algorithm without using quadtree for hierarchical management and terrain block preprocessing, and without using multithreading and object pool for scheduling. After determining the viewpoint position, the test content was to take the terrain with 4 different numbers of sampling points, and record the average time consumption and frame rate of the original algorithm and this algorithm during the test, and the algorithm time consumption and frame rate comparison results were obtained as shown in Table 1 below:
[0182] Table 1 Comparison of time consumption and frame rate averages
[0183]
[0184] It can be seen from the table that when the block shape is larger, the optimization effect of the secondary quadtree index encoding combined with the multi-threading mechanism and the object pool strategy is more obvious, the average loading time is reduced by up to 10 times, and the frame rate is increased by up to 9 times, which shows that the method proposed in the present invention is more efficient than the traditional method.
[0185] Therefore, the preliminary three-dimensional terrain map generated by this method needs further texture mapping and blending.
[0186] S3, performing terrain texture mapping on the three-dimensional terrain obtained in step S2 based on remote sensing object classification to locate and map the texture of specific landforms on the terrain;
[0187] The visualization methods of 3D wargame maps and 2D wargame maps are different: 3D maps show continuous terrain, provide natural transitions, and more accurately simulate real terrain; while 2D maps show discrete terrain. Although the visualization methods are different, the underlying judgment logic uses the hexagonal grid rule to maintain the consistency of the rules.
[0188] In the rendering of large-scale terrain scenes, the terrain mesh model can show the surface undulations, but the details are limited. Texture mapping is a key technology to enhance the realism of three-dimensional terrain. It enriches the surface details by attaching texture images to the terrain mesh model. The key to texture mapping is to ensure the correct match between the terrain grid points and the texture coordinates to ensure the stability of the texture mapping relationship when the terrain model is deformed. This process involves the definition and control of textures, as well as the use of filtering technology, texture repetition or scaling to optimize the positioning of texture coordinates.
[0189] Since the size of towns and transportation arteries may change significantly over decades, directly mapping remote sensing images to 3D terrain grid models may not be accurate. In addition, remote sensing image maps are flat and cannot show 3D model details such as rivers, buildings and trees.
[0190] Therefore, in this embodiment, as a preferred implementation of step S3, this embodiment uses different types of mask images obtained from the semantic segmentation results of remote sensing images to locate and map the texture of specific landforms such as forests, grasslands, and wastelands on the terrain. In this way, the landforms of historical battles can be effectively restored in three-dimensional terrain. By traversing the mask result images of different landforms, such as Figure 5 As shown, Figure 5 (a), (b), and (c) represent the mask result images of forest land, grassland, and cultivated land, respectively. When the RGB value of the mask position corresponding to the terrain is not (0, 0, 0), the position is set to the corresponding texture. The terrain texture mapping results are shown in Figure 2. Figure 6 shown.
[0191] Although the texture mapping method can distinguish the textures of different landforms, the boundaries between different textures are too obvious, which is inconsistent with the natural transition in the real world. Therefore, the present invention further adopts texture blending technology to simulate the natural transition of textures in real scenes.
[0192] S4, based on the multi-channel mixed color map Splatmap, performs a mixing process between different textures on the three-dimensional terrain after terrain texture mapping, simulating the natural transition between terrain textures in real scenes;
[0193] As a preferred implementation of step S4, S4 is specifically:
[0194] The Splatmap color map based on multi-channel mixing is used to achieve the mixing of different terrain textures and simulate the natural transition between textures in real scenes. The Splatmap color map is a RGBA four-channel color map that records the texture mapping of the terrain. Each channel represents a texture mapping, such as Figure 7 As shown;
[0195] When two texture maps are mixed, the mixed pixels are obtained through channel interpolation. The formula is expressed as:
[0196] o=a * alpha+b * (1-alpha);
[0197] Among them, o is the color of the mixed pixel, a and b are the colors of the corresponding pixels in the two texture maps respectively; alpha is the color value of a channel of the pixel in the color map Splatmap, which is used to adjust the mixing ratio between the two texture maps. By adjusting the channel value of the Splatmap, the texture mixing effect can be effectively achieved, thereby affecting the color performance of the final pixel o. The mixing results of sand and woodland are shown in the figure below. Figure 8 As shown, Figure 8 (a) is the 3D terrain before texture blending. Figure 8 (b) is the three-dimensional terrain after texture blending. It can be clearly seen that the blended terrain is closer to the natural transition of textures in the real terrain.
[0198] After the above steps S3 and S4, the obtained three-dimensional terrain is more realistic.
[0199] S5. Test by adjusting the channel value of the Splatmap to affect the color performance of the final pixel o until the texture mixing effect can be effectively achieved, otherwise return to step S4.
[0200] In summary, the present invention is based on DEM data combined with a regular grid model and a secondary quadtree index encoding, which can efficiently generate three-dimensional terrain, and at the same time utilize remote sensing object classification and color mapping to make texture mapping more realistic. In the entire terrain rendering process, a multi-threading mechanism and an object pool strategy are also applied to make the generation process more streamlined.
[0201] The method proposed in the present invention solves the contradiction between the high precision, realism, and immersion of three-dimensional maps and the real-time efficiency and data requirements of the model, and realizes the rapid and accurate restoration of the three-dimensional deduction scenes of classic battle situations.
[0202] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0203] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A method for constructing a three-dimensional war game map based on DEM and remote sensing object classification, characterized in that: The specific steps include: S1, obtaining digital elevation model DEM data, and performing block and layer processing and data conversion on it; the DEM data is a terrain data array containing terrain height information, stored in a raster format; S2, constructing a regular grid model based on the DEM data after data transformation; then using the regular grid model and combining it with hardware to perform terrain rendering to generate a three-dimensional terrain; S3, performing terrain texture mapping on the three-dimensional terrain obtained in step S2 based on remote sensing object classification to locate and map the texture of specific landforms on the terrain; S4, based on the multi-channel mixed color map Splatmap, performs a mixing process between different textures on the three-dimensional terrain after terrain texture mapping, simulating the natural transition between terrain textures in real scenes; S5. Test by adjusting the channel value of the Splatmap to affect the color performance of the final pixel o until the texture mixing effect can be effectively achieved, otherwise return to step S4.
2. The method for constructing a three-dimensional war game map based on DEM and remote sensing object classification according to claim 1, characterized in that: The block and layer processing in step S1 is to divide the DEM data into layers and blocks through a two-level quadtree index encoding method to ensure effective data management and improve processing efficiency, which specifically includes the following steps: 1) The large-scale terrain data in the DEM data is processed in blocks, and the terrain data is processed by vertical and horizontal segmentation methods to realize the first-level coding of the data block index: vertical-horizontal coding; that is, the data block is set with the origin as the starting coordinate, and the terrain is divided along the longitudinal and transverse axes. An index code is established for each data block after segmentation, so as to realize the rapid retrieval and access of terrain data; the formula is expressed as: Where, (X0, Y0) is the position coordinate of the target area P; (C p ,R p ) is the index coordinate of the data block in the entire terrain data, the size of the terrain block is l×l, l is an odd number; 2) Each data block builds a secondary quadtree quasi-independently based on traditional detail evaluation, and only builds it in real time when it is needed for terrain rendering to reduce the amount of calculation; the data block uses the origin as the starting local coordinate and is adjusted to the actual position when the terrain is rendered; 3) Use a two-dimensional matrix to mark the nodes in the secondary quadtree structure; according to whether the nodes need to be subdivided, different markings are performed to form a hierarchical detail model with multi-resolution attributes, thereby realizing the stratification and blocking of terrain data.
3. The method for constructing a three-dimensional war game map based on DEM and remote sensing object classification according to claim 1 is characterized in that: The data conversion process in step S1 specifically includes: S11. Use the geospatial data abstraction library GDAL to convert the raster data in the DEM data into the latitude and longitude coordinates and elevation of the actual position of the earth in the WGS-84 system through the geographic affine transformation coefficient; S12. After projection calculation, the latitude and longitude coordinates and elevation are converted into three-dimensional rectangular coordinates in a Cartesian coordinate system; the Cartesian coordinate system, that is, the geocentric rectangular coordinate system, takes the center of the earth as the origin, and the positive direction of the X axis points to the intersection of the equator and the starting meridian; the Z axis is perpendicular to the equatorial plane, and its positive direction points to the North Pole; the formula of the conversion process is expressed as: Where, (B, L, H) is the latitude, longitude and elevation of a point in the WGS-84 coordinate system; (X, Y, Z) is the corresponding three-dimensional coordinates of the point in the Cartesian coordinate system; N is the meridian radius, and e is the first eccentricity of the earth ellipsoid; S13. Convert the Cartesian coordinate system in step S12 into a scene coordinate system in the terrain rendering scene through translation transformation and rotation transformation to obtain three-dimensional coordinates in the scene coordinate system.
4. The method for constructing a three-dimensional war game map based on DEM and remote sensing object classification according to claim 3 is characterized in that: In step S13: The translation transformation is specifically: The formula for translating the point (X, Y, Z) in the original geocentric rectangular coordinate system to the point (X′, Y′, Z′) in the scene coordinate system is: X′=X+T x ; Y′=Y+T y ; Z′=Z+T z ; Among them, T x ,T y ,T z The location of the starting point in the terrain rendering scene relative to the center of the earth; The rotation transformation is specifically: When the coordinate axes in the scene coordinate system do not completely coincide with the coordinate axes in the geocentric rectangular coordinate system, a rotation transformation is performed. Suppose the scene coordinate system has a rotation angle θ around the x, y, and z axes relative to the geocentric coordinate system. x ,θ y ,θ z , then the formula of the rotation transformation process is expressed as: Rotation matrix around the x-axis: Rotation matrix around the y axis: Rotation matrix around the z-axis: Transform the point (X′, Y′, Z′) according to the above three matrices: Among them, (X″, Y″, Z″) is the three-dimensional rectangular coordinate after translation and rotation transformation, that is, mapped to the correct position.
5. The method for constructing a three-dimensional war game map based on DEM and remote sensing object classification according to claim 1, characterized in that: Step S2 includes: S21, regular grid definition and grid vertex determination: define an n×m DEM data regular grid, each grid represents an area in the actual terrain; the three-dimensional coordinates of the grid vertex are (X i,j ,Y i,j ,Z i,j ); X i,j =x origin +i·Δx; Y i,j =y origin +j·Δy Z i,j =H j Among them, i and j represent the horizontal and vertical indexes respectively; x origin ,y origin is the origin coordinate of the terrain area; Δx and Δy are the grid intervals; H j is the elevation value in the DEM data; For the entire terrain area, traverse all DEM data points and read out each grid vertex as described above, where each vertex corresponds to a point on the terrain surface; S22, assigning texture coordinates to each vertex and mapping the texture to the terrain surface; the texture coordinates are defined by the size of the regular grid of the DEM data; assuming the grid size is n×m, assigning texture coordinates (u) to each vertex in proportion i,j , v i,j ); the formula is: Among them, i and j represent the horizontal and vertical indexes respectively; S23, divide the four adjacent mesh vertices into two triangles, generate triangle indexes; the four adjacent vertices are respectively P i,j ,P i+1,j ,P i,j+1 ,P i+1,j+1 , dividing it into two triangles: Triangle 1: P i,j ,P i+1,j ,P i,j+1 ; Triangle 2: P i+1,j ,P i,j+1 ,P i+1,j+1 ; The vertex indices for each triangle are: Triangle 1=(i,j),(i+1,j),(i,j+1); Triangle 2=(i+1,j),(i,j+1),(i+1,j+1); Thus, all vertex indices in the entire mesh are traversed, and finally the triangle indices of all vertices are generated; S24, defining the connection relationship between vertices through triangle indices to ensure correct connection and rendering of the mesh; the connection relationship is: each vertex is connected through a shared triangle edge, and the triangle indices of the mesh are sorted in a counterclockwise order; S25. Combined with hardware rendering, basic texture mapping and lighting effects are applied to generate three-dimensional terrain.
6. The method for constructing a three-dimensional war game map based on DEM and remote sensing object classification according to claim 5, characterized in that: In step S21: In the process of defining a regular grid, for the acquired DEM data, the sampling points and interpolation points are connected into a terrain surface to approximate the original surface. The formula is expressed as: DEM={M i =ξ(P j )|P j (x j ,y j ,H j )∈D,j=1,2,…,n;i=1,2,…,m} Among them, n and m represent the size of the regular grid model is n×m; P j Indicates sampling points and interpolation points, M i is the connected patch, x j ,y j , H j is the point corresponding to the DEM, x j ,y j is the horizontal and vertical coordinates of the mesh vertex, H j is the elevation value of the DEM data, and ξ represents the generation rule of the regular grid model.
7. The method for constructing a three-dimensional war game map based on DEM and remote sensing object classification according to claim 1, characterized in that: Step S3 is specifically as follows: for the three-dimensional terrain obtained in step S2, different types of mask images obtained from the semantic segmentation results of the remote sensing image are used to locate and map the texture of specific landforms on the terrain, thereby effectively restoring the landforms of historical battle examples in the three-dimensional terrain.
8. The method for constructing a three-dimensional war game map based on DEM and remote sensing object classification according to claim 1, characterized in that: Step S4 is specifically as follows: A color map Splatmap based on multi-channel mixing is used to achieve mixing between different textures of the terrain and simulate the natural transition between textures of real scenes; the color map Splatmap is defined as a RGBA four-channel color map that records the texture mapping of the terrain, and each channel represents a texture mapping; When two texture maps are mixed, the mixed pixels are obtained through channel interpolation. The formula is expressed as: o=a * alpha+b * (1-alpha); Among them, o is the color of the mixed pixel, a and b are the colors of the corresponding pixels in the two texture maps respectively; alpha is the color value of a channel of the pixel in the color map Splatmap, which is used to adjust the mixing ratio between the two texture maps.
9. The method for constructing a three-dimensional war game map based on DEM and remote sensing object classification according to claim 1, characterized in that: In the process of terrain rendering, multi-threading mechanism and object pool strategy are also used to realize dynamic scheduling of terrain blocks and real-time rendering of scenes, including: Use multithreading to perform view volume clipping, and the main thread is responsible for drawing terrain blocks and loading and scheduling terrain blocks; During the terrain rendering process, the object pool is responsible for managing the storage, rendering and destruction of terrain block objects; setting a pre-storage table, a discarded table and a destruction queue; the pre-storage table is used to save the re-enabled terrain block objects; the discarded table stores the unloaded terrain block objects; the destruction queue is responsible for processing the terrain block objects that need to be destroyed; During each frame update, the system first checks the objects in the pre-storage table. If they meet the current rendering conditions, they are transferred to the activation queue. A batch of terrain blocks are activated according to the set number in each frame. For the terrain blocks that need to be rendered, if they are not in the pre-storage table, they are added to the rendering queue. At the same time, the pre-storage table is updated, including non-rendering queue terrain blocks and terrain blocks with changed detail levels. If the pre-storage table is full, the oldest object is removed to the discarded table. Finally, the objects in the queue are quantitatively destroyed to maintain a smooth frame rate and avoid sudden frame rate drops. When the viewpoint moves, an improved AABB bounding box view volume clipping method is used for optimization; the improved AABB bounding box clipping rule is: (1) For a subnode of a terrain block, if it is completely within the current field of view, the node is considered visible and its visibility attribute is set to 1; based on the node evaluation criteria, it is determined whether the node needs to be further subdivided; if subdivision is required, the four subnodes of the node will inherit its visibility attribute, that is, the visibility attribute is also set to true; (2) For those nodes that are completely outside the view volume, they are considered invisible nodes and will be directly excluded from the rendering process and perform clipping operations; (3) If a node only partially overlaps with the view volume, that is, part of the terrain block extends outside the view volume, it is still set to be visible; and it is considered that the user pays less attention to these parts, so these nodes will not be further subdivided; their previous state remains unchanged.
Citation Information
Patent Citations
Modeling method for three-dimensional terrain
CN104157011A
LOD model generation method based on linear quadtree
CN105405166A
Terrain LOD generation method
CN111179414A
Three-dimensional geographic scene model construction method and device based on stereoscopic remote sensing image
CN113506370A
Wargame deduction system
CN115239023A
Cited By
Multi-resolution war chess chessboard generation method and system based on GIS data
CN120235979A
A Method and System for Generating a Multi-Resolution Wargame Board Based on GIS Data
CN120235979B
Method and system for generating dredging terrain twinning based on right-angle triangular mesh
CN121118566A
Generation method and system for dredged terrain twin based on right triangle mesh
CN121118566B