Rendering scene division and storage optimization method and system for large-volume model
By optimizing scene partitioning and storage for large-scale models, the problems of frequent material state switching and vertex count exceeding limits in GPU rendering were solved, achieving efficient rendering and loading and improving the rendering performance of mobile devices.
Patent Information
- Application Number
- CN202511142381.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-08-15
AI Technical Summary
In existing technologies, rendering large-scale models requires frequent switching of material states during GPU rendering, resulting in excessive submissions. On resource-constrained devices such as mobile devices, the number of vertices in a single rendering unit exceeds the limit, which can easily cause rendering interruptions or a sudden drop in frame rate, making it difficult to meet the needs of real-time interaction.
By collecting geometric data of scene components, calculating bounding box information, statistically analyzing material reuse, initializing the BVH root node and dividing the BVH based on the diagonal length of the bounding box space, organizing geometric data files according to BVH node numbers, constructing a streaming rendering Node structure directory, recording component transformation information and material markers, and optimizing data storage and rendering processes.
By reducing the number of GPU data submissions, controlling the size of individual data blocks, and prioritizing the loading of data required by the current node, the rendering frame rate and loading speed of large-scale models have been improved, thus meeting the needs of real-time interaction.
Smart Images

Figure CN121095413A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of model rendering, in particular to a rendering scene division and storage optimization method and system for large-scale models. BACKGROUND
[0002] With the rapid development of three-dimensional modeling, virtual reality, digital twin and other technologies, the real-time rendering demand of large-scale two-dimensional and three-dimensional models (such as city-level BIM models, large-scale game scenes, and industrial design models) is increasing. Such scenes usually contain millions or even hundreds of millions of geometric components, and need to meet the requirements of fast loading, smooth interaction and high frame rate rendering.
[0003] In the prior art, optimization for large-scale data rendering usually adopts a front-end and back-end collaborative processing strategy: on the front-end level, the amount of view frustum culling calculation is reduced by using spatial division algorithms such as boundary volume hierarchy and octree, or the LOD (Level of Detail) technology is used to dynamically adjust the model precision; on the back-end level, data compression, streaming transmission, component priority loading and other methods are used to reduce network transmission pressure. However, the data storage is usually organized independently by components, which leads to frequent switching of material states during GPU rendering and too many submission times. In resource-constrained devices such as mobile terminals, the vertex number of a single rendering unit exceeds the limit, which has not been specifically addressed and is prone to cause rendering interruption or frame rate drop. These deficiencies make it difficult for traditional technologies to balance loading speed and rendering efficiency, and cannot meet the real-time interaction demand of large-scale scenes.
[0004] Based on this, the present application provides a rendering scene division and storage optimization method and system for large-scale models. SUMMARY
[0005] In order to improve the problem that data storage is usually organized independently by components, which leads to frequent switching of material states during GPU rendering and too many submission times, and the problem that in resource-constrained devices such as mobile terminals, the vertex number of a single rendering unit exceeds the limit, which has not been specifically addressed and is prone to cause rendering interruption or frame rate drop, the present application provides a rendering scene division and storage optimization method and system for large-scale models.
[0006] In the first aspect, the present application provides a rendering scene division and storage optimization method for large-scale models, which adopts the following technical solution: comprising: Collecting the geometric data of all components in the scene, obtaining vertex information and calculating the bounding box information of components and primitives, counting material information and reuse situation, and obtaining component preprocessing information; Initializing the BVH root node based on the component preprocessing information and setting the global bounding box, and performing BVH division on the components based on the space diagonal length of the bounding box, to obtain the scene division result; According to the scene division result, organize the geometry data file according to the BVH node number, classify the vertex, index, normal and uv data into Block block, and record the geometry position information in the block; Based on the BVH tree construction streaming rendering Node structure directory, record the component transformation information, material marker and independent rendering block composition data in the node.
[0007] Optionally, the geometry data of all components in the scene is collected, the vertex information is obtained and the bounding box information of the components and primitives is calculated, the material information and reuse condition are counted, and component preprocessing information is obtained, including: The vertex information of all components in the scene is obtained, and the bounding box information of the components and the primitives constituting the components is calculated according to the vertex information and the transformation matrix; The material information is counted according to whether there is a texture map, and the reuse condition is counted according to whether the components are reused; The components are sorted according to the size of the bounding box, and a priority queue of the components is established, and the size sorting is determined by the diagonal length or the surface area of the bounding box; The material distribution characteristics are analyzed, and a material-component mapping table is established; The number of vertices of each component is counted, the super limit component whose vertex number exceeds 65535 is marked, and the component preprocessing information is obtained.
[0008] Optionally, the BVH root node is initialized based on the component preprocessing information and the global bounding box is set, and the components are BVH divided based on the space diagonal length of the bounding box, and the scene division result is obtained, including: The BVH root node is initialized based on the component preprocessing information and the global bounding box is set; The components are BVH divided based on the space diagonal length of the bounding box; The components whose bounding box space diagonal length is greater than 1 / 3 of the current node bounding box space diagonal length are moved to the corresponding parent node, and the current step is repeated until the components are moved to the top node; The data in the node is balanced, the super limit primitive is put into the same level single node, the rendering unit block is divided according to the material, and the material block whose vertex number exceeds the limit is re-divided until the requirement is met.
[0009] Optionally, the data in the node is balanced, the super limit primitive is put into the same level single node, the rendering unit block is divided according to the material, and the material block whose vertex number exceeds the limit is re-divided until the requirement is met, including: The data in the node is balanced, the super limit primitive is put into the same level single node, the rendering unit block is divided according to the material, and the material block whose vertex number exceeds the limit is re-divided until the requirement is met. The components inside the node are divided into different independent rendering blocks according to the material, if the number of vertices of the independent rendering block corresponding to a certain material is greater than 65535, the independent rendering block composed of components corresponding to the material is further divided until the number of vertices of the corresponding independent rendering block is less than 65535.
[0010] Optionally, according to the scene division result, the geometry data file is organized according to the BVH node number, the vertex, index, normal and uv data are classified and put into the Block block, and the block position information of the geometry is recorded, including: According to the scene division result, the geometry, material and component information are processed and written into the corresponding file; According to the independent rendering block of the scene division, the geometry information is organized, and the vertex, index, normal and uv are respectively put into a large array to form an independent Block block; The starting and ending positions of the geometry in the Block block and the component composition information of the independent rendering unit are recorded.
[0011] Optionally, the Node structure directory for streaming rendering is constructed based on the BVH tree, and the component transformation information, material marker and independent rendering block composition data are recorded in the node, including: The Node structure directory for streaming rendering is constructed according to the BVH tree, and the data required by the current node is stored preferentially; The component transformation information, material marker and independent rendering block composition data are recorded in the node, and the independent rendering block composition data includes the primitive bounding box and associated material data.
[0012] Optionally, before the Node structure directory for streaming rendering is constructed based on the BVH tree, the component transformation information, material marker and independent rendering block composition data are recorded in the node, further including: The size of the Block block is controlled to be not more than 2M, and if it is too large, further subdivision is performed.
[0013] In the second aspect, the application discloses a rendering scene division and storage optimization device for large models, which adopts the following technical scheme, including: The component processing module is used for collecting the geometry data of all components in the scene, obtaining vertex information and calculating the bounding box information of components and primitives, counting material information and reuse, and obtaining component preprocessing information; The space division module is used for initializing the BVH root node based on the component preprocessing information and setting the global bounding box, and performing BVH division on the components based on the space diagonal length of the bounding box to obtain the scene division result; a file storage module configured to organize geometry data files according to the scene division result, and to sort vertices, indexes, normals and uv data into Block blocks and record the position information of the geometry in the blocks according to the BVH node number; a rendering information module configured to construct a streaming rendering Node structure directory based on the BVH tree, and to record the component transformation information, material markers and independent rendering block data in the nodes.
[0014] In a third aspect, the present application further provides a control device, which comprises: a memory and a processor, wherein the memory stores a computer program capable of being loaded and executed by the processor to perform the scene division and storage optimization method for rendering a large-scale model as described above.
[0015] In a fourth aspect, the present application further provides a computer readable storage medium storing a computer program capable of being loaded and executed by a processor to perform the scene division and storage optimization method for rendering a large-scale model as described above.
[0016] In summary, in the present application, the scene components are first preprocessed to collect geometry data, calculate bounding boxes, count material reuse and mark components exceeding the limit; then, a BVH hierarchy is constructed based on the diagonal length of the bounding box, the problem of vertex number exceeding the limit is solved by dynamically adjusting the distribution of components in the node (moving large-size components to the parent node), balancing node data and dividing rendering unit blocks according to materials; subsequently, geometry data is organized according to the BVH division result, and vertices, indexes and the like are sorted and stored in Block blocks with a size of 2M or less and the position information is recorded; finally, a streaming rendering Node structure directory is constructed based on the BVH tree, and the component transformation information, material markers and independent rendering block data are recorded. The overall scheme realizes the technical effects of reducing the number of GPU data submission, controlling the size of single block data and preferentially loading data required by the current node by deeply coupling space division and storage optimization, and provides a systematic solution for real-time rendering of large-scale models. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 is a flowchart of a scene division and storage optimization method for rendering a large-scale model.
[0018] Figure 2 is a structural block diagram of a scene division and storage optimization device for rendering a large-scale model. DETAILED DESCRIPTION
[0019] The following will be described in detail in combination with Figure 1 - Figure 2 The present application will be further described in detail.
[0020] When facing the demand of quickly loading, rendering and smooth operation of large-scale two or three-dimensional application scenarios, it is a very worthwhile topic to provide an efficient and reasonable rendering scene division method and a data storage structure meeting the rapid loading demand.
[0021] In the scene of processing large amount of data, in order to improve the rendering efficiency, generally, a specific type of data is optimized, for example, the large components of the scene can be requested first, the front end is divided by BVH, and the data transmission adopts the compression format and other means. On the basis of studying the past technology, through repeated demonstration and experiment, the applicant adopts the strategy of back-end processing and front-end direct use, and proposes an optimization algorithm for scene division and data storage.
[0022] Reference Figure 1 The embodiment of the application at least includes steps S10 to S40.
[0023] S10, collect the geometric data of all components in the scene, obtain the vertex information and calculate the bounding box information of the components and primitives, count the material information and reuse situation, and obtain the component preprocessing information.
[0024] S20, initialize the BVH root node based on the component preprocessing information and set the global bounding box, and divide the BVH based on the space diagonal length of the bounding box, and obtain the scene division result.
[0025] S30, according to the scene division result, organize the geometric data file according to the BVH node number, classify the vertex, index, normal and uv data into Block block, and record the geometric position information in the block.
[0026] S40, based on the BVH tree, construct the flow rendering Node structure directory, and record the component transformation information, material marker and independent rendering block composition data in the node.
[0027] Specifically, in the preprocessing stage of construction, the geometric data is collected, the bounding box is calculated, the material reuse is counted and the over-limit component is marked, which provides data basis for subsequent division; then the BVH hierarchical structure is constructed based on the diagonal length of the bounding box, the vertex over-limit problem is solved by dynamically adjusting the node distribution and material block division, and the space is efficiently divided; then the data is organized according to the BVH node, the vertex is classified and stored into Block block, and the single block size is controlled, and the storage structure is optimized; finally, the flow rendering Node directory is constructed, the transformation information and material marker are recorded, the on-demand loading is supported, the number of GPU data submission is finally reduced, and the large-scale scene rendering frame rate and loading speed are improved.
[0028] In some embodiments, step S10 specifically comprises the following steps: acquiring vertex information of all components in the scene, and calculating bounding box information of the components and primitives constituting the components according to the vertex information and the transformation matrix; counting material information according to whether there is a texture map, and counting reuse conditions according to whether the components are reused; sorting the components by bounding box size and establishing a priority queue of the components, and the size sorting is determined by the diagonal length or the surface area of the bounding box; analyzing material distribution characteristics, and establishing a material-component mapping table; counting the vertex number of each component, marking components with a vertex number exceeding 65535 as over-limit components, and obtaining component preprocessing information.
[0029] Specifically, the geometric data of all components in the scene is collected: the vertex information of all components in the scene is acquired, and the bounding box information of the components and primitives constituting the components is calculated according to the vertex information and the transformation matrix. The material information of the components is counted, and is counted according to whether there is a texture map, which components are reused, and the like.
[0030] The components are sorted by bounding box from large to small, and a priority queue is established: since the size of the components needs to be considered in the later BVH division, an index is counted according to the bounding box to perform size sorting. The index can be the length of the diagonal line of the bounding box or the size of the surface area of the bounding box.
[0031] The material distribution characteristics are analyzed, and a material-component mapping table is established: the components are counted according to the material, the components with the same material are mapped, and the mapping relationship is established to facilitate subsequent division of rendering unit blocks in the bvh node.
[0032] The vertex number of each component is counted, and over-limit components (> 65535 vertices) are marked: considering the characteristics of mobile terminal rendering, the vertex number of a single rendering unit cannot exceed 65535, and the vertex number of each component is marked, and components with a vertex number greater than 65535 need to be handled separately.
[0033] In some embodiments, step S20 specifically comprises the following steps: initializing a BVH root node based on the component preprocessing information and setting a global bounding box; performing BVH division on the components based on the bounding box space diagonal length; moving components with a bounding box diagonal length greater than 1 / 3 of the current node bounding box diagonal length to the corresponding parent node, and repeating the current step until the components are moved to the top node; balancing the data in the node, putting over-limit primitives into a separate node at the same level, dividing the rendering unit blocks according to the material, and re-dividing the material blocks with a vertex number exceeding the limit until the requirements are met.
[0034] Further, the data in the divided node is balanced, if a single primitive in the node is greater than 65535, the corresponding primitive is placed in a separate node at the same level; the components in the node are divided into different independent rendering blocks according to the material, if the number of vertices of the independent rendering block corresponding to a material is greater than 65535, the independent rendering block composed of the components corresponding to the material is further divided until the number of vertices of the corresponding independent rendering block is less than 65535.
[0035] In fact, first, the BVH root node is initialized, the global bounding box is set, the components are divided according to the bvh according to the length of the space diagonal of the bounding box, then the length of the diagonal of the component bounding box and the length of the diagonal of the bounding box of the node of the bvh where the component is located are compared, if greater than 1 / 3 of the length of the diagonal of the bounding box of the node, the component is moved to its parent node, and the rule is repeatedly repeated, if still greater than 1 / 3 of the node base point bounding box at the top node, the component is placed in the top node. The data in the divided node is balanced, if a single primitive in the node is greater than 65535, it is directly placed in a separate node at the same level. The components in the node are divided into different independent rendering blocks according to the material, if the number of vertices of the independent rendering block corresponding to a material is greater than 65535, the independent rendering block composed of the components corresponding to the material is further divided until less than 65535.
[0036] In some embodiments, step S30 specifically includes the following steps: processing the geometry, material, and component information according to the scene division result, and writing into the corresponding file; organizing the geometry information according to the independent rendering block of the scene division, and placing the vertices, indexes, normals, and uv into large arrays respectively to form independent Block blocks; recording the start and end positions of the geometry in the Block block and the component composition information of the independent rendering unit.
[0037] In some embodiments, step S40 specifically includes the following steps: constructing a Node structure directory supporting stream rendering according to the BVH tree, and ensuring that the required data of the current node is stored preferentially; In the node, the component transformation information, material marker, and independent rendering block composition data are recorded, and the independent rendering block composition data includes primitive bounding box and associated material data.
[0038] Further, the size of the Block block is controlled to be no more than 2M, and if it is too large, further subdivision is performed.
[0039] In fact, the data storage considers synchronization with scene division, file size, independent primitive merging, component graphic information recording, etc., and the specific process is as follows: According to the result of scene division, the geometry, material and component information are processed and written into corresponding files; the geometry data file is written according to the node number of bvh division; the geometry information is organized according to the independent rendering block of scene division, and the vertex, index, normal and uv (if existing) are respectively put into large arrays to form independent block. The block is divided into two categories, with uv and without uv.
[0040] The position information of small geometry in large block is recorded. The start and end positions of block part corresponding to the component are recorded in the large block, so that the front end can restore the geometry information required by the component according to the information.
[0041] The component information of independent rendering unit is recorded. An independent rendering unit is often composed of multiple components. The start and end positions of each component in the independent rendering block are recorded in the node information, so that the front end can control the specific part of the independent rendering unit according to the information when specific operation is needed for the component.
[0042] The size of block needs to be controlled. In principle, it should not exceed 2M, and if it is too large, further subdivision should be carried out.
[0043] The bvh tree of scene division supports the node structure directory of front-end streaming rendering. The node data accessed first in the scene should also be placed in the priority position in storage. The overall logic of data storage is to ensure that the data required by the current node already exists in the file or the file before it.
[0044] The transformation information of component, the marker of material and the composition information of independent rendering block are recorded under node. The transformation information of independent block + component primitive is the real rendering data of component. The component is generally composed of multiple primitives, and the transformation information of primitive under component needs to be recorded respectively. The bounding box of component primitive and the related material information need to be recorded under the independent rendering block, so as to facilitate the front end to do the behavior operation related to primitive.
[0045] The implementation principle of a rendering scene partitioning and storage optimization method for large-scale models in this application is as follows: First, scene components are preprocessed by collecting geometric data, calculating bounding boxes, statistically analyzing material reuse, and marking components exceeding the limit. Next, a BVH (Bounding Volume Hierarchy) structure is constructed based on the diagonal length of the bounding boxes. The problem of exceeding the vertex limit is solved by dynamically adjusting the distribution of components within nodes (moving large components to parent nodes), balancing node data, and partitioning rendering unit blocks according to materials. Then, geometric data is organized according to the BVH partitioning results, with vertices, indices, etc., categorized and stored in Blocks within 2MB and their position information recorded. Finally, a streaming rendering Node structure directory is constructed based on the BVH tree, recording component transformation information, material markers, and independent rendering block data. The overall solution, through deep coupling of spatial partitioning and storage optimization, achieves the technical effects of reducing the number of GPU data submissions, controlling the size of single-block data, and prioritizing the loading of data required by the current node, providing a systematic solution for real-time rendering of large-scale models.
[0046] Figure 1 This is a flowchart illustrating a rendering scene partitioning and storage optimization method for large-scale models in one embodiment. It should be understood that, although... Figure 1 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 explicitly stated otherwise, there is no strict order requirement for the execution of these steps, and they can be executed in other orders; and Figure 1 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.
[0047] Based on the same technical concept, referring to Figure 2 This application also provides a rendering scene partitioning and storage optimization device for large-scale models, which adopts the following technical solution: The device includes: The component processing module is used to collect the geometric data of all components in the scene, obtain vertex information and calculate the bounding box information of components and primitives, collect material information and reuse information, and obtain component preprocessing information. The spatial partitioning module is used to initialize the BVH root node based on the component preprocessing information and set the global bounding box, and to perform BVH partitioning on the components based on the diagonal length of the bounding box space to obtain the scene partitioning results. a file storage module configured to organize geometry data files according to BVH node numbers based on the scene division result, classify vertices, indexes, normals and UV data into Block blocks, and record the position information of the geometry in the blocks; a rendering information module configured to construct a streaming rendering Node structure directory based on the BVH tree, and record component transformation information, material markers and independent rendering block composition data in the nodes.
[0048] In some embodiments, the component processing module is specifically configured to obtain vertex information of all components in the scene, and calculate the bounding box information of the components and the primitives of the components according to the vertex information and the transformation matrix; According to whether there is a texture map, the material information is counted, and according to whether the components are reused, the reuse situation is counted. The components are sorted according to the sizes of the bounding boxes, and a priority queue of the components is established, and the size sorting is determined by the diagonal line length or the surface area of the bounding box. The material distribution characteristics are analyzed, and a material-component mapping table is established. The number of vertices of each component is counted, the components with a number of vertices exceeding 65535 are marked as over-limit components, and component preprocessing information is obtained.
[0049] In some embodiments, the space division module is specifically configured to initialize a BVH root node and set a global bounding box based on the component preprocessing information. The components are divided based on the space diagonal line length of the bounding box. Components with a bounding box diagonal line length greater than 1 / 3 of the current node bounding box diagonal line length are moved to the corresponding parent node, and the current step is repeated until the components are moved to the top node. The data in the node is balanced, the over-limit primitives are put into separate nodes of the same level, the rendering unit blocks are divided according to the material, and the material blocks with a number of vertices exceeding the limit are further divided until the requirements are met.
[0050] In some embodiments, the space division module is further configured to balance the data in the divided nodes, and if there is a single primitive greater than 65535 in the node, the corresponding primitive is put into a separate node of the same level. The components in the node are divided into different independent rendering blocks according to the material, and if the number of vertices of an independent rendering block corresponding to a material is greater than 65535, the independent rendering block composed of the components corresponding to the material is further divided until the number of vertices of the corresponding independent rendering block is less than 65535.
[0051] In some embodiments, the file storage module is specifically configured to process the geometry, material and component information according to the scene division result, and write the information into corresponding files. According to the scene division independent rendering block to organize the geometric information, the vertex, index, normal, uv is respectively put into the large array, forms the independent Block block; The starting and ending positions of the geometric body in the Block block and the component information of the independent rendering unit are recorded.
[0052] In some embodiments, the rendering information module is specifically used for constructing a Node structure directory supporting stream rendering according to the BVH tree, and ensuring that the required data of the current node is stored preferentially; The component transformation information, material marker and independent rendering block component data are recorded in the node, and the independent rendering block component data includes the primitive bounding box and the associated material data.
[0053] In some embodiments, the rendering information module is further used for controlling the size of the Block block to be no more than 2M, and if it is too large, further subdivision is performed.
[0054] Embodiments of the present application also disclose a control device.
[0055] Specifically, the control device comprises a memory and a processor, and the memory stores a computer program capable of being loaded and executed by the processor to perform the above-mentioned scene division and storage optimization method for rendering of a large model.
[0056] Embodiments of the present application also disclose a computer readable storage medium.
[0057] Specifically, the computer readable storage medium stores a computer program capable of being loaded and executed by the processor to perform the above-mentioned scene division and storage optimization method for rendering of a large model, and the computer readable storage medium comprises, for example, a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk and various program code storage media.
[0058] The above are the preferred embodiments of the present application, and are not used to limit the protection scope of the present application, so that: all equivalent changes made according to the structure, shape, principle of the present application should be covered in the protection scope of the present application.
Claims
1. A method for rendering scene partitioning and storage optimization for large-scale models, characterized in that, include: Collect geometric data of all components in the scene, obtain vertex information and calculate bounding box information of components and primitives, collect material information and reuse status, and obtain component preprocessing information; The BVH root node is initialized based on the component preprocessing information and a global bounding box is set. The component is then divided into BVHs based on the diagonal length of the bounding box space to obtain the scene division result. Based on the scene division results, organize the geometric data files according to the BVH node number, classify and put the vertex, index, normal and uv data into Block, and record the position information of the geometry in the block; A streaming rendering node structure directory is constructed based on the BVH tree, and the node records component transformation information, material markers and independent rendering block composition data.
2. The method for rendering scene partitioning and storage optimization for large-scale models according to claim 1, characterized in that, The process involves collecting geometric data of all components in the scene, obtaining vertex information, calculating bounding box information for components and primitives, statistically analyzing material information and reuse status, and obtaining component preprocessing information, including: Obtain the vertex information of all components in the scene, and calculate the bounding box information of the components and the primitives that make up the components based on the vertex information and the transformation matrix; The material information is statistically analyzed based on whether a texture map exists, and the reuse status is statistically analyzed based on whether the component is reused. Components are sorted by bounding box size and a priority queue of components is established. The size sorting is determined by the diagonal length or surface area of the bounding box. Analyze the material distribution characteristics and establish a material-component mapping table; The number of vertices of each component is counted, and components with more than 65535 vertices are marked as exceeding the limit, thus obtaining the preprocessing information of the components.
3. The method for rendering scene partitioning and storage optimization for large-scale models according to claim 2, characterized in that, The process of initializing the BVH root node based on the component preprocessing information and setting the global bounding box, and then performing BVH partitioning on the components based on the diagonal length of the bounding box space to obtain the scene partitioning result includes: Initialize the BVH root node and set the global bounding box based on the component preprocessing information; BVH partitioning of components is performed based on the diagonal length of the bounding box space; Move components whose bounding box diagonal length is greater than 1 / 3 of the current node's bounding box diagonal length to their corresponding parent nodes, and repeat the current step until the components are moved to the top-level node; The data within the node is balanced, and the excess primitives are placed into separate nodes of the same level. The rendering unit blocks are divided according to the material. The material blocks with an excess number of vertices are further divided until the requirements are met.
4. The method for rendering scene partitioning and storage optimization for large-scale models according to claim 3, characterized in that, The process of balancing data within nodes, placing excess primitives into separate nodes at the same level, dividing rendering unit blocks according to material, and further dividing material blocks with excessive vertex counts until the requirements are met includes: The data within the partitioned nodes is balanced. If a single element within a node has more than 65535 elements, the corresponding element is placed into a separate node at the same level. The components inside a node are divided into different independent rendering blocks according to their materials. If the number of vertices in an independent rendering block corresponding to a certain material is greater than 65535, the independent rendering blocks composed of the components corresponding to the material are further divided until the number of vertices in the corresponding independent rendering block is less than 65535.
5. The method for rendering scene partitioning and storage optimization for large-scale models according to claim 4, characterized in that, Based on the scene segmentation results, the geometric data files are organized according to the BVH node numbers. Vertex, index, normal, and UV data are categorized and placed into Blocks, and the position information of the geometry within the block is recorded, including: Based on the scene segmentation results, the geometry, material, and component information are processed and written to the corresponding files; Geometric information is organized according to the independent rendering blocks divided by the scene, with vertices, indices, normals, and uvs placed into large arrays to form independent Blocks; Record the start and end positions of the geometry in the Block and the component composition information of the independent rendering unit.
6. The method for rendering scene partitioning and storage optimization for large-scale models according to claim 4, characterized in that, The BVH tree-based streaming rendering node structure directory records component transformation information, material identifiers, and independent rendering block composition data in the nodes, including: Construct the Node structure directory that supports streaming rendering based on the BVH tree, ensuring that the data required by the current node is stored first; The node records component transformation information, material identifiers, and independent rendering block composition data, which includes primitive bounding boxes and associated material data.
7. The method for rendering scene partitioning and storage optimization for large-scale models according to claim 4, characterized in that, Before the BVH tree-based construction of the streaming rendering Node structure directory, which records component transformation information, material identifiers, and independent rendering block composition data in the nodes, the following is also included: The size of the block is controlled to not exceed 2M; if it is too large, it is further subdivided.
8. A rendering scene partitioning and storage optimization device for large-scale models, characterized in that, The device includes: The component processing module is used to collect the geometric data of all components in the scene, obtain vertex information and calculate the bounding box information of components and primitives, collect material information and reuse information, and obtain component preprocessing information. The spatial partitioning module is used to initialize the BVH root node and set the global bounding box based on the component preprocessing information, and to perform BVH partitioning on the component based on the diagonal length of the bounding box space to obtain the scene partitioning result. The file storage module is used to organize geometric data files according to the BVH node number based on the scene division results, classify and put vertex, index, normal and uv data into Block, and record the position information of geometry within the block; The rendering information module is used to construct a streaming rendering node structure directory based on the BVH tree, and to record component transformation information, material markers and independent rendering block composition data in the nodes.
9. A control device, characterized in that, The device includes: It includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer program is stored that can be loaded by a processor and executed as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Three-dimensional scene rendering acceleration method and system based on video geometric analysis
CN110738721A
Accelerated rendering method of scene model
CN110910505A
Three-dimensional model data extraction optimization and rendering method, system, equipment and medium
CN119941967A
Method and device for rendering three-dimensional scene data, storage medium, and electronic device
WO2022121525A1