Rendering method for local loading cache synchronous optimization rendering of large-scale basin twinborn model

The method of rendering large-scale watershed twin models synchronously optimized rendering of large-scale watershed twin models is solved, and the rendering bottleneck of digital twin models is achieved when processing large-scale data is achieved, and the model is lightweight and real-time rendering is achieved. The visualization effect is good, reducing the thread consumption of GPU.

CN119888038APending Publication Date: 2025-04-25FUJIAN ZHONGRUI HANDING DIGITAL TECH CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411963539.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

Digital twin models face rendering bottlenecks when processing large-scale data, including high real-time requirements, high hardware resource consumption, high data accuracy requirements and high real-time interactive requirements, resulting in high costs and equipment requirements.

Method used

The method of rendering large-scale watershed twin models synchronously through local loading caches includes reconstructing top-level indexes, vertex compression and quality compression on the original model dataset, creating different levels of detail models for different regions, and optimizing the overall rendering pipeline with fragment shaders and vertex shaders.

Benefits of technology

It realizes the lightweighting of large-scale digital twin models, reduces the overall data volume of the model, and ensures visualization, real-time dynamic loading of large-scale twin models rendering visualization, and reduces GPU thread consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888038A_ABST
    Figure CN119888038A_ABST
Patent Text Reader

Abstract

The invention relates to a rendering method for local loading cache synchronous optimization rendering of a large-scale basin twinborn model, and belongs to the field of digital twinborn model rendering. The method comprises the following steps of: reconstructing a top index for an original model data set, and combining the original model data set into an integral data set through vertex compression and quality compression so as to realize the purpose of accelerating rendering; according to the method, detail models of different levels are created for different areas, so that the real-time rendering precision of the area far away from an observer is reduced, the calculated amount is reduced, optimization of an overall rendering pipeline is carried out in combination with a fragment shader and a vertex shader, thread consumption of a GPU is reduced, and real-time loading of a large-scale drainage basin twin model and display of simulation scene change are achieved. According to the method, the large-scale digital twin model can be lightened, the overall data size of the model is reduced while the visualization effect is guaranteed, and meanwhile, rendering visualization of the large-scale twin model can be dynamically loaded in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of digital twin model rendering, and specifically relates to a rendering method for locally loading cache synchronously optimizing rendering of a large-scale watershed twin model. Background Art

[0002] The market application of digital twin models is quite extensive, involving multiple industries and fields. It is widely used in the infrastructure of the urban information model (CIM) platform, as well as G-end (government and public institutions) market applications in the fields of transportation, underground space, security and emergency, environmental protection and water affairs.

[0003] With the application of digital twin technology, in actual scenarios, the rendering bottlenecks faced by digital twin models when processing large amounts of data are mainly reflected in high real-time requirements, large hardware resource consumption, high data accuracy requirements, and high real-time interactivity requirements; digital twins require the rendering engine to be able to reflect the changes in real-world data in real time, including environmental changes, equipment status updates, etc. However, the current rendering technology still has delays in processing real-time rendering of complex scenes. High-quality rendering requires a large amount of computing resources, which may lead to high costs and equipment requirements in actual applications. The output quality of the rendering engine depends largely on the input model and data accuracy; the digital twin system not only needs to display data, but also needs to allow users to interact through an intuitive interface, which puts higher requirements on the flexibility and response speed of rendering technology. Digital twin water conservancy requires the construction of a highly integrated data base to achieve synchronous mapping between virtual and physical environments. The data base is not only the result of digital mapping of water conservancy, but also the basis for digital scene construction and intelligent simulation iteration. Specifically, the data base integrates multi-source information such as geospatial data, basic data, monitoring data, business management data and shared data. Summary of the invention

[0004] The purpose of the present invention is to provide a rendering method for locally loading cache and synchronously optimizing the rendering of a large-scale watershed twin model. This method can lightweight the large-scale digital twin model, reduce the overall data volume of the model while ensuring the visualization effect, and realize real-time dynamic loading of large-scale twin model rendering visualization.

[0005] To achieve the above object, the technical solution of the present invention is: a rendering method for locally loading cache synchronously optimizing rendering of a large-scale watershed twin model, comprising:

[0006] The top-level index of the original model data set is rebuilt, and merged into an overall data set through vertex compression and quality compression to achieve the purpose of accelerated rendering.

[0007] Also includes:

[0008] Create models of different levels of detail for different areas to reduce the real-time rendering accuracy and calculation amount of areas far away from the observer, and combine fragment shaders and vertex shaders to optimize the overall rendering pipeline and reduce GPU thread consumption to achieve real-time loading of large-scale watershed twin models and simulate the display of scene changes.

[0009] In one embodiment of the present invention, the reconstruction of the top-level index is specifically implemented as follows:

[0010] The model data in the original model data set is formatted and indexed in a predetermined format, and the indexes are merged after removing redundant indexes to achieve fast retrieval, and the number of model requests is reduced in conjunction with LOD to achieve accelerated rendering.

[0011] In one embodiment of the present invention, the vertex compression is specifically implemented as follows:

[0012] By merging adjacent vertices, the model storage space is reduced to achieve the purpose of accelerated rendering; vertex data adopts a hierarchical storage structure, and vertex data is organized according to different layers or levels. Each layer of vertex data has its corresponding compression format and storage strategy.

[0013] In one embodiment of the present invention, the quality compression is specifically implemented as follows:

[0014] The RGBA color channels of the model material map texture data in the original model data set are compressed to 5 to 8 bits to reduce the storage space occupied by the color. By combining data block processing and LOD, the purpose of accelerated rendering is achieved.

[0015] In one embodiment of the present invention, detail models of different levels are created for different areas to reduce the real-time rendering accuracy of areas far from the observer and reduce the amount of calculation. The specific implementation method is as follows:

[0016] First, multiple model versions with different levels of detail are generated for the original model dataset; then, during the rendering process, the distance between the observer and the model is determined based on the observer's position and viewing angle, and the corresponding model version is dynamically selected for rendering.

[0017] In one embodiment of the present invention, the distance between the observer and the model is determined based on an error metric.

[0018] In one embodiment of the present invention, the overall rendering pipeline is optimized by combining the fragment shader and the vertex shader, specifically including:

[0019] Shader optimization: Remove or simplify unnecessary calculation steps and conditional judgments in shaders, simplify shader logic, and improve shader execution efficiency; for repeated geometries in large-scale watershed twin models, use instanced rendering technology to render multiple instances of the same geometry through one drawing call, reducing the number of GPU drawing times;

[0020] Rendering pipeline optimization: merge drawing calls with the same material and geometry attributes to reduce the GPU's drawing load, optimize the rendering queue, sort objects by material or depth, and use glMultiDrawArrays or glMultiDrawElements to submit drawing calls in batches; at the same time, use depth testing and occlusion culling technology to cull pixels blocked by other objects in advance, avoid unnecessary shading calculations, and further improve rendering efficiency.

[0021] In one embodiment of the present invention, the thread consumption of the GPU is reduced, and the specific implementation method is as follows:

[0022] In terms of GPU memory management, memory paging and compression technology and dynamic resource management strategies are adopted. Specifically, GPU memory is managed efficiently by storing model data in pages and loading them on demand. Texture compression technology and vertex data compression algorithms are used to reduce memory usage. At the same time, dynamic resource management strategies are used, namely dynamic loading and unloading of resources, to dynamically allocate and release GPU memory according to scene requirements, so as to reduce GPU consumption and better exert GPU performance.

[0023] In one embodiment of the present invention, the method is specifically implemented in the following steps:

[0024] S1. Prepare model data in fbx, glb, and obj formats to form the original model data set;

[0025] S2, extracting feature information from vertex data, surface data, and line data in the original model data set, that is, counting the number of vertices, the number of surfaces, and the number of lines in the original model data set;

[0026] S3, using the nearest vertex merging algorithm and the draco algorithm to optimize vertex compression, as follows:

[0027] S31, based on the counted number of vertices in the original model data set, using a nearest vertex merging algorithm to merge vertices;

[0028] S32, using the draco algorithm to achieve vertex compression by encoding vertex positions, normals, colors, and texture coordinates;

[0029] S4, the model material map texture data in the original model data set is colored using the 4 color channels of the texture channel rgba, and multiple model material map texture data are merged to achieve different channels storing different color information;

[0030] S5, compressing the texture and image quality of each channel to control the color to a predetermined level of quality;

[0031] S6. Convert the optimized model into a vector LOD slice format through a tile index algorithm to generate a rectangular bounding box; reference the 3dtileset data format to slice the model into LOD multi-level model accuracy;

[0032] S7. Use WebGL screen space calculation and occlusion culling to render the current visible range; combine with WebGL rendering pipeline, use off-screen rendered images, and render models of different viewing distances of the viewing cone in real time on the screen with different precision.

[0033] Compared with the prior art, the present invention has the following beneficial effects:

[0034] (1) The data processing and rendering strategy provided by the present invention can make large-scale digital twin models lightweight, thereby reducing the overall data volume of the model while ensuring the visualization effect.

[0035] (2) The present invention optimizes the entire rendering pipeline of the shader, reduces the amount of calculation in the area far away from the observer, reduces the thread consumption of the GPU, and realizes real-time dynamic loading of large-scale twin model rendering visualization. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 The present invention is a flowchart for the overall implementation of the method.

[0037] Figure 2 Schematic diagram of vertex merging.

[0038] Figure 3 To simplify the shader logic graph. DETAILED DESCRIPTION

[0039] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.

[0040] The present invention provides a rendering method for locally loading, caching, synchronously optimizing and rendering a large-scale watershed twin model, comprising:

[0041] The top-level index of the original model data set is rebuilt, and merged into an overall data set through vertex compression and quality compression to achieve the purpose of accelerated rendering.

[0042] Also includes:

[0043] Create models of different levels of detail for different areas to reduce the real-time rendering accuracy and calculation amount of areas far away from the observer, and combine fragment shaders and vertex shaders to optimize the overall rendering pipeline and reduce GPU thread consumption to achieve real-time loading of large-scale watershed twin models and simulate the display of scene changes.

[0044] The following is the specific implementation process of the present invention.

[0045] The first purpose of the present invention is to adopt an efficient data processing and rendering strategy, rebuild the top-level index of the huge data set, compress the vertices, compress the quality, and merge them into an integrated data set to accelerate rendering.

[0046] The technical solution to achieve the first purpose of the present invention is: first, rebuild the top-level index, format the model data in a specific format and mark the index, remove redundant indexes and merge the indexes to achieve fast retrieval, reduce the number of model requests with LOD, and quickly render; then compress the vertices, merge adjacent vertices, optimize the routing of triangles (such as Figure 2 ), convert to quad face optimization, reduce model storage space, and accelerate rendering; finally, perform model quality compression, compress model material map texture data, RGBA color channel to 5-8 bits, reduce color storage space, and achieve the purpose of accelerating rendering. By combining data block processing and LOD technology, large-scale spatial data can be effectively processed and efficient and high-quality rendering can be achieved. After completing data preprocessing, data compression and storage can not only significantly reduce data storage space, thereby reducing storage costs, but also effectively reduce bandwidth pressure during data transmission and improve data transmission efficiency. For texture data, compression algorithms based on wavelet transform or discrete cosine transform are used, which can well preserve image details while greatly reducing the amount of data. For vertex data, algorithms such as quantization or predictive coding are used. The algorithm can remove redundant information in the data and achieve efficient compression. In addition, a hierarchical storage structure is used to organize data according to different levels or levels. Each layer of data has its own specific compression format and storage strategy. Establishing an efficient B-tree index mechanism can quickly locate the required data blocks, thereby speeding up data loading.

[0047] The second purpose of the present invention is to reduce the amount of calculation by lowering the real-time rendering accuracy of areas far away from the observer while maintaining the visual effect, and to reduce the thread consumption of the GPU by combining the fragment shader and the vertex shader to achieve real-time loading of large-scale twin models and simulate the display of scene changes.

[0048] The technical solution for achieving the second purpose of the present invention is: first, generate multiple model versions of different fineness for the original data. Then, during the rendering process, dynamically select the appropriate model version for rendering according to the position and viewing angle of the observer. This can be determined by calculating the distance and viewing angle between the observer and the model. An error metric is used to judge the distance and which level of discrete LOD model to use. Commonly used error metrics include the length or area projected on the screen space. Discrete LOD is bound to have mutations. To be more natural visually, more complex error metrics in visual perception are required. Continuous LOD uses some interpolation methods to deform the model from one level of LOD to another.

[0049] In terms of shader optimization, simplifying shader logic (such as Figure 3 ) and use instanced rendering technology. By removing or simplifying unnecessary calculation steps and conditional judgments in the shader, the execution efficiency of the shader can be improved. In GLSL, use the discard keyword to eliminate unnecessary pixel calculations, and reduce computing overhead by optimizing loop structures and avoiding unnecessary conditional branches. For repeated geometries in the model, use instanced rendering technology, use functions such as glDrawArraysInstanced or glDrawElementsInstanced, and render multiple instances of the same geometry through a single drawing call, thereby significantly reducing the number of GPU draws.

[0050] In terms of rendering pipeline optimization, we focus on reducing draw calls and utilizing depth testing and occlusion culling techniques. By merging draw calls with the same material and geometry attributes, the GPU drawing load can be reduced. Optimize the rendering queue, sort objects by material or depth, and use glMultiDrawArrays or glMultiDrawElements to submit draw calls in batches. At the same time, by utilizing depth testing and occlusion culling techniques, by turning on options such as GL_DEPTH_TEST and GL_CULL_FACE, we can cull pixels that are occluded by other objects in advance, avoid unnecessary shading calculations, and further improve rendering efficiency.

[0051] In terms of GPU memory management, memory paging and compression technology and dynamic resource management strategies are used. GPU memory is managed efficiently by storing model data in pages and loading them on demand. Texture compression technology (ETC1, S3TC, etc.) and vertex data compression algorithms are used to reduce memory usage. At the same time, dynamic loading and unloading of resources are used to dynamically allocate and release GPU memory according to scene requirements to reduce GPU consumption and better utilize GPU performance.

[0052] In summary, the purpose of the present invention is to quickly load massive models and quickly render them, such as Figure 1 As shown, the detailed implementation process of the method of the present invention is as follows:

[0053] 1. Prepare model data in fbx / glb / obj and other formats.

[0054] 2. Use the self-developed algorithm to extract feature information from the model file's vertex and face data. This algorithm is mainly aimed at the model, and calculates the model's vertex, face, and line data to count the number of vertices, faces, and lines of the current model. A more intuitive visualization of the current model's data is convenient for later optimization of the vertex merging algorithm (the core code logic is implemented as follows).

[0055]

[0056]

[0057] 3. Use the self-developed algorithm for finding the nearest vertex merging and the draco algorithm for vertex compression optimization.

[0058] (1) The model of model vertex, line and surface data is calculated, and the nearest vertex merging algorithm is performed to achieve model vertex optimization (the core code logic is implemented as follows).

[0059]

[0060] (2) Draco's core algorithm (the core code logic is implemented as follows) achieves compression by efficiently encoding vertex positions, normals, colors, texture coordinates, etc. Although Draco compression is a relatively complex process, we have integrated automated scripts for the Draco algorithm library to automatically complete a series of compression optimizations.

[0061]

[0062]

[0063] 4. For the map texture, use the texture channel rgba 4 color channels to distribute the coloring, so that the original GPU needs to sample 4 textures, and sample on one texture, reducing the number of GPU communications. Use the self-developed automatic script (the core code logic is implemented as follows) to merge multiple map textures and realize different channels to store different color information.

[0064]

[0065]

[0066]

[0067] 5. For the texture of each channel, the image uses a self-developed compression algorithm (the core code logic is implemented as follows), and the compression quality controls the color to a reasonable level of quality.

[0068] Code logic implementation of the independently developed compression algorithm:

[0069]

[0070]

[0071]

[0072] 6. Convert the optimized model into vector LOD slice format through tile index algorithm and generate rectangular bounding box. Use 3dtileset data format to slice the model into LOD multi-level model accuracy.

[0073] 7. Use webgl screen space calculation, occlusion culling, and render the current visible range. Combined with the webgl rendering pipeline, use off-screen rendered images to render models of different viewing distances of the view frustum in real time on the screen with different precisions, which is a more efficient pre-rendering mode.

[0074] The above are preferred embodiments of the present invention. Any changes made according to the technical solution of the present invention, as long as the resulting functions do not exceed the scope of the technical solution of the present invention, belong to the protection scope of the present invention.

Claims

1. A rendering method for locally loading cache synchronously optimized rendering of a large-scale watershed twin model, characterized in that: include: The top-level index of the original model data set is rebuilt, and merged into an overall data set through vertex compression and quality compression to achieve the purpose of accelerated rendering.

2. According to claim 1, a rendering method for locally loading cache synchronously optimizing rendering of a large-scale watershed twin model is characterized in that: Also includes: Create models of different levels of detail for different areas to reduce the real-time rendering accuracy and calculation amount of areas far away from the observer, and combine fragment shaders and vertex shaders to optimize the overall rendering pipeline and reduce GPU thread consumption to achieve real-time loading of large-scale watershed twin models and simulate the display of scene changes.

3. According to claim 1, a rendering method for locally loading cache synchronously optimizing rendering of a large-scale watershed twin model is characterized in that: The reconstruction of the top-level index is specifically implemented as follows: The model data in the original model data set is formatted and indexed in a predetermined format, and the indexes are merged after removing redundant indexes to achieve fast retrieval, and the number of model requests is reduced in conjunction with LOD to achieve accelerated rendering.

4. According to claim 1, a rendering method for locally loading cache synchronously optimizing rendering of a large-scale watershed twin model is characterized in that: The vertex compression is specifically implemented as follows: By merging adjacent vertices, the model storage space is reduced to achieve the purpose of accelerated rendering; vertex data adopts a hierarchical storage structure, and vertex data is organized according to different layers or levels. Each layer of vertex data has its corresponding compression format and storage strategy.

5. According to claim 1, a rendering method for locally loading cache synchronously optimizing rendering of a large-scale watershed twin model is characterized in that: The quality compression is specifically implemented as follows: The RGBA color channels of the model material map texture data in the original model data set are compressed to 5 to 8 bits to reduce the storage space occupied by the color. By combining data block processing and LOD, the purpose of accelerated rendering is achieved.

6. According to claim 2, a rendering method for locally loading cache synchronously optimizing rendering of a large-scale watershed twin model is characterized in that: Create different levels of detail models for different areas to reduce the real-time rendering accuracy and computational complexity of areas far from the observer. The specific implementation method is as follows: First, multiple model versions with different levels of detail are generated for the original model dataset; then, during the rendering process, the distance between the observer and the model is determined based on the observer's position and viewing angle, and the corresponding model version is dynamically selected for rendering.

7. According to claim 6, a rendering method for locally loading cache synchronously optimizing rendering of a large-scale watershed twin model is characterized in that: Determine the distance between the observer and the model based on the error metric.

8. According to claim 1, a rendering method for locally loading cache synchronously optimizing rendering of a large-scale watershed twin model is characterized in that: Combine fragment shader and vertex shader to optimize the entire rendering pipeline, including: Shader optimization: Remove or simplify unnecessary calculation steps and conditional judgments in shaders, simplify shader logic, and improve shader execution efficiency; for repeated geometries in large-scale watershed twin models, use instanced rendering technology to render multiple instances of the same geometry through one drawing call, reducing the number of GPU drawing times; Rendering pipeline optimization: merge drawing calls with the same material and geometry attributes to reduce the GPU's drawing load, optimize the rendering queue, sort objects by material or depth, and use glMultiDrawArrays or glMultiDrawElements to submit drawing calls in batches; at the same time, use depth testing and occlusion culling technology to cull pixels blocked by other objects in advance, avoid unnecessary shading calculations, and further improve rendering efficiency.

9. According to claim 1, a rendering method for locally loading cache synchronously optimizing rendering of a large-scale watershed twin model is characterized in that: Reduce GPU thread consumption. The specific implementation methods are: In terms of GPU memory management, memory paging and compression technology and dynamic resource management strategies are adopted. Specifically, GPU memory is managed efficiently by storing model data in pages and loading them on demand. Texture compression technology and vertex data compression algorithms are used to reduce memory usage. At the same time, dynamic resource management strategies are used, namely dynamic loading and unloading of resources, to dynamically allocate and release GPU memory according to scene requirements, so as to reduce GPU consumption and better exert GPU performance.

10. The rendering method of a large-scale watershed twin model by local loading, caching and synchronous optimization rendering according to claim 2 is characterized in that: The specific implementation steps of the method are as follows: S1. Prepare model data in fbx, glb, and obj formats to form the original model data set; S2, extracting feature information from vertex data, surface data, and line data in the original model data set, that is, counting the number of vertices, the number of surfaces, and the number of lines in the original model data set; S3, using the nearest vertex merging algorithm and the draco algorithm to optimize vertex compression, as follows: S31, based on the counted number of vertices in the original model data set, using a nearest vertex merging algorithm to merge vertices; S32, using the draco algorithm to achieve vertex compression by encoding vertex positions, normals, colors, and texture coordinates; S4, the model material map texture data in the original model data set is colored using the 4 color channels of the texture channel rgba, and multiple model material map texture data are merged to achieve different channels storing different color information; S5, compressing the texture and image quality of each channel to control the color to a predetermined level of quality; S6. Convert the optimized model into a vector LOD slice format through a tile index algorithm to generate a rectangular bounding box; reference the 3dtileset data format to slice the model into LOD multi-level model accuracy; S7. Use WebGL screen space calculation and occlusion culling to render the current visible range; combine with WebGL rendering pipeline, use off-screen rendered images, and render models of different viewing distances of the viewing cone in real time on the screen with different precision.

Citation Information

Cited By

  • Visualization system and method for urban building group earthquake disaster simulation

    CN120409066A

  • Dynamic lightweight method for digital BIM twinborn model of combined air conditioning unit

    CN120765881A

  • Front-end graph rendering system and method based on WebGPU

    CN121169662A

  • Lightweight hierarchical digital twinning modeling and rendering method for large-scale scene

    CN121708228A

  • Three-dimensional model lightweight compression method and system based on layered depth image

    CN121767570A