An octree-based method and apparatus for depth estimation in transparent rendering of complex scenes

By using an octree-based spatial partitioning and depth estimation method, the computational efficiency and adaptability issues of transparent rendering in complex scenes are solved, achieving efficient and dynamic transparent rendering effects.

CN116402936BActive Publication Date: 2026-11-10ZHEJIANG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310379686.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-11
Publication Date
2026-11-10
Estimated Expiration
2043-04-11

AI Technical Summary

Technical Problem

Existing transparent rendering methods suffer from poor computational efficiency and scene adaptability in complex scenes, making it difficult to achieve high-quality, order-independent transparent rendering.

Method used

An octree-based spatial partitioning method is adopted. By partitioning the scene into octree spaces, a scene depth estimation proxy data structure is constructed. The depth estimation of the viewpoint position is traversed in real time, and the viewpoint state is dynamically adapted.

Benefits of technology

It achieves efficient and transparent rendering with low computational overhead, improves the rendering quality and performance of complex scenes, adapts to changes in viewpoint, and supports free roaming.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116402936B_ABST
    Figure CN116402936B_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for depth estimation in complex scenes using octree-based transparent rendering. The method utilizes the convergence of octree spatial partitioning to approximate the scene surface. In the construction phase of the octree proxy data structure, the scene is first partitioned into octrees, and the triangular facets in the leaf nodes are projected onto the faces of the bounding box aligned with the node axes. The scene depth of the space containing the non-empty leaf nodes is sampled and estimated. Next, bottom-up and top-down traversals are applied sequentially to estimate the local and global scene depths of the octree nodes. Finally, in real-time execution, the octree proxy data structure is used to perform a fast viewpoint-based query to retrieve the estimated maximum scene depth at the current viewpoint and render the transparent effect. This invention has low computational overhead, can be applied to various types of transparent rendering frameworks, and can dynamically adapt to viewpoint changes in real time, providing a solution for high-quality, order-independent transparent rendering of complex digital scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of real-time 3D display in computer graphics, and more particularly to a method and apparatus for depth estimation of complex scenes in transparent rendering based on an octree. Background Technology

[0002] Transparent rendering is a crucial aspect of visualization. Accurately and appropriately representing transparency in a scene can highlight its structure, reveal hidden details, and simultaneously maintain secondary environmental background information. Transparent scene rendering has a wide range of applications, including realistic rendering of natural objects, displaying digital model structures, visualizing flow fields, rendering the trajectory of autonomous driving simulation vehicles, and creating neural network connectivity diagrams.

[0003] Porter and Duff first proposed the alpha blending method, in which new fragments are composited into the RGB elements and stored in the frame buffer during the rendering process. Due to its simplicity, excellent performance, and widespread support from graphics specifications and hardware manufacturers, alpha blending has become the de facto standard for transparent rendering in real-time applications. However, this method, which sorts scene elements at the level, is prone to failures, leading to errors in image compositing.

[0004] Everitt's depth stripping technique is a multi-pass rendering method that requires two depth buffers, one of which stores the depth value from the previous rendering pass. During the i-th rendering pass, the depth value is compared with that of the (i-1)-th pass to obtain the i-th nearest rendering layer that contributes to each pixel. Because this method uses multiple passes, its performance is insufficient for real-time rendering of complex scenes. Carpenter proposed an image space method using an A-Buffer data structure to store all primitives contributing to each pixel on the screen, performing depth sorting and color blending in subsequent processing. This method is mainly used for offline rendering due to storage requirements and performance limitations. Yang et al. applied a variable-length per-pixel linked list to each pixel on the GPU (Graphics Processing Unit) to store the set of primitives contributing to it, then sorted them and performed blending operations.

[0005] Because transparency inherently possesses a blurry property, performing precise rendering on scenes with complex occlusion relationships and high depth not only degrades performance but also causes overblurring. Considering this inherent characteristic of transparency, numerous approximate transparency rendering methods have been proposed. K-Buffer technology is based on a linked list approach but does not store the complete primitive set; instead, it stores only the K nearest primitives. When more than K primitives cover the same pixel, a heuristic strategy is used to merge primitives for approximation. Adaptive Transparency builds upon the K-Buffer method by storing an approximation of the transparency function for each pixel and applying this approximation for alpha blending in a second rendering pass. Maule et al. proposed Hybrid Transparency, which uses K-Buffer to aggregate primitives and performs heuristic merging based on depth and transparency. This method is order-independent but struggles to handle scenes with large depth values ​​correctly. Multi-Layer Alpha Blending is a single-pass technique that applies a fixed number of pixel-by-pixel transparency layers along the view direction for approximation. When the storage space corresponding to a fixed number of transparency layers is full, a new layer is created, and two adjacent layers are selected and merged. Stochastic Transparency uses a weighted technique to blend or discard fragments based on transparency values. Weighted Blended Order-Independent Transparency proposes using weights based on occlusion and distance from the viewpoint for fragment merging. Stochastic Layered Alpha Blending and Phenomenological Transparency apply multisampling techniques to each pixel for transparency rendering. These transparency rendering methods reasonably approximate the transparency effect, but the complex approximation calculations at runtime affect the real-time performance of the methods.

[0006] In general, the aforementioned typical methods belong to two categories: the depth stripping family and the A-Buffer family. However, regardless of the type of method, their efficient implementation depends on the maximum depth of the scene within the viewport. This parameter characterizes the scene's properties and determines the computational and storage resource overhead required for transparent rendering.

[0007] Existing solutions for calculating the maximum depth value of a scene either employ runtime-intensive approximations or simply predefined fixed values, resulting in poor computational efficiency and scene adaptability. This invention aims to design a depth proxy mechanism that meets the needs of large-scale complex scenes, dynamically adapting to the viewpoint state in real time. It can be widely applied to various types of transparent rendering frameworks, providing an optimized solution for high-quality, order-independent (OIT) transparent rendering. Summary of the Invention

[0008] The purpose of this invention is to address the shortcomings of existing technologies by providing a method and apparatus for depth estimation in transparent rendering of complex scenes based on octrees.

[0009] The objective of this invention is achieved through the following technical solution: The first aspect of this invention provides a method for depth estimation in transparent rendering of complex scenes based on an octree, comprising the following steps:

[0010] (1) Divide the scene into an octree space, assign the triangular facets of the scene to the leaf nodes of the octree, perform sampling calculations, and save the results to the leaf nodes.

[0011] (2) Based on the octree that has completed the sampling of non-empty leaf nodes in step (1), a local-global construction strategy is adopted to calculate the global scene depth estimate of all nodes in the octree in order to construct the octree scene depth estimation proxy data structure.

[0012] (3) Traverse the octree scene depth estimation proxy data structure constructed in step (2) in real time and retrieve the scene global depth estimate of the spatial location of the viewpoint.

[0013] Optionally, step (1) includes the following sub-steps:

[0014] (1.1) The bounding box spatial structure with axis alignment is used to generate the bounding box based on the spatial position data of the transparent object to be rendered;

[0015] (1.2) Using the bounding box generated in step (1.1) as the root node, divide the current node into 8 child nodes each time. Determine whether the current node meets the preset division termination condition. If it does, the division ends and the triangular facets of the scene are assigned to their respective leaf nodes; otherwise, continue the division.

[0016] (1.3) Sample and calculate the triangular facets in the leaf nodes of step (1.2) to obtain the scene depth estimate of the space where the node is located, and save it to the leaf node.

[0017] Optionally, the step (1.2) of determining whether the current node meets the preset division termination condition specifically includes: determining whether the depth of the octree where the current node is located is greater than or equal to the preset maximum value or whether the L2 norm of the current node is less than or equal to the preset L2 norm threshold. If so, the division ends and the triangular facets of the scene are assigned to their respective leaf nodes; otherwise, the division continues.

[0018] Optionally, step (1.3) specifically involves: firstly, projecting each facet in the set of triangular faces of the leaf node in step (1.2) onto the corresponding surface of the bounding box along the axial direction; then performing an intersection test on the set of faces projected onto the surface of the bounding box, retaining the maximum overlap count as the scene depth estimate for the direction corresponding to that node, and saving it to the leaf node.

[0019] Optionally, step (2) includes the following sub-steps:

[0020] (2.1) The method in step (1) is used to sample and calculate the triangular facets in all nodes of the octree to obtain the local scene depth estimate of the space in which all nodes are located;

[0021] (2.2) Based on the local scene depth estimates of all nodes obtained in step (2.1), obtain the global scene depth estimates of all nodes in the entire scene to construct an octree scene depth estimation proxy data structure.

[0022] Optionally, step (2.1) includes the following sub-steps:

[0023] (2.1.1) Obtain the local scene depth of the empty leaf node of the octree. The local scene depth of the empty leaf node is estimated to be 0.

[0024] (2.1.2) Obtain the local scene depth of the non-empty leaf nodes of the octree based on the scene depth estimation saved to the leaf nodes in step (1);

[0025] (2.1.3) Traverse the octree from bottom to top. Along the axis, use the method in step (1) to sample and calculate the triangle facets in all child nodes of the middle node of the octree to obtain the scene depth estimate of all child nodes of the current middle node. Add the scene depth estimates of the two child nodes aligned along the axis of the upper and lower layers to obtain the scene depth estimate of each group of child nodes. Obtain the local scene depth estimate of the current middle node based on the scene depth estimate of each group of child nodes.

[0026] (2.1.4) Repeat step (2.1.3) until the traversal process reaches the root node to obtain the local scene depth estimate of all intermediate nodes.

[0027] Optionally, step (2.2) includes the following sub-steps:

[0028] (2.2.1) Recursively traverse the octree from top to bottom, passing the external global scene depth as a parameter to the next level. When the call is first made, the external global scene depth of each face of the root node is 0.

[0029] (2.2.2) According to step (2.2.1), the external global scene depth adjacent to the current face of the node is obtained, and the external global scene depth is accumulated with the local scene depth estimate of the node obtained in step (2.1) to obtain the global scene depth estimate of the current face of the node along the corresponding direction.

[0030] (2.2.3) Update the external global scene depth of all child nodes along each face of the axis according to the octtree child node spatial layout structure in step (1);

[0031] (2.2.4) Repeat steps (2.2.1) to (2.2.3) until the global scene depth estimate of each face of all nodes along the positive and negative axial directions is obtained, so as to construct an octree scene depth estimation proxy data structure.

[0032] Optionally, step (3) includes the following sub-steps:

[0033] (3.1) Determine whether the viewpoint is outside the octree. If the viewpoint is outside the octree, proceed directly to step (3.2); otherwise, based on the viewpoint position p... v Starting from the root node of the octree, traverse the octree from top to bottom to determine the node where the viewpoint is located.

[0034] (3.2) Obtain the cosine value of the viewpoint and the corresponding surface based on the viewpoint orientation and the surface normal of the six surfaces of the node obtained in step (3.1), and determine the main direction based on the cosine value;

[0035] (3.3) Index the octree scene depth estimation proxy data structure constructed in step (2) according to the main direction determined in step (3.2) to obtain the viewpoint position p. v The global scene depth estimate recorded on the corresponding surface in the node.

[0036] A second aspect of the present invention provides an octree-based depth estimation device for transparent rendering of complex scenes, comprising one or more processors for implementing the above-described octree-based depth estimation method for transparent rendering of complex scenes.

[0037] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, is used to implement the above-described method for depth estimation of complex scenes based on octree-based transparent rendering.

[0038] The beneficial effects of this invention are as follows: Based on the inherent convergence property of the octree spatial structure, this invention uses the octree as a spatial proxy for the original scene. During the construction phase, since it is an offline mode, its overhead has negligible impact on runtime performance. During the rendering phase, based on the efficient spatial access property of the octree, the octree scene depth estimation proxy data structure is traversed in real time, and the scene depth parameters at the spatial location of the viewpoint can be retrieved. Compared with existing complex approximation methods, it has the advantage of low computational overhead. This invention can dynamically adapt to viewpoint changes, achieving highly efficient, free-roaming transparent scene rendering. It can be easily integrated into existing mainstream transparent rendering algorithms to improve the quality of the synthesized transparent rendering images and algorithm performance. Attached Figure Description

[0039] Figure 1 This is a schematic diagram of the octree space partitioning and corresponding hierarchical structure of the present invention; wherein, Figure 1 (a) in the diagram is a schematic diagram of the octree partitioning spatial structure. Figure 1 (b) in the diagram is a schematic diagram of the logical hierarchy corresponding to the octree space partitioning;

[0040] Figure 2 This is a schematic diagram of the triangular facet set in the octagonal leaf node of the present invention projected along the positive and negative y-axis onto the upper / lower surface of the axis-aligned bounding box;

[0041] Figure 3 This is a schematic diagram of the spatial layout of the octree child nodes of the present invention;

[0042] Figure 4 This is a schematic diagram of the spatial positional relationship of the current node in the global hierarchical structure, represented in two-dimensional form in this invention.

[0043] Figure 5 This is a schematic diagram illustrating the determination of the main direction based on the viewpoint position and orientation according to the present invention;

[0044] Figure 6 This is a schematic diagram of a structure of the octree-based transparent rendering depth estimation device for complex scenes according to the present invention. Detailed Implementation

[0045] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0046] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular forms “a,” “the,” and “the” used in this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0047] It should be understood that although the terms first, second, third, etc., may be used in this invention to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of this invention, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0048] The present invention will now be described in detail with reference to the accompanying drawings. Unless otherwise specified, the features of the following embodiments and implementations can be combined with each other.

[0049] The depth estimation method for transparent rendering of complex scenes based on octrees of the present invention specifically includes the following steps:

[0050] (1) Divide the scene into an octree space, assign the triangular facets (i.e., triangular primitives) of the scene to the leaf nodes of the octree, perform sampling calculations, and save the results to the leaf nodes.

[0051] In this embodiment, the octree structure is an irregular, adaptive spatial partitioning structure for scene complexity. During the process of partitioning the scene using an octree, as the partitioning depth increases, the generated octree shape gradually converges towards the scene surface, effectively approximating the scene's geometric features. Based on this inherent convergence property of the octree spatial structure, this embodiment uses the octree partition as a spatial proxy for the original scene, used for scene depth estimation during transparent rendering.

[0052] (1.1) An axis-aligned bounding box spatial structure is adopted to generate a bounding box based on the spatial position data of the transparent object to be rendered.

[0053] In this embodiment, an axis-aligned bounding box (AABB) spatial structure is used to generate a bounding box based on the spatial position data of the transparent object to be rendered, represented as follows:

[0054] AABB={(x,y,z)|x min ≤x≤x max ,y min ≤y≤y max ,z min ≤z≤z max}

[0055] Where x, y, and z represent the coordinates of the transparent primitive set on the x-axis, y-axis, and z-axis, respectively. min y min z min Let x, y, and z represent the minimum coordinates of the set of transparent facets along the x-axis, y-axis, and z-axis, respectively. max y max z max These represent the maximum coordinates of the set of transparent facets on the x-axis, y-axis, and z-axis, respectively.

[0056] (1.2) Using the bounding box generated in step (1.1) as the root node, divide the current node into 8 child nodes each time. Determine whether the current node meets the preset division termination condition. If it does, the division ends and the triangle facet of the scene is assigned to its respective leaf node; otherwise, continue the division.

[0057] The octree space is partitioned with the bounding box as the root node, such as... Figure 1 As shown in (a) above, the corresponding logical hierarchy of this octree is as follows: Figure 1 As shown in (b) of the diagram.

[0058] It should be noted that typical octree space partitioning termination conditions include predefined maximum octree depth, minimum node size, maximum number of primitives in a node, etc. These termination conditions determine the properties of the octree and directly affect runtime performance and storage space. In this embodiment, however, the partitioning termination condition uses an improved L2 norm combined with the maximum depth.

[0059] In this embodiment, determining whether the current node meets the preset partitioning termination condition specifically includes: determining whether the octree depth of the current node is greater than or equal to the preset maximum value or whether the L2 norm of the current node is less than or equal to the preset L2 norm threshold. If so, the partitioning ends and the triangular facets of the scene are assigned to their respective leaf nodes; otherwise, the partitioning continues.

[0060] It should be understood that the partitioning termination conditions are different for different scenarios, that is, the preset maximum octree depth and L2 norm threshold can be set according to the actual scenario.

[0061] In this embodiment, the expression for the L2 norm of the improved set of node triangle faces is:

[0062]

[0063] Where ||n||2 represents the L2 norm of the set of triangle facets at the nodes, and n i Let i be the normal vector of the face i. is the average normal vector of all triangular faces in the node, and m is the number of triangular faces in the set.

[0064] It should be understood that a larger L2 norm value indicates a more chaotic orientation of the triangular facets in the node, a higher probability of occlusion between triangular facets, and a need for further spatial partitioning of the octree to simplify the complexity of the triangular facet set in the node. Conversely, a smaller L2 norm value indicates good consistency in the orientation of the facets in the current node, and a low probability of mutual occlusion.

[0065] In this embodiment, the scene depth of the current node can be obtained by sampling and calculating the scene depth of the space where the current node is located. For details, please refer to the method described in step (1.3).

[0066] (1.3) Sample and calculate the triangular facets in the leaf nodes of step (1.2) to obtain the scene depth estimate of the space where the node is located, and save it to the leaf node.

[0067] In this embodiment, since the complexity of the actual scene varies in different directions in space, a single parameter cannot reflect this anisotropy. Therefore, the actual scene is projected based on the AABB spatial structure, and the complexity is processed separately along each axis of the node AABB.

[0068] In this embodiment, each facet in the triangular facet set of the leaf node is first projected one by one along the axial direction onto the corresponding surface of the bounding box; then, an intersection test is performed on the set of faces projected onto the surface of the bounding box, the maximum superposition count is retained as the scene depth estimate in the direction corresponding to the node, and saved to the leaf node.

[0069] It should be understood that, due to the symmetry of the bounding box, the spatial complexity of the two surfaces along the positive and negative axes is the same. The result obtained by one projection calculation can characterize the parameters of the two surfaces. For the six surfaces of the bounding box, each node performs three calculations along the x, y, and z directions to obtain the scene depth estimate of the node in the three directions. The scene depth estimates in the three directions are then saved to the leaf nodes.

[0070] For example, such as Figure 2 As shown, the set of triangular faces within a leaf node consists of three faces. Taking the y-axis as an example, firstly, the three faces are projected one by one along the y-axis onto the top and bottom surfaces of the bounding box. Due to the symmetry of the bounding box, only the three faces need to be projected one by one along the positive y-axis onto the top surface of the bounding box. Then, an intersection test is performed on the set of faces projected onto the top surface of the bounding box, as shown... Figure 2 As shown, the left face does not intersect with the two right faces, while the two right faces intersect. Correspondingly, the maximum count is 2, so the scene depth of the leaf node in the positive y-axis direction is estimated to be 2, and this result is saved to the leaf node.

[0071] (2) Based on the octree that has completed the sampling of non-empty leaf nodes in step (1), a local-global construction strategy is adopted to calculate the global scene depth estimate of all nodes in the octree in order to construct the octree scene depth estimation proxy data structure.

[0072] (2.1) The method in step (1) is used to sample and calculate the triangular facets in all nodes of the octree to obtain the local scene depth estimate of the space in which all nodes are located.

[0073] In this embodiment, the local scene depth estimation only considers the spatial range of the node itself, which is defined as: the complexity of the contribution of the set of triangular facets contained in the node to the space it covers.

[0074] (2.1.1) Obtain the local scene depth of the empty leaf node of the octree. The local scene depth of the empty leaf node is estimated to be 0.

[0075] (2.1.2) Based on the scene depth estimation saved to the leaf node in step (1), obtain the local scene depth of the non-empty leaf node of the octree.

[0076] It should be understood that the local scene depth estimate of a non-empty leaf node is the scene depth estimate saved to the leaf node in step (1.3).

[0077] (2.1.3) Traverse the octree from bottom to top. Along the axis, use the method in step (1.3) to sample and calculate the triangle facets in all child nodes of the middle node of the octree to obtain the scene depth estimate of all child nodes of the current middle node. Add the scene depth estimates of the two child nodes aligned along the axis of the upper and lower layers to obtain the scene depth estimate of each group of child nodes. Obtain the local scene depth estimate of the current middle node based on the scene depth estimate of each group of child nodes.

[0078] In this embodiment, each intermediate node of the octree has 8 child nodes, laid out in two layers along the axis. Each layer contains 4 child nodes distributed in a 2×2 pattern. Two child nodes aligned along the axis in the upper and lower layers form a group, for a total of 4 groups. The spatial layout is as follows: Figure 3 As shown. The method in step (1.3) is used to sample and calculate the triangular facets in the child nodes to obtain the scene depth estimates of the eight child nodes of the middle node. The scene depth estimates of the two child nodes aligned along the axis in the upper and lower layers are added together to obtain the scene depth estimate of each group of child nodes. The maximum scene depth estimate among the four groups is selected as the local scene depth estimate of the current node along that axis.

[0079] (2.1.4) Repeat step (2.1.3) until the traversal process reaches the root node to obtain the local scene depth estimate of all intermediate nodes.

[0080] (2.2) Based on the local scene depth estimates of all nodes obtained in step (2.1), obtain the global scene depth estimates of all nodes in the entire scene to construct an octree scene depth estimation proxy data structure.

[0081] In this embodiment, the local scene depth estimation of the octree node only represents the spatial state covered by the current node, and does not consider the influence of surrounding external nodes on the space where the current node is located based on the global structure of the octree. Therefore, it is necessary to further calculate the global scene depth estimation of each node in the entire scene. Only the octree scene depth estimation generated based on the local-global construction strategy can be used as the final proxy data structure for fast retrieval of the maximum scene depth estimation at runtime.

[0082] like Figure 4 As shown in the figure, the global positional relationship of the current node in the entire tree is represented in two dimensions, where the gray box represents the current node. As can be seen from the figure, the global scene depth estimation of an octree node is anisotropic along the six faces of its bounding box. Therefore, when estimating the global scene depth of each node, it is necessary to consider all six faces of the bounding box sequentially along the positive and negative directions of each coordinate axis.

[0083] (2.2.1) Recursively traverse the octree from top to bottom, passing the external global scene depth as a parameter to the next level. When initially called, the external global scene depth of each face of the root node is 0.

[0084] (2.2.2) According to step (2.2.1), the external global scene depth adjacent to the current face of the node is obtained, and the external global scene depth is added to the local scene depth estimate of the node obtained in step (2.1) to obtain the global scene depth estimate of the current face of the node along the corresponding direction.

[0085] (2.2.3) Based on the octree child node spatial layout structure in step (1), update the external global scene depth of all child nodes along the axial direction.

[0086] (2.2.4) Repeat steps (2.2.1)-(2.2.3) until the global scene depth estimate of each face of all nodes along the positive and negative axial directions is obtained, so as to construct an octree scene depth estimation proxy data structure.

[0087] In this embodiment, each node of the constructed octree scene depth estimation proxy data structure records the global scene depth estimate, quantitatively characterizing the complexity of the space in which the node is located within the scene. Furthermore, due to the good spatial adaptability of the octree space partitioning and the compactness of information storage within the nodes, this proxy data structure has the advantage of low storage overhead.

[0088] (3) Real-time traversal of the octree scene depth estimation proxy data structure constructed in step (2) to retrieve the scene global depth estimate of the viewpoint's spatial location.

[0089] In this embodiment, the scene depth estimation proxy strategy preprocesses and encodes the scene depth information into an octree structure during the construction phase. During the real-time rendering phase, a single indexing operation is sufficient to adaptively obtain a reliable estimate of the scene depth under the current viewpoint, enabling rapid execution of transparent rendering.

[0090] (3.1) Determine whether the viewpoint is outside the octree. If the viewpoint is outside the octree, proceed directly to step (3.2); otherwise, based on the viewpoint position p... v Starting from the root node of the octree, traverse the octree from top to bottom to determine the node where the viewpoint is located.

[0091] In this embodiment, the viewpoint position is represented as p. v = (x, y, z), representing the viewpoint orientation as n v =(n x ,n y ,n z The complete viewpoint information is defined by six degrees of freedom parameters of viewpoint position and viewpoint orientation.

[0092] (3.2) Obtain the cosine value of the viewpoint and the corresponding surface based on the viewpoint orientation and the surface normal of the six surfaces of the node obtained in step (3.1), and determine the main direction based on the cosine value.

[0093] In this embodiment, for the six surfaces of the node obtained in step (3.1), the cosine value of the viewpoint and the corresponding surface can be calculated according to the following formula:

[0094]

[0095] Where cosα represents the cosine of the viewpoint and the corresponding surface, and n v =(n x ,n y ,n z () indicates the direction of the viewpoint. Represents the surface normal.

[0096] Calculate the cosine values ​​of the viewpoint and the six surfaces, and select the value where cosα has the largest absolute value. With n v When the included angle is smallest, it indicates that the viewpoint direction is most consistent with the surface direction, and this surface should be chosen as the main direction. Figure 5 As shown.

[0097] (3.3) Index the octree scene depth estimation proxy data structure constructed in step (2) according to the main direction determined in step (3.2) to obtain the viewpoint position p. v The global scene depth estimate recorded on the corresponding surface in the node. Optimized configuration of computational and storage resources required for transparency rendering.

[0098] This invention proposes an octree proxy mechanism-based scene depth estimation strategy for transparent rendering. During the construction phase, scene depth estimation encoding is performed; since it's an offline mode, its overhead has negligible impact on runtime performance. During the rendering phase, based on the efficient octree spatial partitioning attribute, the octree scene depth estimation proxy data structure is traversed in real-time. This allows for the retrieval of scene depth parameters at the viewpoint's spatial location, enabling efficient point-octree spatial traversal and main direction query testing. Compared to existing high-complexity approximation methods, this approach offers the advantage of low computational overhead. This invention can dynamically adapt to viewpoint changes, achieving highly efficient, free-roaming transparent scene rendering. It can be easily integrated into existing mainstream transparent rendering algorithms, improving the quality of the synthesized transparent rendering and algorithm performance.

[0099] Corresponding to the aforementioned embodiments of the depth estimation method for transparent rendering of complex scenes based on octrees, the present invention also provides embodiments of a depth estimation device for transparent rendering of complex scenes based on octrees.

[0100] See Figure 6 The present invention provides a depth estimation device for transparent rendering of complex scenes based on octree, comprising one or more processors for implementing the depth estimation method for transparent rendering of complex scenes based on octree in the above embodiments.

[0101] The embodiment of the octree-based transparent rendering depth estimation device for complex scenes of this invention can be applied to any device with data processing capabilities, such as a computer. The device embodiment can be implemented in software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of any data processing device loading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 6 The diagram shown is a hardware structure diagram of any device with data processing capabilities, which can be used for the octree-based transparent rendering depth estimation device for complex scenes according to the present invention. (Except for...) Figure 6 In addition to the processor, memory, network interface, and non-volatile memory shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.

[0102] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0103] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0104] This invention also provides a computer-readable storage medium storing a program that, when executed by a processor, implements the octree-based method for depth estimation of complex scenes in transparent rendering as described in the above embodiments.

[0105] The computer-readable storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be any data processing device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.

[0106] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A depth estimation method for transparent rendering of complex scenes based on octrees, characterized in that, Includes the following steps: (1) Perform octree space partitioning on the scene, assign the triangular facets of the scene to the leaf nodes of the octree, perform sampling calculations, and save the results to the leaf nodes; step (1) includes the following sub-steps: (1.1) An axis-aligned bounding box spatial structure is used to generate a bounding box based on the spatial position data of the transparent object to be rendered; (1.2) Using the bounding box generated in step (1.1) as the root node, divide the current node into 8 child nodes each time. Determine whether the current node meets the preset division termination condition. If it does, the division ends and the triangular facets of the scene are assigned to their respective leaf nodes; otherwise, continue the division. (1.3) Sample and calculate the triangular facets in the leaf nodes of step (1.2) to obtain the scene depth estimate of the space where the node is located, and save it to the leaf node; (2) Based on the octree with non-empty leaf nodes sampled in step (1), a local-global construction strategy is adopted to calculate the global scene depth estimate of all nodes in the octree, so as to construct the octree scene depth estimation proxy data structure; step (2) includes the following sub-steps: (2.1) The method in step (1) is used to sample and calculate the triangular facets in all nodes of the octree to obtain the local scene depth estimate of the space in which all nodes are located; (2.2) Based on the local scene depth estimates of all nodes obtained in step (2.1), obtain the global scene depth estimates of all nodes in the entire scene to construct an octree scene depth estimation proxy data structure; (3) Traverse the octree scene depth estimation proxy data structure constructed in step (2) in real time and retrieve the scene global depth estimate of the spatial location of the viewpoint.

2. The method for depth estimation of complex scenes based on octree for transparent rendering according to claim 1, characterized in that, The step (1.2) of determining whether the current node meets the preset division termination condition specifically includes: determining whether the depth of the octree where the current node is located is greater than or equal to the preset maximum value or whether the L2 norm of the current node is less than or equal to the preset L2 norm threshold. If so, the division ends and the triangle facets of the scene are assigned to their respective leaf nodes; otherwise, the division continues.

3. The method for depth estimation of complex scenes based on octree for transparent rendering according to claim 1, characterized in that, The specific steps (1.3) are as follows: First, each facet in the set of triangular facets of the leaf node in step (1.2) is projected one by one along the axial direction onto the corresponding surface of the bounding box; then, an intersection test is performed on the set of facets projected onto the surface of the bounding box, the maximum superposition count is retained as the scene depth estimate in the direction corresponding to the node, and saved to the leaf node.

4. The method for depth estimation of complex scenes based on octree transparent rendering according to claim 1, characterized in that, Step (2.1) includes the following sub-steps: (2.1.1) Obtain the local scene depth of the empty leaf node of the octree. The local scene depth of the empty leaf node is estimated to be 0. (2.1.2) Obtain the local scene depth of the non-empty leaf nodes of the octree based on the scene depth estimation saved to the leaf nodes in step (1); (2.1.3) Traverse the octree from bottom to top. Along the axis, use the method in step (1) to sample and calculate the triangle facets in all child nodes of the middle node of the octree to obtain the scene depth estimate of all child nodes of the current middle node. Add the scene depth estimates of the two child nodes aligned along the axis of the upper and lower layers to obtain the scene depth estimate of each group of child nodes. Obtain the local scene depth estimate of the current middle node based on the scene depth estimate of each group of child nodes. (2.1.4) Repeat step (2.1.3) until the traversal process reaches the root node to obtain the local scene depth estimate of all intermediate nodes.

5. The method for depth estimation of complex scenes based on octree transparent rendering according to claim 1, characterized in that, Step (2.2) includes the following sub-steps: (2.2.1) Recursively traverse the octree from top to bottom, passing the external global scene depth as a parameter to the next level. When the call is first made, the external global scene depth of each face of the root node is 0. (2.2.2) According to step (2.2.1), the external global scene depth adjacent to the current face of the node is obtained, and the external global scene depth is accumulated with the local scene depth estimate of the node obtained in step (2.1) to obtain the global scene depth estimate of the current face of the node along the corresponding direction. (2.2.3) Update the external global scene depth of all child nodes along each face of the axis according to the octtree child node spatial layout structure in step (1); (2.2.4) Repeat steps (2.2.1) to (2.2.3) until the global scene depth estimate of each face of all nodes along the positive and negative axial directions is obtained, so as to construct an octree scene depth estimation proxy data structure.

6. The method for depth estimation of complex scenes based on octree for transparent rendering according to claim 1, characterized in that, Step (3) includes the following sub-steps: (3.1) Determine whether the viewpoint is outside the octree. If the viewpoint is outside the octree, proceed directly to step (3.2); otherwise, based on the viewpoint position... Starting from the root node of the octree, traverse the octree from top to bottom to determine the node where the viewpoint is located. (3.2) Obtain the cosine value of the viewpoint and the corresponding surface based on the viewpoint orientation and the surface normal vector of the six surfaces of the node obtained in step (3.1), and determine the main direction based on the cosine value; (3.3) Index the octree scene depth estimation proxy data structure constructed in step (2) according to the main direction determined in step (3.2) to obtain the viewpoint position. The global scene depth estimate recorded on the corresponding surface in the node.

7. A depth estimation device for transparent rendering of complex scenes based on an octree, characterized in that, It includes one or more processors for implementing the octree-based method for transparent rendering of complex scenes for depth estimation as described in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, It stores a program that, when executed by a processor, is used to implement the octree-based method for depth estimation of complex scenes in transparent rendering as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Method for processing cosmically complex three-dimensional scene based on eight-fork tree

    CN101281654A

  • Point cloud rendering method, system and device based on tree-structured grid vector quantization

    CN108615254A