High-precision terrain generation method, apparatus and equipment based on dynamic pagination
By using a quadtree-hash table two-level index structure and a dynamic scheduling mechanism, the problems of high memory consumption, low rendering efficiency, and loading lag in 3D terrain generation are solved, achieving real-time, seamless rendering and visual continuity of high-precision terrain, thus improving system performance and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-10
AI Technical Summary
Existing 3D terrain generation methods suffer from excessive memory consumption, low rendering efficiency, and sluggish terrain data updates and loading when generating large-scale, high-precision continuous terrain, making it difficult to achieve real-time continuous generation.
It adopts a quadtree-hash table two-level index structure to dynamically calculate the LOD level of tiles within the visible range, generates a paging scheduling queue based on view frustum and motion prediction, asynchronously loads high-priority data, and uses an LRU strategy to manage the cache, combined with progressive rendering and boundary processing technology.
Significantly reduces memory usage, improves rendering efficiency, avoids loading delays, achieves seamless stitching and visual continuity of high-precision terrain, and enhances system performance and user experience.
Smart Images

Figure CN121259154B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer graphics technology, and in particular to a method, apparatus and device for high-precision terrain generation based on dynamic paging. Background Technology
[0002] In recent years, high-precision 3D terrain generation technology has gradually become widespread in fields such as digital earth, virtual simulation, and flight training. Compared with traditional 2D terrain display, 3D terrain scenes can more closely resemble the real environment, bringing users an immersive experience. More and more application scenarios rely on high-precision 3D terrain for real-time display and interaction, such as digital earth platforms, which involve continuous terrain generation, key landmark display, and dynamic loading of complex terrain.
[0003] Existing 3D terrain generation methods typically rely on global loading or static tile-based approaches. While these methods can meet the accuracy requirements of local areas, they lead to significant storage consumption and rendering performance degradation when generating large-scale, high-precision, and continuous terrain. Furthermore, dynamic loading of large-scale terrain data can easily cause lag and jumps, severely impacting the realism and smoothness of continuous motion.
[0004] Specifically, the existing technology has the following technical problems:
[0005] Excessive memory usage: The large volume of high-precision terrain data and the superposition of multi-level terrain blocks further increase memory consumption, leading to a decrease in system operating efficiency and even memory overflow.
[0006] Low 3D rendering efficiency: Terrain blocks are drawn one by one in the rendering pipeline. As the number of terrain blocks increases, the rendering efficiency drops sharply, resulting in reduced frame rate and scene stuttering.
[0007] Terrain data update and loading delays: The lack of an efficient data scheduling mechanism leads to loading delays and stitching artifacts, making it difficult to achieve true real-time continuous generation.
[0008] With the rapid growth in data scale and accuracy requirements, traditional rendering engines' reliance on techniques such as layered loading and multi-level detail is no longer sufficient to effectively address the dual challenges of real-time performance and continuity. Summary of the Invention
[0009] Therefore, it is necessary to provide a high-precision terrain generation method, apparatus, and device based on dynamic paging that can reduce memory usage, improve rendering efficiency, and avoid loading delays, in order to address the aforementioned technical problems.
[0010] A high-precision terrain generation method based on dynamic pagination, the method comprising:
[0011] Global terrain data is divided into multi-level tiles, and multi-level level of detail (LOD) data is generated for each tile. A quadtree-hash table two-level index structure is constructed based on the tiles and LOD data.
[0012] Based on the quadtree-hash table two-level index structure, the LOD level of each tile within the visible range is dynamically calculated according to the camera's view frustum and the predicted future viewpoint position, and a pagination scheduling queue is generated based on a priority weight model that includes distance, screen coverage and motion correlation.
[0013] In response to the paging scheduling queue, high-priority paging data is asynchronously loaded in a loading thread independent of the main rendering thread, and the paging data is cached using an LRU strategy.
[0014] The system performs real-time 3D rendering of the loaded paginated data, and uses interpolation to transition paginated data at different LOD levels during the rendering process. It also performs vertex weighted averaging and texture blending on adjacent pagination boundaries and performs cyclic mapping on longitude boundaries.
[0015] In one embodiment, constructing a quadtree-hash table two-level index structure based on the tile and LOD data includes:
[0016] Construct a quadtree with the global scope as the root node, and the quadtree recursively splits until it reaches the preset maximum LOD level; where each node stores the latitude and longitude bounding box of its corresponding tile;
[0017] The two-dimensional latitude and longitude coordinates of the tile are mapped to a unique 64-bit hash key through bit interleaving operation with the LOD level information;
[0018] A global hash table is constructed based on the hash key, resulting in a quadtree-hash table two-level index structure.
[0019] In one embodiment, dynamically calculating the LOD level of each tile within the visible range includes:
[0020] The LOD level of each tile within the visible range is dynamically calculated as follows:
[0021] ;
[0022] Where floor represents rounding down, D is the distance between the node and the observation point, and S is the screen coverage threshold;
[0023] Furthermore, when the variance of the surface normal in the area where the tile is located is detected to be greater than a preset threshold, its LOD level is automatically upgraded.
[0024] In one embodiment, the priority weighting model that includes distance, screen coverage, and motion relevance is as follows:
[0025] ;
[0026] Where Distance represents the distance between the pagination unit and the viewpoint, ScreenCoverage represents the coverage ratio of the pagination unit on the current screen, and MovementRelevance represents the correlation between the pagination unit and the user's future movement direction, with coefficients... These are the configurable weighting coefficients.
[0027] In one embodiment, using an LRU strategy to manage the cache of paginated data includes:
[0028] When the cache capacity reaches its limit, the least recently used paginated data will be evicted first.
[0029] When cache resources are scarce, low-priority pages are unloaded in stages, prioritizing the unloading of completely invisible pages, followed by unloading pages that are far from the movement path.
[0030] In the event of data loading failure or network latency, the system will fall back to low-resolution paginated data for filling, and then replace it after the high-resolution data has been loaded.
[0031] In one embodiment, the loaded paginated data is rendered in real time in 3D, and interpolation is used to transition the paginated data at different LOD levels during the rendering process, including:
[0032] Before paginated data is passed into the rendering pipeline, vertex buffers and index buffers are constructed to form a data structure that the GPU can directly render.
[0033] A layered rendering strategy is adopted, using low-resolution models for distant or low-priority pagination and high-resolution models for nearby or high-priority pagination. A progressive transition algorithm is used to interpolate height maps or textures at different resolutions. The interpolation formula is as follows:
[0034] ;
[0035] in, This is the height value after mixing. It uses a progressive weighting, gradually increasing as high-resolution pagination completes loading.
[0036] In one embodiment, the vertex-weighted averaging and texture blending of adjacent page boundaries, and the cyclic mapping of longitude boundaries, include:
[0037] The vertex-weighted average and texture blending process for adjacent page boundaries is as follows:
[0038]
[0039] in, For the first The vertex height values of adjacent pages at the boundary. These are weighting coefficients. n The number of adjacent pages participating in the merging;
[0040] For pages spanning ±180° longitude, the longitude coordinates are processed using modulo operations in the rendering pipeline, and the texture coordinates of the pages spanning ±180° longitude are cyclically shifted.
[0041] A high-precision terrain generation device based on dynamic pagination, the device comprising:
[0042] The preprocessing module is used to divide global terrain data into multi-level tiles and generate multi-level level of detail (LOD) data for each tile, and construct a quadtree-hash table two-level index structure based on the tiles and LOD data.
[0043] The dynamic scheduling module is used to dynamically calculate the LOD level of each tile within the visible range based on the quadtree-hash table two-level index structure, according to the camera view frustum and the predicted future viewpoint position, and generate a pagination scheduling queue based on a priority weight model that includes distance, screen coverage and motion correlation.
[0044] The loading and caching module is used to respond to the paging scheduling queue, asynchronously load high-priority paging data in a loading thread independent of the main rendering thread, and manage the paging data cache using an LRU strategy.
[0045] The real-time rendering module is used to perform real-time 3D rendering of the loaded paginated data. During the rendering process, interpolation is used to transition paginated data at different LOD levels, vertex weighted averaging and texture blending are performed on adjacent pagination boundaries, and longitude boundaries are cyclically mapped.
[0046] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:
[0047] Global terrain data is divided into multi-level tiles, and multi-level level of detail (LOD) data is generated for each tile. A quadtree-hash table two-level index structure is constructed based on the tiles and LOD data.
[0048] Based on the quadtree-hash table two-level index structure, the LOD level of each tile within the visible range is dynamically calculated according to the camera's view frustum and the predicted future viewpoint position, and a pagination scheduling queue is generated based on a priority weight model that includes distance, screen coverage and motion correlation.
[0049] In response to the paging scheduling queue, high-priority paging data is asynchronously loaded in a loading thread independent of the main rendering thread, and the paging data is cached using an LRU strategy.
[0050] The system performs real-time 3D rendering of the loaded paginated data, and uses interpolation to transition paginated data at different LOD levels during the rendering process. It also performs vertex weighted averaging and texture blending on adjacent pagination boundaries and performs cyclic mapping on longitude boundaries.
[0051] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0052] Global terrain data is divided into multi-level tiles, and multi-level level of detail (LOD) data is generated for each tile. A quadtree-hash table two-level index structure is constructed based on the tiles and LOD data.
[0053] Based on the quadtree-hash table two-level index structure, the LOD level of each tile within the visible range is dynamically calculated according to the camera's view frustum and the predicted future viewpoint position, and a pagination scheduling queue is generated based on a priority weight model that includes distance, screen coverage and motion correlation.
[0054] In response to the paging scheduling queue, high-priority paging data is asynchronously loaded in a loading thread independent of the main rendering thread, and the paging data is cached using an LRU strategy.
[0055] The system performs real-time 3D rendering of the loaded paginated data, and uses interpolation to transition paginated data at different LOD levels during the rendering process. It also performs vertex weighted averaging and texture blending on adjacent pagination boundaries and performs cyclic mapping on longitude boundaries.
[0056] The aforementioned high-precision terrain generation method, apparatus, and equipment based on dynamic paging achieve efficient organization and rapid retrieval of massive terrain data by constructing a two-level index structure that integrates quadtrees and hash tables, significantly reducing memory consumption and improving data access efficiency. A dynamic scheduling mechanism based on view frustum analysis and motion prediction accurately predicts changes in the field of view and prioritizes loading key areas, effectively avoiding delays and stuttering in terrain loading. An asynchronous loading method independent of the main rendering thread, combined with intelligent cache management and an LRU eviction strategy, ensures reasonable allocation of system resources and stable operation. Progressive rendering and interpolation transition techniques enable smooth switching between terrain data of different resolutions, eliminating visual jumps. A robust boundary processing mechanism, including vertex weighted averaging, texture blending, and longitude boundary cyclic mapping, guarantees seamless stitching and visual continuity of global terrain. In summary, this solution effectively solves the technical challenges of high memory consumption, low rendering efficiency, and loading lag in real-time generation of large-scale, high-precision terrain, significantly improving system performance and user experience while ensuring visual quality, providing reliable technical support for applications such as digital earth and virtual simulation. Attached Figure Description
[0057] Figure 1 This is an application scenario diagram of a high-precision terrain generation method based on dynamic pagination in one embodiment;
[0058] Figure 2 This is a flowchart illustrating a high-precision terrain generation method based on dynamic pagination in one embodiment;
[0059] Figure 3 This is a structural block diagram of a high-precision terrain generation device based on dynamic pagination in one embodiment;
[0060] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0062] The high-precision terrain generation method based on dynamic paging provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices, and server 104 can be a standalone server or a server cluster consisting of multiple servers.
[0063] In one embodiment, such as Figure 2 As shown, a high-precision terrain generation method based on dynamic pagination is provided, which is then applied to... Figure 1 Taking the server in the example, the following steps are included:
[0064] Step 202: Divide the global terrain data into multi-level tiles and generate multi-level level of detail (LOD) data for each tile. Construct a quadtree-hash table two-level index structure based on the tiles and LOD data.
[0065] This step aims to address the problems of excessive memory consumption and low data organization and retrieval efficiency in existing technologies. Traditional terrain rendering methods typically employ overall loading or simple static chunking strategies, causing terrain data that is not currently visible to the viewpoint to remain resident in memory, resulting in a large amount of inefficient memory resource consumption. Simultaneously, the lack of an efficient index structure makes the retrieval of massive terrain data a performance bottleneck.
[0066] Step 204: Based on the quadtree-hash table two-level index structure, dynamically calculate the LOD level of each tile within the visible range according to the camera's view frustum and the predicted future viewpoint position, and generate a pagination scheduling queue based on a priority weight model that includes distance, screen coverage and motion relevance.
[0067] Step 206: In response to the paging scheduling queue, high-priority paging data is asynchronously loaded in a loading thread independent of the main rendering thread, and the paging data is cached using an LRU strategy.
[0068] Step 208: Perform real-time 3D rendering on the loaded paginated data, and use interpolation to transition paginated data at different LOD levels during the rendering process. Perform vertex weighted averaging and texture blending on adjacent pagination boundaries, and perform cyclic mapping on longitude boundaries.
[0069] The aforementioned high-precision terrain generation method based on dynamic pagination achieves efficient organization and rapid retrieval of massive terrain data by constructing a two-level index structure that integrates quadtrees and hash tables, significantly reducing memory consumption and improving data access efficiency. A dynamic scheduling mechanism based on view frustum analysis and motion prediction accurately predicts changes in the field of view and prioritizes loading key areas, effectively avoiding delays and stuttering in terrain loading. An asynchronous loading method independent of the main rendering thread, combined with intelligent cache management and an LRU eviction strategy, ensures reasonable allocation of system resources and stable operation. Progressive rendering and interpolation transition techniques enable smooth switching between terrain data of different resolutions, eliminating visual jumps. A robust boundary processing mechanism, including vertex weighted averaging, texture blending, and longitude boundary cyclic mapping, guarantees seamless stitching and visual continuity of global terrain.
[0070] In one embodiment, constructing a quadtree-hash table two-level index structure based on tile and LOD data includes: constructing a quadtree with the global scope as the root node, and recursively splitting the quadtree until a preset maximum LOD level is reached; wherein each node stores the latitude and longitude bounding box of its corresponding tile; mapping the two-dimensional latitude and longitude coordinates of the tile and the LOD level information to a unique 64-bit hash key through bit interleaving operation; and constructing a global hash table based on the hash key to obtain the quadtree-hash table two-level index structure.
[0071] Specifically, in this embodiment, the preprocessing of global topographic data includes: dividing global digital elevation data and imagery data into a meridional grid at 1.25km intervals, using the equator as the baseline, and cutting the latitudinal direction using equal-area projection to obtain fixed-size slices. Six levels of LOD data (LOD0~LOD5) are generated for each slice, with resolution decreasing from 100m, and the progression is as follows:
[0072] ;
[0073] in, For the first Level LOD data resolution, For the first Level LOD data resolution.
[0074] BC5 compressed textures and R16 format are used to store elevation data to reduce storage space while ensuring accuracy. A quadtree index is constructed, with the global scope as the root node (LOD0), recursively splitting into 4 child nodes until reaching the LOD5 level. A hierarchical directory structure is used to store the rule-sliced data. Standardized file paths are generated by latitude and longitude coordinates and LOD levels, and a binary file format is designed to encapsulate elevation and texture data. Recursive calculations ensure the spatial inclusion relationship between parent and child nodes. Boundary box structures are constructed using minimum and maximum longitude / latitude values, supporting fast spatial intersection testing. Two-dimensional latitude and longitude coordinates are converted into 64-bit hash keys through bitwise operations, and a global hash table is constructed to achieve O(1) time complexity for queries. For high LOD levels, a sparse hash table is used to optimize memory, combined with the Robin Hood hash algorithm to reduce the collision rate. This embodiment improves data indexing and query efficiency by combining quadtrees and hash tables, laying the foundation for subsequent dynamic scheduling.
[0075] In one embodiment, the LOD level of each tile within the visible range is dynamically calculated as follows:
[0076] ;
[0077] Where floor represents rounding down, D is the distance between the node and the observation point, and S is the screen coverage threshold; and when the variance of the surface normal in the area where the tile is located is detected to be greater than the preset threshold, its LOD level is automatically improved.
[0078] Specifically, in this embodiment, the process of dynamically scheduling terrain data includes: calculating the coordinates of the eight corner points of the current view frustum based on camera parameters; estimating the viewpoint position for the next three frames using a linear prediction algorithm: predicted position = current position + velocity vector × Δt × prediction coefficient, where Δt is the time interval, and the prediction coefficient is dynamically adjusted adaptively based on frame rate fluctuations; employing a hierarchical traversal optimization algorithm, in the coarse-grained screening stage, a conservative spherical bounding volume detection is used to pre-exclude obviously invisible nodes; furthermore, the scene is divided into eight quadrants, and node orientation is quickly determined using a 3-bit mask; in the fine-grained evaluation stage, the required LOD level for each node is dynamically calculated, as shown in the above formula; when the node normal variance is greater than a threshold, the LOD requirement is automatically increased for steep areas; the quadtree is divided into four subtasks according to quadrants, with each thread processing one quadrant subtree, dynamically load balancing, and the task allocation weight is denoted as: task allocation weight = number of subtree nodes × (1 + predicted visibility probability of that quadrant); constructing spatial bounding volume hierarchical monitoring for nodes with LOD less than 3, and implementing parallel intersection testing using CUDA. This embodiment ensures rendering efficiency and quality through dynamic LOD calculation and optimization algorithms.
[0079] In one embodiment, the priority weighting model that includes distance, screen coverage, and motion relevance is as follows:
[0080] ;
[0081] Where Distance represents the distance between the pagination unit and the viewpoint, ScreenCoverage represents the coverage ratio of the pagination unit on the current screen, and MovementRelevance represents the correlation between the pagination unit and the user's future movement direction, with coefficients... These are the configurable weighting coefficients.
[0082] Specifically, in this embodiment, a dynamic weight calculation model is established, and the priority is denoted by the above formula. Coefficient These are used to adjust the weights for distance, coverage, and motion relevance. Pagination is sorted by priority, generating a scheduling queue. This embodiment uses a priority-weighted model to ensure that high-priority areas are loaded first, reducing resource waste.
[0083] In one embodiment, the LRU strategy for caching paginated data includes: when the cache capacity reaches its limit, prioritizing the eviction of least recently used paginated data; when cache resources are scarce, unloading low-priority paginated data in stages, prioritizing the unloading of completely invisible paginated data, and then unloading paginated data that is far from the movement path; and when data loading fails or there is network latency, falling back to low-resolution paginated data for filling, and replacing it after the high-resolution data has been loaded.
[0084] Specifically, in this embodiment, the process of loading and caching terrain data includes: the system sets up an independent data loading thread outside the main rendering thread. This thread traverses the pagination priority queue, taking out the highest priority pagination task from the top of the queue and triggering a data request to avoid blocking the main rendering thread. For each high-priority pagination task, the system first searches the local cache. If the cache is hit, the data is directly returned to the rendering end; if the cache is not hit, the data loading process is started, reading the corresponding pagination data block from external storage (such as local disk or remote server) and performing preprocessing operations such as decompression and format conversion until the data meets the rendering requirements. The loaded pagination data is stored in the local memory cache. The cache adopts an LRU eviction policy, that is, when the cache capacity reaches the limit, the least recently used pagination is released first, thereby freeing up space for newly loaded pagination. Furthermore, when cache resources are scarce, background threads gradually unload these low-priority pagination pages, releasing storage and video memory resources. The unloading process follows a phased strategy: first unload completely invisible pagination pages, then unload pagination pages that are far from the path but may still enter the field of view. In a multi-threaded environment, to avoid cache read / write conflicts, the system uses mutex locks or queue-based synchronization mechanisms to ensure data consistency during cache access. Simultaneously, if network latency or read failure occurs during data loading, the system will fall back to low-resolution pagination for filling, and then replace the pagination with high-resolution data after loading is complete, thus avoiding blank terrain or rendering interruptions. This embodiment improves system stability and response speed through cache management and asynchronous loading.
[0085] In one embodiment, the loaded paginated data is rendered in real time in 3D, and interpolation is used to transition the paginated data at different LOD levels during the rendering process. This includes: constructing vertex buffers and index buffers before the paginated data is passed into the rendering pipeline to form a data structure that the GPU can directly render; adopting a layered rendering strategy, using low-resolution models to render distant or low-priority paginations, and using high-resolution models to render nearby or high-priority paginations; and using a progressive transition algorithm to interpolate height maps or textures at different resolutions, with the interpolation formula being:
[0086] ;
[0087] in, This is the height value after mixing. It uses a progressive weighting, gradually increasing as high-resolution pagination completes loading.
[0088] Specifically, in this embodiment, the real-time 3D rendering process includes: before the paginated data is passed to the rendering pipeline, a vertex buffer and an index buffer are constructed to form a data structure that the GPU can directly render. The system adopts a layered rendering strategy, rendering distant or low-priority paginations with low-resolution models, and gradually replacing nearby, high-priority paginations with high-resolution models. A progressive transition algorithm is used to perform linear or weighted interpolation on height maps or textures of different resolutions, as shown in the above formula. The system performs smooth transitions in height and texture at pagination boundaries, and performs weighted averaging on vertices in adjacent regions of the boundaries to ensure height continuity and natural texture gradation. The rendering module maintains real-time synchronization with the background scheduling thread, and the background continuously updates the priority queue, loading or unloading paginated data. When each frame is refreshed, the rendering module detects the availability of paginated data within the visible range; it replaces newly loaded paginated data with rendering data while maintaining the visual continuity of already rendered paginations. When high-resolution data arrives, progressive replacement is performed again. At the same time, vertex or texture data is interpolated between frames to avoid flickering caused by short-term jumps. This embodiment achieves a smooth visual transition through progressive rendering and interpolation.
[0089] In one embodiment, vertex-weighted averaging and texture blending are performed on adjacent page boundaries, and longitude boundaries are cyclically mapped, including:
[0090] The vertex-weighted average and texture blending process for adjacent page boundaries is as follows:
[0091] ;
[0092] in, For the first The vertex height values of adjacent pages at the boundary. These are weighting coefficients. n The number of adjacent pages participating in the fusion; for pages spanning ±180° longitude, the longitude coordinates are processed using modulo operations in the rendering pipeline, and the texture coordinates of pages spanning ±180° longitude are cyclically shifted.
[0093] Specifically, in this embodiment, the process of handling anomalies and boundaries includes: detecting whether there are unloaded high-resolution pages within the visible range. If so, rendering is performed using low-resolution page data. Once the high-resolution page is loaded, a progressive replacement is used for a smooth transition to ensure visual continuity. A weighted average is applied to the vertices of adjacent page boundaries, as shown in the formula above. Texture map boundaries are blended to avoid abrupt color changes or discontinuities. The range of the smoothing area can be automatically adjusted according to the page resolution; the smoothing area can be reduced at high-resolution page boundaries to improve detail fidelity. When a page crosses a ±180° longitude boundary, the page is cyclically mapped so that it is continuously stitched to the other side during rendering; the data index of the cross-boundary page is adjusted to ensure that the page number and spatial coordinates remain consistent; modulo operations are performed on the longitude coordinates in the rendering pipeline to avoid terrain breaks or blank areas; and combined with boundary smoothing, seamless connection between cross-longitude boundary pages and normal pages is ensured. This embodiment ensures the continuity and consistency of global terrain through boundary processing.
[0094] It should be understood that, although Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0095] In one embodiment, such as Figure 3 As shown, a high-precision terrain generation device based on dynamic pagination is provided, including: a preprocessing module 302, a dynamic scheduling module 304, a loading and caching module 306, and a real-time rendering module 308, wherein:
[0096] The preprocessing module 302 is used to divide global terrain data into multi-level tiles, generate multi-level level of detail (LOD) data for each tile, and construct a quadtree-hash table two-level index structure based on the tiles and LOD data.
[0097] The dynamic scheduling module 304 is used to dynamically calculate the LOD level of each tile within the visible range based on the quadtree-hash table two-level index structure and the camera view frustum and the predicted future viewpoint position, and generate a pagination scheduling queue based on a priority weight model that includes distance, screen coverage and motion correlation.
[0098] The loading and caching module 306 is used to respond to the paging scheduling queue, asynchronously load high-priority paging data in a loading thread independent of the rendering main thread, and manage the paging data cache using an LRU strategy.
[0099] The real-time rendering module 308 is used to perform real-time 3D rendering of the loaded paginated data. During the rendering process, it uses interpolation to transition paginated data at different LOD levels, performs vertex weighted averaging and texture blending on adjacent pagination boundaries, and performs cyclic mapping on longitude boundaries.
[0100] Specific limitations regarding the high-precision terrain generation device based on dynamic paging can be found in the method limitations section above, and will not be repeated here. Each module in the aforementioned high-precision terrain generation device based on dynamic paging can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0101] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores terrain data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a high-precision terrain generation method based on dynamic paging.
[0102] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0103] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method described above.
[0104] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0105] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0106] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0107] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A high-precision terrain generation method based on dynamic paging, characterized in that, The method comprises: dividing global terrain data into multiple levels of tiles, and generating multiple levels of detail (LOD) data for each tile, constructing a quadtree-hash table two-level index structure based on the tiles and the LOD data; based on the quadtree-hash table two-level index structure, dynamically calculating the LOD level of each tile within the visible range according to the camera frustum and the predicted future viewpoint position, and generating a paging scheduling queue according to a priority weight model containing distance, screen coverage and motion correlation; in response to the paging scheduling queue, asynchronously loading high-priority paging data in a loading thread independent of a rendering main thread, and using an LRU strategy to manage the paging data in cache; performing real-time three-dimensional rendering on the loaded paging data, and using interpolation transition on paging data of different LOD levels during the rendering process, vertex weighted average and texture blending processing on adjacent paging boundaries, and cyclic mapping on longitude boundaries.
2. The method of claim 1, wherein, Constructing a quadtree-hash table two-level index structure based on the tiles and the LOD data comprises: constructing a quadtree with a global range as a root node, recursively splitting the quadtree until a preset maximum LOD level is reached; wherein each node stores the latitude and longitude bounding box of its corresponding tile; mapping the two-dimensional latitude and longitude coordinates of the tile and the LOD level information through a bit interleaving operation to obtain a unique 64-bit hash key; constructing a global hash table based on the hash key to obtain the quadtree-hash table two-level index structure.
3. The method of claim 1, wherein, Dynamically calculating the LOD level of each tile within the visible range comprises: The LOD level of each tile within the visible range is dynamically calculated as: ; wherein floor represents rounding down, D is the distance between the node and the observation point, and S is the screen coverage threshold; and when it is detected that the ground surface normal variance of the area where the tile is located is greater than a preset threshold, the LOD level of the tile is automatically increased.
4. The method of claim 1, wherein, The priority weight model containing distance, screen coverage and motion correlation is: ; wherein Distance represents the distance between the paging unit and the observation point, ScreenCoverage represents the coverage ratio of the paging unit on the current screen, MovementRelevance represents the relevance of the paging unit to the future movement direction of the user, and coefficients , , are configurable weight coefficients, respectively.
5. The method of claim 1, wherein, Using an LRU strategy to manage the paging data in cache comprises: when the cache capacity reaches the upper limit, the least recently used paging data is preferentially eliminated; when the cache resources are tight, low-priority pages are unloaded in stages, with completely invisible pages being preferentially unloaded, followed by pages far from the motion path; when data loading fails or network delay occurs, low-resolution paging data is used for filling, and high-resolution data is replaced after loading is completed.
6. The method of claim 1, wherein, Performing real-time three-dimensional rendering on the loaded paging data, and using interpolation transition on paging data of different LOD levels during the rendering process comprises: before the paging data is transmitted into the rendering pipeline, constructing a vertex buffer and an index buffer to form a data structure that can be directly rendered by the GPU; using a layered rendering strategy, rendering low-resolution models for distant or low-priority pages, and rendering high-resolution models for close-range or high-priority pages, and using a progressive transition algorithm to interpolate height maps or textures of different resolutions, with the interpolation formula being: ; wherein, is the height value after mixing, is the progressive weight, which is increased gradually as the high-resolution page loading is completed.
7. The method of claim 1, wherein, performing vertex weighted average and texture blending processing on adjacent paging boundaries, and performing cyclic mapping on longitude boundaries comprises: The vertex weighted average and texture blending processing for adjacent paging boundaries are: ; wherein, is the vertex height value of the first adjacent page at the boundary, is the vertex height value of the second adjacent page at the boundary, is a weighting coefficient, n is the number of adjacent pages participating in the fusion; For the paging across the longitude of ±180°, the longitude coordinate is processed by modulo operation in the rendering pipeline, and the texture coordinates of the paging across the longitude of ±180° are circularly shifted.
8. A high-precision terrain generation device based on dynamic paging, characterized in that, The device comprises: a preprocessing module, configured to divide global terrain data into multiple levels of tiles, and generate multiple levels of level of detail (LOD) data for each tile, and construct a quadtree-hash table two-level index structure based on the tiles and the LOD data; a dynamic scheduling module, configured to dynamically calculate the LOD level of each tile within a visible range according to a camera frustum and a predicted future viewpoint position based on the quadtree-hash table two-level index structure, and generate a paging scheduling queue according to a priority weight model related to distance, screen coverage rate and motion; a loading and caching module, configured to asynchronously load high-priority paging data in a loading thread independent of a rendering main thread in response to the paging scheduling queue, and perform caching management on the paging data by using an LRU strategy; a real-time rendering module, configured to perform real-time three-dimensional rendering on the loaded paging data, and perform interpolation transition on paging data of different LOD levels, vertex weighted average and texture blending processing for adjacent paging boundaries, and circular mapping for longitude boundaries during the rendering process. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program. The processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
Citation Information
Patent Citations
GIS model optimization method and system based on LOD organization and scheduling method
CN110276820A
Visualization method and system for massive three-dimensional model data
CN110992469A