A method for invisible surface culling for three-dimensional modeling

CN123015900APending Publication Date: 2026-10-30BEIJING FEIDU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611486398.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-23
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

该方法的根本缺陷在于:像素是有面积的,同一个像素内往往同时投影了多个三角形,而单一深度、单一编号的缓冲只能记录其中一个“赢家”,无法表达像素内部真实的覆盖关系

Benefits of technology

[0015]与现有技术相比,本发明的有益效果在于:本发明提出像素内覆盖校验机制:认识到粗像素只记录一个赢家、无法表达方格内部不同位置的真实覆盖关系,因此在候选三角形自身的精确采样点位置上重新校验赢家是否真的覆盖它,据此区分出严格证据和代理证据两类可信度不同的可见证据。这一步是本发明区别于现有多视角深度缓冲方法的核心:现有方法在像素粒度上判定可见性,凡未成为某像素最近面的三角形一律删除;本方案在亚像素粒度上逐候选面复核,能够保留那些从未成为任一像素赢家、但实际暴露在外的细长面。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015900A_ABST
    Figure CN123015900A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of digital modeling, and particularly relates to a non-visible surface culling method for three-dimensional model modeling, comprising: establishing a global triangle set; generating a plurality of uniform observation directions; performing orthogonal projection and conservative rasterization direction by direction to establish a buffer; performing in-pixel coverage checking under the observation direction of a triangle front-facing direction, and recording strict visible evidence or proxy visible evidence according to the observation direction; calculating comprehensive evidence, and taking the number of the observation direction of the triangle front-facing direction as a normalization denominator to calculate a visibility ratio; retaining the triangle when the visibility ratio is greater than or equal to a preset culling threshold, otherwise deleting the triangle. The present application stably determines and culls a triangle that is invisible from multiple external directions without relying on model closure, manifold, global consistency of inside and outside directions, and without relying on input normal vector attributes, thereby improving the loading and rendering performance of a Web terminal and a mobile terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital modeling technology, and in particular to a method for removing unseen faces in 3D modeling. Background Technology

[0002] 3D models are core data for systems such as digital twins, smart cities, and lightweight BIM displays. Models produced from Building Information Modeling (BIM) and oblique photogrammetry often contain numerous triangles that are not visible from any external direction. These include internal building mezzanines, internal equipment structures, overlapping and repetitive internal surfaces, and faces completely enclosed within other components. These triangles contribute nothing to the final displayed image during mid- and long-range rendering, yet consume significant storage space, network bandwidth, and rendering overhead. Eliminating these invisible triangles during lightweight model building is crucial for improving loading and rendering performance on both web and mobile devices.

[0003] There are two main types of existing methods for removing unseen individuals: The first type relies on the model's closure or manifold property to determine the inside / outside relationship, such as ray intersection, voxel inside / outside determination, and Boolean operations on closed volumes. However, real-world engineering models are generally not closed or manifold, and the order of triangles and the orientation of normals are often chaotic, making it impossible for these methods to establish reliable inside / outside relationships, resulting in decision failures or a large number of false deletions.

[0004] The second type is a simple multi-view depth buffering method: The model is rendered from multiple directions, and each pixel records the nearest triangle number. After summing the data from multiple directions, triangles that have never been the nearest face in any direction are deleted. The fundamental flaw of this method is that pixels have area, and multiple triangles are often projected simultaneously within the same pixel. A single depth and single number buffer can only record one "winner," failing to represent the true coverage relationship within the pixel. For narrow triangles thinner than a pixel, such as pipes, railings, and mesh structures, they are often mistakenly judged as invisible and deleted because they do not exactly cover the pixel center, ultimately leaving holes in the model and causing breaks in the slender structure. Summary of the Invention

[0005] To address this, the present invention provides a method for removing invisible faces in 3D modeling, which overcomes the problem of robustly identifying and removing triangles that are not visible from multiple external directions without relying on model closure, manifold, globally consistent internal and external orientation, or input normal vector properties, while avoiding the problem of accidentally deleting subpixel-level narrow visible structures.

[0006] To achieve the above objectives, the present invention provides a method for removing unseen faces in 3D modeling, comprising: Vertex welding is performed on all triangles in the target model and each triangle is numbered to establish a global triangle set; Multiple observation directions are uniformly generated on a unit sphere using the Fibonacci sphere method; For each viewing direction, all triangles are orthogonally projected along the viewing direction and rendered to a two-dimensional pixel grid using a conservative rasterization method. Each pixel square records the nearest depth value and the corresponding triangle number that falls inside it as the winner of the pixel; transparent surfaces are not written with depth and are reserved by default. For each triangle in each viewing direction, perform an intra-pixel coverage check, including: taking a sampling point on the projection point of the triangle itself, and determining whether the winning triangle currently recorded in the pixel square actually covers the sampling point, so as to record a vote of strictly visible evidence or a vote of proxy visible evidence; The number of strictly visible evidence votes and the number of proxy visible evidence votes for each triangle in the observation direction facing the front are accumulated. The comprehensive evidence is calculated according to the formula, and the visibility ratio is calculated using the number of observation directions facing the front of the triangle as the normalized denominator. Wherein, comprehensive evidence = number of strictly visible evidence votes + proxy weight × number of proxy visible evidence votes. The triangle is retained when the visibility ratio is greater than or equal to a preset rejection threshold; otherwise, the triangle is deleted.

[0007] Furthermore, if the winning triangle covers the sampling point, the depth of the winning triangle and the triangle at that sampling point are compared. If the triangle is not farther than the winning triangle, a vote of strictly visible evidence is recorded.

[0008] Furthermore, if the winning triangle does not cover the sampling point and the triangle is not located behind the plane containing the winning triangle, then a vote of proxy visible evidence is recorded.

[0009] Furthermore, if the winning triangle covers the sampling points and has the same depth, then the determination of whether the triangle has obtained strict visibility evidence is made according to the deterministic decision rule; The deterministic decision rule is as follows: first, the decision is made based on the orientation relationship between the geometric normal of the triangle and the viewing direction, and the side facing the camera wins; If the orientations are the same, the triangles are determined according to their fixed numbers in the global triangle set.

[0010] Furthermore, in response to the condition that the aspect ratio of the triangle exceeds a preset threshold and surrogate visible evidence has been obtained, the search for strictly visible evidence continues preferentially at other sampling points and in other observation directions.

[0011] Furthermore, the number of viewing directions facing the front is determined by the geometric normal of the triangle itself and the viewing direction, and the geometric normal is calculated by the cross product of the triangle vertices around the ordered cross. If the dot product of the geometric normal and the viewing direction is less than zero, it is considered as the frontal orientation in that direction.

[0012] Furthermore, it also includes: when the current cumulative comprehensive evidence is greater than or equal to the product of a preset rejection threshold and the total number of observation directions facing the front of the triangle, the calculation of the remaining observation directions is stopped and the triangle is retained.

[0013] Furthermore, it also includes performing mesh simplification on the remaining triangles after deleting invisible triangles.

[0014] Furthermore, there are 128 observation directions, and the resolution of the two-dimensional pixel grid is 1024×1024.

[0015] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention proposes an intra-pixel coverage verification mechanism: recognizing that coarse pixels only record one winner and cannot express the true coverage relationship of different positions within the grid, it re-verifies whether the winner truly covers the candidate triangle at its precise sampling point position, thereby distinguishing between two types of visible evidence with different levels of credibility: strict evidence and surrogate evidence. This step is the core of this invention, which differs from existing multi-view depth buffering methods: existing methods determine visibility at the pixel level, deleting any triangle that is not the nearest face to a pixel; this solution verifies each candidate face at the sub-pixel level, which can retain those slender faces that have never been the winner of any pixel but are actually exposed.

[0016] Furthermore, this invention proposes a dual-evidence voting mechanism that combines rigorous evidence and proxy evidence, and prioritizes rigorous evidence to support elongated surfaces, thus solving the problem of accidental deletion of subpixel elongated structures.

[0017] Furthermore, this invention only counts visible evidence in the observation direction of the triangle's frontal orientation and uses the number of directions of the frontal orientation as the normalization denominator; the frontal orientation is determined by the geometric normal obtained from the triangle's winding sequence and the observation direction, without relying on the input normal vector properties.

[0018] Furthermore, this invention proposes a processing method in which transparent surfaces are neither written into depth, nor participate in occlusion competition, and are always retained, so that the real opaque surfaces behind the transparent surfaces are not misjudged as invisible, and the transparent surfaces themselves are not mistakenly deleted.

[0019] Furthermore, this invention employs a deterministic decision-making method of "face orientation priority and global fixed number fallback" for coplanar overlapping surfaces, ensuring that the results under the same input are independent of the traversal order and parallel scheduling, and are reproducible.

[0020] Furthermore, this invention still employs a conventional depth buffer that stores only one depth and one triangle number per pixel, eliminating the need to store all projected fragments pixel by pixel. By performing coverage verification at the precise sampling positions of candidate triangles, it improves the visibility determination capability for sub-pixel fine structures and reduces the risk of accidental deletion caused by traditional single-win depth buffers. In addition, this solution does not rely on the connectivity and internal / external topology of the model throughout the process, and can directly handle non-closed, non-manifold BIM and oblique photogrammetry triangulation, which also distinguishes it from existing simplified methods that rely on assembly structure trees or mesh adjacency relationships. Attached Figure Description

[0021] Figure 1 This is a flowchart of an unseen face removal method for 3D model modeling according to an embodiment of the present invention; Figure 2 a is a schematic diagram of strict visible evidence pixel coverage verification according to an embodiment of the present invention; Figure 2 b is a schematic diagram of the overlay verification of visible evidence pixels in an embodiment of the present invention. Detailed Implementation

[0022] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0023] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0024] It should be noted that in the description of this invention, the terms "upper", "lower", "left", "right", "inner", "outer", etc., which indicate directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and is not intended to indicate or imply that the device or element must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of this invention.

[0025] Furthermore, it should be noted that, in the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0026] An embodiment of the present invention provides a method for removing unseen faces in 3D modeling, comprising: Vertex welding is performed on all triangles in the target model and each triangle is numbered to establish a global triangle set; Multiple observation directions are uniformly generated on a unit sphere using the Fibonacci sphere method; For each viewing direction, all triangles are orthogonally projected along the viewing direction and rendered to a two-dimensional pixel grid using a conservative rasterization method. Each pixel square records the nearest depth value and the corresponding triangle number that falls inside it as the winner of the pixel; transparent surfaces are not written with depth and are reserved by default. For each triangle in each viewing direction, perform an intra-pixel coverage check, including: taking a sampling point on the projection point of the triangle itself, and determining whether the winning triangle currently recorded in the pixel square actually covers the sampling point, so as to record a vote of strictly visible evidence or a vote of proxy visible evidence; The number of strictly visible evidence votes and the number of proxy visible evidence votes for each triangle in the observation direction facing the front are accumulated. The comprehensive evidence is calculated according to the formula, and the visibility ratio is calculated using the number of observation directions facing the front of the triangle as the normalized denominator. Wherein, comprehensive evidence = number of strictly visible evidence votes + proxy weight × number of proxy visible evidence votes. The triangle is retained when the visibility ratio is greater than or equal to a preset rejection threshold; otherwise, the triangle is deleted.

[0027] Specifically, the entire model, which may contain multiple drawing units and components, is merged into a unified set. Only vertex welding is performed; no connected component partitioning or any internal or external topology analysis is done. Each triangle is assigned a globally unique and stable number. This approach is because the topology of engineering models is unreliable; any judgment relying on "which closed body a certain face belongs to" will fail. Therefore, the model is treated as a collection of independent triangles.

[0028] Specifically, N viewing directions are uniformly generated on a unit sphere using the Fibonacci sphere method, with a default of 128. This uniform distribution of directions ensures that each viewpoint has equal weight in subsequent voting, preventing misjudgments caused by excessively dense concentration of certain angles.

[0029] Specifically, for each viewing direction, all triangles are orthogonally projected along that direction and rasterized onto a two-dimensional image with a default resolution of 1024×1024. This two-dimensional image consists of individual pixel squares, each a small square with an area, rather than a point in the mathematical sense. Two pieces of information are recorded for each pixel square: the nearest depth value falling within that square, and the number of the triangle that obtained that nearest depth, referred to as the "winner" of that square.

[0030] One important point to note here is that each pixel square can only store one winner. Even if several triangles are projected simultaneously within a square, the buffer will only record one as the representative of the entire square, and cannot reflect which triangle occupies different positions within the square. Because each square can only store one winner, and the granularity is relatively coarse, such pixel squares will be referred to as "coarse pixels" in the following text. Key point one: Conservative rasterization is used: as long as a triangle has any area overlap with a pixel, it is considered to cover that pixel, rather than only counting when the triangle covers the center of the pixel. In this way, sub-pixel-level narrow triangles will not be missed by the entire depth map because they miss the pixel center. Key point two: Transparent surfaces are handled separately: the opacity of each surface is resolved based on the transparency or blending state of the material. Transparent surfaces, such as glass and cutout textures, are neither written into the depth when the buffer is built, nor do they participate in the "winner" competition. Therefore, they do not obscure the surfaces behind them, and the opaque surfaces behind them naturally become the winners of that pixel and are judged to be visible. At the same time, transparent surfaces themselves are always retained in this method and do not enter the deletion candidate. This approach avoids misjudging the actual surface behind the glass or perforated texture as invisible, while also ensuring that the transparent surface itself is not mistakenly deleted. The key issue is why "the winner is not a candidate triangle" doesn't prove that a candidate triangle is blocked. For example, within the same coarse-pixel grid, triangle A occupies the left half of the grid, and candidate triangle B occupies the right half. Their actual positions within the grid do not overlap, but the buffer only records one of them, such as A, as the winner of the entire grid. If we simply determine that B is blocked by A and delete it based on "the winner of this grid is A, not B," it will cause a false deletion because A doesn't actually exist in the right half where B is actually located. Therefore, to determine whether B is visible, we cannot stay at the coarse level of "who is the winner of the entire grid," but must go to the precise position where B is actually projected to see what actually occupies that position.

[0031] Please see Figure 2 Specifically, this involves determining at precise locations whether the winner truly covers the candidate triangle. Within each pixel square covered by the projection of candidate triangle B, a sampling point is selected, called a sampling point. Then, the currently recorded winner A for that square is used to determine whether A's projection truly covers this sampling point of B. Based on this, two cases are identified: Scenario 1: Winner A indeed covers B's sampling point. This indicates that at this precise location, A and B are truly overlapping, one in front and one behind, allowing for further depth comparison; this is termed "strictly visible evidence," indicating high reliability. At B's sampling point, calculate the depth of winner A at that location and compare it to B's depth. If B is not farther than A (i.e., B is further ahead), or if their depths are roughly equal and B is awarded according to the deterministic ruling rule of coplanar competition, then B is the foremost, directly exposed surface at this precise location. Therefore, this observation direction forms highly reliable "strictly visible evidence" for B. If B is significantly farther, then this direction provides no evidence for B.

[0032] Scenario 2: Winner A did not cover B's sampling point. This indicates that A only "won the entire square," and A is not actually present at B's actual location. Therefore, there is no confirmed, forward face blocking B. This is termed "proxy visible evidence," which has low reliability. In this case, no face is confirmed to block B at its sampling point location. As long as B is not clearly hidden behind the plane where winner A is located, i.e., B is in front of or roughly level with plane A, B is considered likely to be a narrow face sandwiched within the square, unable to win the prize but actually exposed. This forms "proxy visible evidence." It is called "proxy" and has lower reliability than strict evidence because we can only use the estimated depth of the plane where winner A is located at that position as a reference, rather than a strict occlusion conclusion obtained at the same location. Therefore, it is included with a weight less than 1 in subsequent summaries.

[0033] Specifically, under the same observation direction, if any sampling point forms strictly visible evidence, then that direction is considered strictly visible; otherwise, if any sampling point forms surrogate visible evidence, then it is considered surrogate. Each triangle has at most one vote per observation direction.

[0034] Specifically, the cumulative number of rigorous evidence votes and proxy evidence votes obtained for each triangle in the observation direction facing forward is calculated using the following formula: Comprehensive evidence = Strict evidence votes + Agency weight × Agency evidence votes; Visibility ratio = Total evidence / Number of directions the triangle is facing.

[0035] Here, the 'number of directions facing forward' is used as the normalization denominator. Strictly visible evidence and surrogate visible evidence are only counted in the observation direction facing forward; the observation direction facing backward is not included in the evidence count and is not included in the normalization denominator. The method for determining facing forward is explained in the next paragraph. A triangle is retained when the visibility ratio is greater than or equal to a preset rejection threshold (default 0.20); otherwise, it is deleted.

[0036] Specifically, if the winning triangle covers the sampling points and has the same depth, then the determination of whether the triangle has obtained strict visibility evidence is made according to the deterministic decision rule; The deterministic decision rule is as follows: first, the decision is made based on the orientation relationship between the geometric normal of the triangle and the viewing direction, and the side facing the camera wins; If the orientations are the same, the triangles are determined according to their fixed numbers in the global triangle set.

[0037] When multiple triangles at the same sampling point have almost equal depths, the decision is first made based on the relationship between the geometric normal and the viewing direction, with the side facing the camera taking priority. If the orientations are the same, the decision is then made based on the triangle's globally fixed number, with the smaller number taking priority. The fixed number remains unchanged throughout the entire process to ensure reproducible results.

[0038] Specifically, in response to the condition that the aspect ratio of the triangle exceeds a preset threshold and surrogate visibility evidence has been obtained, the search for strictly visible evidence continues preferentially at other sampling points and in other observation directions. For elongated triangles with a large aspect ratio, the triangle aspect ratio is combined with the raster resolution for identification. Even if surrogate evidence has already been obtained, the search for strictly visible evidence continues at other sampling points and in other directions, using strictly visible evidence with higher credibility to support its preservation. This avoids the final result depending on the pixel traversal order.

[0039] Specifically, the number of viewing directions of the front face is determined by the geometric normal of the triangle itself and the viewing direction, and the geometric normal is calculated by the cross product of the triangle vertices around the ordered cross. If the dot product of the geometric normal and the viewing direction is less than zero, it is considered as the frontal orientation in that direction.

[0040] The orientation and orientation determination in this method are not based on the normal vector properties of the input model, but are determined by the geometric normal calculated from the triangle's own winding order and the viewing direction. If the dot product of the geometric normal and the viewing direction is less than zero, it is considered as the frontal orientation in that direction. The normalization denominator uniformly takes the direction number of the frontal orientation for each triangle. Therefore, this method does not use or require the input normal properties to be correct, nor does it require the entire model to have a consistent internal and external orientation.

[0041] Specifically, it also includes: when the current cumulative comprehensive evidence is greater than or equal to the product of the preset elimination threshold and the total number of observation directions facing the front of the triangle, the verification of the remaining observation directions of the triangle is stopped and the triangle is directly retained. The preset elimination threshold is 0.2, and the product is 13.

[0042] Specifically, only the index data corresponding to the triangles determined to be deleted is rewritten; the vertex coordinates, normals, texture coordinates, colors, and material states remain unchanged. Optionally, a reverse output can be provided, showing only the deleted triangles for manual sampling to check for accidental deletions.

[0043] Specifically, it also includes: S0, first deleting triangles that are not visible at all. This elimination method is a preliminary step for mesh simplification: first delete triangles that are not visible at all, then perform secondary error metric mesh simplification on the remaining visible triangles. The combination of the two can achieve a higher overall lightweighting rate.

[0044] Example 1 S01, Model Preprocessing and Global Numbering In this embodiment, the input target model is a large steel structure building information model, which includes components such as beams, columns, supports, and connection nodes. The total number of triangular faces is approximately 1,200,000. The original model data includes multiple drawing units and different material groups.

[0045] First, extract the triangular faces from all drawing units and merge them into a unified geometric set. During merging, only the vertices are welded—that is, according to spatial position tolerance, for example, a tolerance of 1×10. -6 For each unit length, vertices with the same coordinates are merged into a single vertex to eliminate minor gaps caused by splicing; however, connected component partitioning, closed volume identification, or internal / external topological analysis are not performed. This is because engineering models commonly suffer from topological defects such as gaps, overlapping surfaces, and non-manifold edges, and relying on "which closed volume a certain surface belongs to" is highly prone to failure.

[0046] After the vertex welding is completed, each triangle is assigned a globally unique and stable number. The numbering rule is to increment the number according to the original order of the triangles in the merge set, from 1 to 1,200,000. This number remains unchanged throughout the removal process and serves as a unique identifier for subsequent voting, adjudication, and result tracing.

[0047] S02, Observation Direction Generation On a unit sphere, 128 observation direction vectors are uniformly generated using the Fibonacci sphere algorithm. Specifically, the generation method involves quasi-uniform sampling on the sphere using the golden angle, ensuring that the angular distance between any two directions is approximately equal, thus preventing directions from concentrating in a particular region.

[0048] In this embodiment, the number of directions N is set to 128 by default, but it can be adjusted according to the model complexity: for simple models, such as those with fewer than 50,000 triangles, N=64 can be used to improve speed; for high-precision models, such as those with more than 5 million triangles, N=256 can be used to improve discrimination accuracy. The purpose of uniformly distributing directions is to ensure that each viewpoint has equal weight in subsequent voting, avoiding oversampling or missed detection of some triangles due to dense viewpoints.

[0049] S03, Conservative Rasterization Rendering and Depth Buffer Setup For each observation direction vector d, perform the following operations: All triangles of the target model are orthogonally projected along the d-direction, with the projection plane perpendicular to d. Then, a conservative rasterization method is used to render all triangles onto a 1024×1024 resolution 2D pixel grid. Each pixel square is a square region with a side length of 1 unit in the projection space. Unlike traditional rasterization, conservative rasterization determines whether a triangle covers a pixel square by: as long as there is an area intersection between the triangle and the pixel square, even if the intersection is extremely small, it is considered a cover, rather than only counting if the triangle covers the pixel center point. This effectively avoids elongated or sub-pixel-level triangles being completely missed because they miss the pixel center.

[0050] Each pixel square records two pieces of information: Nearest depth value: Among all the covered triangles within this square, the depth value that is closest to the viewpoint along the viewing direction. The smaller the depth value, the closer it is to the viewpoint. Winner Triangle Number: The triangle number that obtained the most recent depth value.

[0051] Special note: Each pixel square stores only one winner. Even if multiple triangles cover the square simultaneously, the buffer only records one as the whole square representative. Due to the coarse granularity of the squares, this type of pixel is referred to as a "coarse pixel" in this embodiment.

[0052] S04, In-pixel coverage verification and evidence voting This step is the core innovation of the method, aiming to solve the misjudgment problem caused by coarse pixel granularity. It performs a precise positional coverage check on each triangle in the viewing direction facing its front.

[0053] Choose candidate triangle B, and select a sampling point in each pixel square covered by its own projection. The sampling point is selected as follows: within the intersection area of ​​B and the current pixel square, take the centroid of that area as the sampling point; if the intersection area is irregular, take any definite point within the intersection boundary. This sampling point represents the precise position of B within that square.

[0054] Then, read the winning triangle A currently recorded for that pixel square and perform the following judgment: Scenario 1: Determine whether the projection of A geometrically covers the sampling point of B. Specifically, backproject the 2D coordinates of the sampling point onto the plane containing A, and check if the point lies inside the area enclosed by the three sides of A. If the result is yes, it indicates that A and B have an actual overlapping relationship at that precise location. Then compare the depth values ​​of both at the sampling point: If the depth of B is less than or equal to the depth of A, that is, B is not farther away, or the two are basically equal, then it is determined that B is visible in that direction, forming strict evidence of visibility. If the depth of B is greater than the depth of A, meaning B is clearly blocked by A, then this direction provides no evidence.

[0055] Scenario 2: If A does not cover B's sampling point, it means that A only "won the entire coarse pixel square," and A does not actually exist at the position occupied by B, so there is no known foreground surface blocking B. In this case, the extrapolated depth value of the winner A at the sampling point position is taken as a reference. If B's ​​depth is not greater than this reference depth plus a small tolerance, for example, the depth tolerance is set to 1×10... -5 If the unit is B, then it is considered that B is likely a narrow or edge face within the square that failed to capture the winner but was not actually obscured, forming surrogate visibility evidence. The weight of this evidence is set to 0.5 in this embodiment and will be used in subsequent summarization.

[0056] Under the same observation direction, if any sampling point forms strictly visible evidence, then that direction is considered strictly visible; otherwise, if any sampling point forms surrogate visible evidence, then it is considered surrogate. Each triangle has at most one vote per observation direction.

[0057] Deterministic decision rule when depths are equal: When sampling points A cover B and the depth difference between the two is within the tolerance range (i.e., they are essentially coplanar), the following deterministic decision rule is adopted to avoid randomness: First, the triangle is judged based on the relationship between its geometric normal and the viewing direction—the side facing the camera, i.e., the dot product of the normal and the viewing direction is less than 0, wins. If both sides face the same direction, such as when both sides overlap or the forward and reverse winding order coincides, the triangle will be judged according to its fixed numbering order in the global set, with the smaller number winning.

[0058] This rule does not rely on the input normal properties; it calculates the geometric normals from the triangle vertices in the order of their rotation and the cross product of the two sides, ensuring that the results are reproducible.

[0059] S05, Evidence Summary and Visibility Ratio Calculation After traversing all observation directions, accumulate the number of strictly visible evidence votes V_strict and the number of proxy visible evidence votes V_proxy obtained for each triangle in the observation direction it faces.

[0060] Calculate the comprehensive evidence using the following formula: Comprehensive evidence = V_strict + α × V_proxy, where α is the proxy weight, which is set to 0.5 by default in this embodiment.

[0061] Simultaneously, the total number of viewing directions N_front of the triangle's frontal orientation is counted. The determination method is as follows: calculate the triangle's geometric normal, obtain the dot product of the vertex's cross product with the viewing direction vector, and if the dot product is less than 0, it is considered that the direction is facing downwards towards the camera and is included in the frontal orientation count. This method does not depend on the input normal attributes, nor does it require the entire model to have a consistent orientation.

[0062] Final calculation of visibility ratio: Visibility ratio = Total evidence / N_front If a triangle has N_front=0, meaning it faces away from the camera in all directions, then its visibility ratio is set to 0 and it is deleted.

[0063] S06, Elimination Decision and Retention Strategy A rejection threshold T is set; in this embodiment, T = 0.20 by default. When the visibility ratio of a triangle is ≥ T, it is determined to be visible and retained; otherwise, it is determined to be invisible and deleted.

[0064] For example, if a triangle faces forward in 80 out of 128 directions, and obtains 30 votes of strict evidence and 20 votes of surrogate evidence, then the total evidence = 30 + 0.5 × 20 = 40, and the visibility ratio = 40 / 80 = 0.5 ≥ 0.2, so it is retained.

[0065] Specifically, enhancement processing for elongated triangles. For elongated triangles with an aspect ratio exceeding a preset threshold (e.g., an aspect ratio > 10), this embodiment adds the following mechanism: even if such triangles have obtained surrogate visibility evidence, it still forces a priority search for strictly visible evidence at other sampling points and in other observation directions. This is because elongated triangles are prone to losing their winner position in a coarse pixel grid, and surrogate evidence may not be reliable enough. This strategy avoids the final decision depending on the pixel traversal order by prioritizing the search for highly credible evidence.

[0066] Specifically, early termination optimization To improve processing efficiency, during the traversal process, when the current cumulative comprehensive evidence E_current≥T×N_front, where T is the preset elimination threshold and N_front is the total number of observation directions facing the front of the triangle, the verification of the remaining observation directions is stopped and the triangle is directly retained.

[0067] Specifically, deletion of output results and model updates Ultimately, only the index data of triangles determined to be deleted is rewritten—that is, the corresponding triangle index record is removed from the model's index buffer, while the vertex coordinates, normals, texture coordinates, colors, material states, and other data remain unchanged to maintain the integrity of other model attributes.

[0068] In addition, this embodiment also provides a reverse output option, which outputs the list of deleted triangles and their spatial positions separately for designers to manually check to confirm whether there are any accidental deletions.

[0069] In this embodiment, the unseen face removal method is used as a preprocessing step in mesh simplification, such as the Quadratic Error Metric (QEM) algorithm. The specific process is as follows: First, execute this method to delete a large number of completely invisible internal faces, back faces, and occluding faces; Then, QEM mesh simplification is performed on the remaining visible triangles to further reduce the number of faces.

[0070] Experiments show that in typical BIM models, this method can first eliminate about 40%-60% of the non-visual elements, and then achieve a total lightweighting rate of 70%-85% after QEM simplification, with minimal loss of visual quality in the simplified model.

[0071] Parameter configuration and adaptive adjustment: In this embodiment, the parameters are as follows: number of directions N=128, mesh resolution 1024×1024, culling threshold T=0.20, surrogate weight α=0.5, depth tolerance 1×10⁻⁶. -5 These are all default values, which can be flexibly adjusted according to the model scale, accuracy requirements, and computing resources in actual applications. For example, for high-precision industrial models, the resolution can be increased to 2048×2048 and the number of directions can be increased to 256, while for quick previews, the resolution can be reduced to 512×512 and the number of directions can be reduced to 64.

[0072] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

[0073] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for removing unseen faces in 3D modeling, characterized in that, include: Vertex welding is performed on all triangles in the target model and each triangle is numbered to establish a global triangle set; Multiple observation directions are uniformly generated on a unit sphere using the Fibonacci sphere method; For each viewing direction, all triangles are orthogonally projected along the viewing direction and rendered to a two-dimensional pixel grid using a conservative rasterization method. Each pixel square records the nearest depth value and the corresponding triangle number that falls inside it as the winner of the pixel; transparent surfaces are not written with depth and are reserved by default. For each triangle in each viewing direction, perform an intra-pixel coverage check, including: taking a sampling point on the projection point of the triangle itself, and determining whether the winning triangle currently recorded in the pixel square actually covers the sampling point, so as to record a vote of strictly visible evidence or a vote of proxy visible evidence; The number of strictly visible evidence votes and the number of proxy visible evidence votes for each triangle in the observation direction facing the front are accumulated. The comprehensive evidence is calculated according to the formula, and the visibility ratio is calculated using the number of observation directions facing the front of the triangle as the normalized denominator. Wherein, comprehensive evidence = number of strictly visible evidence votes + proxy weight × number of proxy visible evidence votes. The triangle is retained when the visibility ratio is greater than or equal to a preset rejection threshold; otherwise, the triangle is deleted.

2. The method for removing unseen faces in 3D modeling according to claim 1, characterized in that, If the winning triangle covers the sampling point, then the depth of the winning triangle and the triangle at that sampling point are compared. If the triangle is not farther than the winning triangle, then a vote of strictly visible evidence is recorded.

3. The method for removing unseen faces in 3D modeling according to claim 2, characterized in that, If the winning triangle does not cover the sampling point and the triangle is not located behind the plane containing the winning triangle, then a vote of proxy visible evidence is recorded.

4. The method for removing unseen faces in 3D modeling according to claim 3, characterized in that, If the winning triangle covers the sampling points and has the same depth, then the determination of whether the triangle has obtained strict visibility evidence shall be made in accordance with the deterministic decision rule. The deterministic decision rule is as follows: first, the decision is made based on the orientation relationship between the geometric normal of the triangle and the viewing direction, and the side facing the camera wins; If the orientations are the same, the triangles are determined according to their fixed numbers in the global triangle set.

5. The method for non-visible surface culling for three-dimensional modeling of claim 4, wherein, In response to the condition that the aspect ratio of the triangle exceeds a preset threshold and surrogate visible evidence has been obtained, the search for strictly visible evidence continues preferentially at other sampling points and in other observation directions.

6. The method for non-visible surface culling for three-dimensional modeling of claim 5, wherein, The number of viewing directions for the front face is determined by the geometric normal of the triangle itself and the viewing direction. The geometric normal is calculated by the cross product of the triangle vertices around the ordered cross. If the dot product of the geometric normal and the viewing direction is less than zero, it is considered as the frontal orientation in that direction.

7. The method for non-visible surface culling for three-dimensional modeling of claim 6, wherein, Also includes: When the current cumulative evidence is greater than or equal to the product of the preset rejection threshold and the total number of observation directions facing the triangle, the calculation of the remaining observation directions is stopped and the triangle is retained.

8. The method for non-visible surface culling for three-dimensional modeling of claim 7, wherein, Also includes: After deleting the invisible triangles, perform mesh simplification on the remaining triangles.

9. The method for non-visible surface culling for three-dimensional modeling of claim 8, wherein, There are 128 observation directions, and the resolution of the two-dimensional pixel grid is 1024×1024.