Obstacle generation for structures in digital applications

By using a combination of approximate coarse mesh and patch/voxelization to automatically generate occlusions in the game engine, the problem of visual artifacts caused by non-conservative occlusions is solved and efficient occlusion elimination and rendering effects are achieved.

CN118613837APending Publication Date: 2024-09-06TENCENT AMERICA LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280089612.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-07-15
Filing Date
2022-08-15
Publication Date
2024-09-06

Smart Images

  • Figure CN118613837A_ABST
    Figure CN118613837A_ABST
Patent Text Reader

Abstract

A method for automatically generating an occlusion is performed at a computing system, the method including receiving an input model of a visual three-dimensional structure, the input model having a plurality of faces. The method includes generating an initial occlusion by simplifying an input model into a plurality of candidate patches in a patch-based coarse mesh. The method includes comparing a first two-dimensional region occluded by an input model of a visual three-dimensional structure with a second two-dimensional region occluded by an initial occlusion in a first viewing angle direction to determine a first quality metric based on a first number of pixels occluded by the input model, also occluded by the initial occlusion. The method includes removing the plurality of faces from the initial occlusion while maintaining the first quality metric above a first threshold to form an occlusion for the visual three-dimensional structure.
Need to check novelty before this filing date? Find Prior Art

Description

Priority claim and related applications

[0001] This application is a continuation application of U.S. patent application No. 17 / 866,413, entitled “Occluder Generation for Structures in Digital Applications,” filed on July 15, 2022, which is based on and claims priority to U.S. Provisional Application No. 63 / 302,916, entitled “Occluder Generation for Building In Digital Games,” filed on January 25, 2022, and each of the U.S. patent applications is incorporated herein by reference in its entirety. Technical Field

[0002] The disclosed implementations relate generally to the field of computer technology, and in particular, to occlusion culling in computer graphics. Background Art

[0003] Occlusion culling is a technique used in modern game engines to remove hidden objects from the rendering pipeline. Objects are hidden with respect to a specific viewing direction when there is another object in front of the object along that specific viewing direction. Summary of the invention

[0004] By using a coarse approximation grid (occluders) instead of a fine rendering grid (visual grid) to cull hidden objects during runtime of the application, Graphical Processing Unit (GPU) bandwidth is saved, and rendering costs are reduced due to the reduction in the number of draw calls. A draw call instructs the GPU to prepare drawing resources based on information about textures, states, shaders, render objects, buffers, etc.

[0005] The quality of the occlusion mesh affects the effectiveness and accuracy of culling. Low-polygon meshes (e.g., polygon meshes with a relatively small number of polygons) reduce the cost of culling tests. The culling test checks whether a particular face is completely occluded by other faces. If a particular face is completely occluded by other faces, the particular face is culled from the rendering pipeline to save the cost of further rendering steps. In some embodiments, the low-polygon mesh may include approximately 200 to 300 polygons. In addition, occluders should ideally be conservative and completely within the volume of the visual mesh. Therefore, non-conservative occluders may incorrectly cull visible objects (e.g., objects outside the volume of the visual mesh), resulting in severe visual artifacts, as shown below in Figure 1B and Figure 1C as described in the context of .

[0006] Some objectives of the present application are to address the challenges presented above by presenting a set of solutions for automatically generating occluders for three-dimensional structures.

[0007] According to one aspect of the application, a method for automatically generating an occluder for a visual three-dimensional structure is performed at a computing system. The method includes the following steps: receiving an input model of the visual three-dimensional structure, the input model including a plurality of faces; generating an initial occluder by simplifying the input model into a plurality of candidate faces in a face-based coarse grid, the initial occluder blocking an object behind the visual three-dimensional structure along a first viewing direction; comparing a first two-dimensional area occluded by the input model of the visual three-dimensional structure and a second two-dimensional area occluded by the initial occluder along the first viewing direction to determine a first quality metric based on a first number of pixels blocked by the input model and also blocked by the initial occluder; removing a plurality of faces from the initial occluder while keeping the first quality metric above a first threshold to form an occluder for the visual three-dimensional structure. The occluder blocks an object behind the visual three-dimensional structure from being rendered along the first viewing direction in an application.

[0008] According to another aspect of the present application, a computing system for automatically generating occluders for a visual three-dimensional structure. The computing system includes: one or more processors; a memory; and a plurality of programs stored in the memory. When the plurality of programs are executed by the one or more processors, the computing system performs one or more operations, the one or more operations including: receiving an input model of a visual three-dimensional structure, the input model including a plurality of faces; generating an initial occluder by simplifying the input model into a plurality of candidate faces in a face-based coarse grid, the initial occluder blocking an object behind the visual three-dimensional structure along a first viewing direction; comparing a first two-dimensional area occluded by the input model of the visual three-dimensional structure with a second two-dimensional area occluded by the initial occluder along the first viewing direction to determine a first quality metric based on a first number of pixels blocked by the input model and also blocked by the initial occluder; removing a plurality of faces from the initial occluder while keeping the first quality metric above a first threshold to form an occluder for the visual three-dimensional structure. The occluder blocks the object behind the visual three-dimensional structure from being rendered along the first viewing direction in the application.

[0009] According to another aspect of the present application, a non-transitory computer-readable storage medium is combined with a computing system having one or more processors to store multiple programs for automatically generating occluders for a visual three-dimensional structure. When the multiple programs are executed by one or more processors, the computing system performs one or more operations, the one or more operations including: receiving an input model of a visual three-dimensional structure, the input model including multiple faces; generating an initial occluder by simplifying the input model into multiple candidate faces in a face-based coarse grid, the initial occluder blocking an object behind the visual three-dimensional structure along a first viewing direction; comparing a first two-dimensional area occluded by the input model of the visual three-dimensional structure with a second two-dimensional area occluded by the initial occluder along the first viewing direction to determine a first quality metric based on a first number of pixels blocked by the input model and also blocked by the initial occluder; while keeping the first quality metric above a first threshold, removing multiple faces from the initial occluder to form an occluder for the visual three-dimensional structure. The occluder blocks the object behind the visual three-dimensional structure from being rendered along the first viewing direction in an application. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above-described implementations of the present invention as well as additional implementations will be more clearly understood as a result of the following detailed description of various aspects of the present invention when taken in conjunction with the accompanying drawings. Like reference numerals refer to corresponding parts throughout the several views of the drawings.

[0011] Figures 1A to 1D Describes how non-conservative occluders according to some implementations of the present application can cull visible objects;

[0012] FIG. 2B to FIG. 2E It shows that according to some implementations of the present application Figure 2A Different meshes resulting from the input model shown;

[0013] FIG. 3A to FIG. 3E An input model, results of patch-based simplification of the input model, results of voxelization-based simplification of the input model, a combination of the results, and a final occluder after metric-guided mesh simplification according to some implementations of the present application are shown;

[0014] Figure 4A and Figure 4B Depicting planar and curved patches obtained using groups of different types of input models according to some implementations of the present application;

[0015] Figure 5 A verification process of checking whether a hole corresponds to a decorative object according to some implementations of the present application is shown;

[0016] Figure 6An example of voxel-based mesh simplification according to some implementations of the present application is shown;

[0017] Fig. 7A and Figure 7B Comparison of different perspective sampling methods according to some implementations of the present application;

[0018] FIG. 8A to FIG. 8D An example of occlusion measurement acceleration according to some implementations of the present application is shown;

[0019] Fig.9A and Fig. 9B The standard deviations of the recall and precision for different numbers of quadrilaterals per viewing angle and different sampling distances according to some implementations of the present application are shown;

[0020] Fig.10 A data set of 77 building models for games according to some implementations of the present application is shown;

[0021] Fig.11 shows the average recall and precision of various test buildings according to some implementations of the present application;

[0022] Fig.12 shows example buildings and corresponding obstructions generated according to some implementations of the present application;

[0023] Fig.13 An example of seam closure according to some implementations of the present application is shown;

[0024] Fig.14A and Fig. 14B Examples of several candidate segmentation planes and their corresponding slice regions of a heterogeneous building model according to some implementations of the present application are shown;

[0025] Fig.15 A method for automatically generating occluders for a visual three-dimensional structure according to some implementations of the present application is shown. DETAILED DESCRIPTION

[0026] The following implementations are described with reference to the accompanying drawings to illustrate specific implementations that can be implemented by the present application. Directional terms mentioned in the present application, such as "upper", "lower", "front", "back", "left", "right", "inner", "outer", and "side", are only used as references to the directions of the accompanying drawings. Therefore, the directional terms used are only used to illustrate and understand the present application, rather than to limit the present application. In the drawings, units with similar structures are represented by the same reference numerals.

[0027] Figure 1AAn actual viewing angle 100 from a position in front of the structure 102 is shown. The actual viewing angle 100 corresponds to the ground truth that a player would observe at that position. A first structure 104 and a second structure 106 can be seen from a position in front of the structure 102 along the viewing direction in the actual viewing angle 100.

[0028] Figure 1B A view 108 is shown from the same position in front of structure 102 when a first non-conservative occluder is used. Examples of the first non-conservative occluder include an occluder generated by Silvennoinen. A second structure 106 that was visible from a position in front of structure 102 along the viewing direction in actual view 100 is no longer visible in view 108 because the first non-conservative occluder extends beyond the volume of the visual grid, thereby eliminating the second structure 106 that should be visible as shown in actual view 100. Instead, an area 110 without the second structure 106 is shown in view 108.

[0029] Figure 1C A view 112 is shown from the same position in front of structure 102 when a second non-conservative occluder is used. Examples of second non-conservative occluders include occluders generated by Simplygon. Second structure 106, which was visible from a position in front of structure 102 along the viewing direction in actual view 100, is no longer visible in view 112 because the second non-conservative occluder extends beyond the volume of the visual grid, thereby culling second structure 106 that should be visible as shown in actual view 100. Instead, an area 114 without second structure 106 is shown in view 112.

[0030] Figure 1D A viewing angle 116 is shown from the same position in front of structure 102 when using an occluder according to some embodiments of the present invention. A second structure 106 that was visible in the actual viewing angle 100 from a position in front of structure 102 along the viewing direction is again visible in viewing angle 116.

[0031] like Figure 1B and Figure 1CAs shown, non-conservative occluders may incorrectly remove visible objects, causing severe visual artifacts. As disclosed in more detail below, according to some embodiments, two metrics, precision and recall, are used to qualitatively measure the accuracy of occluders in a 3D (Three Dimensional, 3D) domain. Precision measures the probability that an object blocked by an occluder is also blocked by the original model. Recall calculates the probability that an object blocked by the original model is also blocked by the occluder. Embodiments disclosed herein relate to automatically generating occluders for structures (e.g., architectural models) in game assets. Game artists manually create architectural models to maximize their visual realism, which typically contain many disconnected parts, large open doors and windows, and internal structures, such as Figure 2A What is shown. Figure 2A An input model 200 with an open door 202 and disconnected parts 204a and 204b is shown. In some embodiments, the model 200 may be an input mesh with 7888 faces, 521 components, 562 boundary rings, and 9034 intersecting triangle pairs. In some embodiments, each boundary ring is a hole. Since artists are only concerned with the appearance of the building, the building model is usually non-manifold, non-watertight, and self-intersecting, making conventional mesh processing algorithms unusable. In some embodiments, non-manifold geometry includes any edge shared by more than two faces. In some embodiments, at least one edge in the non-watertight model is a boundary edge. In other words, the non-watertight mesh has holes. In some embodiments, a self-intersecting model means that the mesh has two faces that intersect each other.

[0032] Handcrafted architectural occluders can be manually tuned to achieve a satisfactory balance between precision and recall, but such a process can consume hours of labor. Furthermore, handcrafted occluders may still include faces that do not contribute to recall or violate conservative constraints. Such faces can be referred to as "wasted faces".

[0033] One strategy for automatic occluder generation is to first voxelize the input mesh, extract an isosurface from the voxelized input mesh (e.g., an "output isosurface"), and then simplify the output isosurface, inserting an axis-aligned box or cross-section to form an occluder. In some embodiments, the axis-aligned box (AAB) is simply a rectangular parallelepiped with each face perpendicular to one of the basis vectors. Using such a strategy may prevent some basic features (e.g., thin walls) from being captured at an affordable resolution, such as Figure 2B shown. Figure 2BAn isosurface 206 corresponding to a winding number of 0.5 is shown. When compared to the input model 200, thin walls 208 are missing in the isosurface 206. In addition, nested and open structures in a building model may cause ambiguous orientations for which isosurfaces may not be accurately and correctly extracted. For example, an edge (or face) within an open structure may have a front direction that is perpendicular to one edge of the open structure and parallel to another edge of the open structure, making the orientation of the open structure ambiguous. For example, two connected faces may have opposite normal directions.

[0034] Figure 2C The resulting mesh 212 obtained by applying Silvennoinen's method on the isosurface 206 is shown. The resulting mesh 212 is obtained by interpolating cutting planes. In some embodiments, the resulting mesh 212 may include 150 faces.

[0035] The second strategy involves incrementally removing faces from the input mesh through an error-guided element removal operation. In some embodiments, the second strategy includes operations such as edge collapse, which can generate results with large gaps and parts outside the visual mesh. Such a result mesh violates conservatism, e.g. Figure 2D Example shown. Figure 2D An occluder 214 generated by a Simplygon is shown. Portion 216 extends beyond the volume of the input model 200, and portion 218 covers the open door 202 in the input model 200. Thus, the occluder 214 violates conservatism. In some implementations, the occluder 214 may include 231 faces.

[0036] Simplygon and Silvennoinen's approach assumes that buildings are viewed from a distance and does not take into account concave surfaces and / or internal building structures. Therefore, this output occluder will not provide accurate occlusion when the game character enters these areas.

[0037] Instead of relying on one strategy and hoping that it is general enough to handle all architectural models with different styles, the embodiments disclosed herein involve first generating two coarse meshes from the input mesh using two different methods. The two coarse meshes are combined to fill the candidate face set as a large solution space. Figure 2E An occluder generated using the methods and systems disclosed herein is shown. In some implementations, occluder 214 may include 231 faces.

[0038] Candidate face sets for occluders are evaluated using precision and recall metrics with respect to an input model on a 3D evaluation domain. The methods and systems described herein use a metric-based algorithm to select the best face set from a solution space (e.g., a candidate face set) that has a high occlusion rate while remaining as conservative as possible. The methods and systems also involve incorporating one or more strategies to accelerate metric computation at runtime.

[0039] In some embodiments, the methods and systems described herein are validated using 77 architectural models of various styles. In some embodiments, the methods described herein generate occluders with a low face count of 260, while achieving an average precision of 99.4% and an average recall of 78.0% from all possible viewer positions (including distant, close-up, and walk-in views). Such results reflect an increase of 3.7% and 2.9% in precision and recall, respectively, compared to occluders generated by Simplygon, while using an average of 50 fewer faces. Results using Silvennoinen's method only had an average recall of 39.7%.

[0040] The relevant techniques of occlusion culling, mesh simplification and occluder generation are summarized as follows.

[0041] Occlusion Culling: For static scenes, the potentially visible set relative to a single viewpoint or viewpoint region can be precomputed and stored. For buildings with reachable interiors, cell-and-portals decompose the interior into rooms (cells) connected by doors or windows (portals). However, for complex scenes in large open worlds, precomputing and storing visibility data can be expensive. To avoid excessive precomputation and storage, a view-dependent subset of the input mesh can be kept as virtual occluders at runtime.

[0042] Mesh Simplification: Software rasterization can be used to render a coarse mesh (occluders) into a depth buffer, which is then used to cull hidden objects at a very early stage. Generating an approximate coarse mesh from a fine mesh can be achieved by collapsing edges that meet certain conditions or minimizing certain metrics such as Quadric Error Metrics (QEM). Other metrics, such as limiting surface visibility metrics, are added to the collapsing conditions for specific applications. Other techniques involve satisfying hard constraints during remeshing. For example, a progressive hull is introduced to ensure that all vertices are outside the input mesh, or a coarse mesh is generated while maintaining strict nesting. Unfortunately, these methods do not work well in the case of topological inconsistency. For example, the case of topological inconsistency may involve edges (or faces) in an open structure as described previously, where two connected faces may have opposite normal directions.

[0043] Occluder Generation: Assuming the topology is clean, conservative mesh simplification can be used to generate occluders for terrain patches in the game. If the topology can be kept consistent, existing mesh simplification methods can be used to generate occluders. For this purpose, voxelization can be used. For example, a set of planes within the voxelized input model are selected to form occluders with bounded occlusion errors. However, using a voxelized mesh as input may introduce large occlusion errors during voxelization. Furthermore, buildings with nested structures may be non-orientable and cannot be voxelized, while thin walls cannot be captured at an affordable resolution. In the game industry, collision meshes are used as starting meshes for simplification to avoid manually creating occluders for all buildings. However, collision meshes are usually larger than the input mesh, significantly violating conservatism.

[0044] Example Implementations

[0045] In some embodiments, an input building model (e.g., input model 200) is represented as a triangle / polygon soup, including hundreds of (possibly self-intersecting) disconnected parts, nested structures, and thin features. Due to the topological complexity, voxelization and conventional mesh simplification do not work well on their own. The methods and systems described herein recognize that some disconnected parts contain many large patches that are useful candidates for forming the final occluder mesh, while other large volumetric features can be well captured by voxelization. Therefore, the methods and systems described herein use voxelization to simplify the mesh. Figure 3D The following hybrid method is presented to form a large set of face candidates as the initial occluders M 遮挡物 (like Figure 3D As shown): Figure 3B The patch-based simplification shown and Figure 3C The outputs of the two mesh simplification strategies shown for voxelization-based simplification are combined. 遮挡物 Two evaluation metrics are formulated: precision P and recall R. 遮挡物 The metric-guided mesh simplification of is used to extract high-quality final occluders from initial occluders, such as Figure 3E Metric-guided mesh simplification terminates when a user-specified quality limit is reached. Figure 3A An input model 300 is shown. Figure 3B The result 302 of the patch-based simplification of the input model 300 is shown. Figure 3C The result 304 of the voxelization-based simplification of the input model 300 is shown. Figure 3D A combination 306 of the result 302 of the patch-based simplification and the result 304 of the voxelization-based simplification is shown. Figure 3E The final occluder 308 after metric-guided mesh simplification is shown.

[0046] Initial occluder generation

[0047] A two-way hybrid approach is used to form the initial face candidate set.

[0048] Patch-based mesh simplification

[0049] The first method performs one of the following steps to generate a coarse mesh:

[0050] 1. Planar face grouping: If the dihedral angle of a shared edge is less than a threshold, a pair of faces is grouped as a planar face. In some embodiments, the threshold is less than 1×10 -2 , less than 5×10 -3 , about 1×10 -3 In some embodiments, the threshold is 1×10 -3 .

[0051] 2. Surface patch grouping: If the dihedral angle of a shared edge is less than the user-specified threshold ε a , the planar patches generated in the previous step are grouped into curved patches. The user-specified threshold ε a Less than the threshold for grouping planar patches. Using planar patches may result in occluders with a smaller number of triangles, while using curved patches will capture more detail. Combining these two sets of patches results in a large candidate set from which the final occluder is selected. Figure 4A and Figure 4B An example is shown in . Figure 4A Planar patches 400 obtained using planar patch grouping of the input model 300 are shown. Figure 4B Surface patches obtained using the surface patch grouping of the input model 300 are shown.

[0052] 3. Simplification: In some embodiments, each surface patch is simplified using QEM-guided mesh simplification. Other methods, such as Variational Shape Approximation (VSA), may also be used. In some embodiments, the Ramer-Douglas-Peucker algorithm is used to simplify the boundaries of each 2D (Two Dimensional, 2D) projection patch of each planar patch in the planar patch. There are many simplification methods, and the main idea is to remove vertices that have little effect on the shape. After simplification, the boundary is re-triangulated into a triangular mesh using constrained Delaunay triangulation. Although other methods can be used, Delaunay triangulation is one of the most popular and useful methods.

[0053] 4. Hole filling: If there are holes in the triangle mesh in step 3, but M 输入If such holes are not included, the holes in the triangular mesh are filled. Depending on the number of edges in the hole, the hole is filled with multiple triangular faces.

[0054] 5. Reduction: The mesh simplification process then sorts all planar and curved patches according to their area and adds patches (or faces) to the final mesh until the number of faces reaches the user-specified number N. P In some embodiments, there is no preference for selecting curved patches over planar patches, and only the area of ​​the patch is used in the selection process.

[0055] Hole filling

[0056] In some embodiments, hole filling is a mesh repair technique. However, for architectural models, some holes correspond to architectural ornaments such as windows and doors, which must remain open for the sake of occlusion conservation.

[0057] Figure 5 A verification process of checking whether a hole corresponds to a decorative object is shown. Figure 5 An input grid 500 (eg, M 输入 ). The verification process begins by triangulating the hole into faces. A hole defined by boundary edges does not have any faces itself. Only when the hole is filled will there be faces associated with the hole (e.g., for filling the hole). For example, Figure 5 A planar patch 504 with a hole 506 is shown extracted from the input mesh 500. Inside each face, along its normal direction, a pair of holes 506 with length l is created. s A set of test line segments are uniformly sampled. For example, Figure 5 A test line segment 508 is shown placed within the hole 506 of the planar patch 504. 输入 If a segment intersects, then M 输入 There are hollow structures in M ​​and keep the holes open. If all segments hit the input grid, then 输入 There are no openings in the mesh and the holes can be safely filled. After the holes are filled, the method and system perform mesh simplification on the patch to further reduce the number of faces. For example, Figure 5 The output mesh 510 after hole filling and remeshing is shown.

[0058] Voxelization-based mesh simplification

[0059] The second method for generating candidate faces based on voxelized mesh simplification includes one or more of the following steps:

[0060] 1. Voxelization: Input model M 输入 Voxelize into voxels, each with an edge length of l / 64, where l is the length of M 输入The diagonal length of the bounding box of the . 3D winding number is calculated for each voxel, and an isosurface mesh is extracted (e.g., using the marching cubes algorithm), and an isosurface mesh corresponding to a specific winding number (e.g., 0.5, 1, 1.5) is extracted. In some embodiments, a lower winding number means that the voxel mesh is larger than the input mesh, which may result in a higher R but a lower P.

[0061] 2. Regridding: Simplify the isosurface obtained from step (1) into a coarse mesh M 粗 For example, a QEM-guided approach is used to perform the simplification. Other methods such as variational shape approximation (VSA) can also be used for simplification.

[0062] 3. Conservative enhancement: The simplified mesh M obtained from step (2) 粗 Project back onto the isosurface in step (1) to enhance conservatism.

[0063] Conservative Enhancement

[0064] The QEM-based simplification may not be conservative, resulting in a coarse grid M 粗 With the input grid M 输入 Such a coarse mesh may occlude objects that should actually be visible, causing false negatives. An optimization algorithm is used to remove protruding parts (e.g., parts that extend beyond the input mesh M). 输入 part) is pushed back to the input grid M 输入 middle.

[0065] Before solving the following optimization equation, the optimization algorithm calculates the signed distance field φ, which represents M 粗 Signed distance to isosurface - start:

[0066]

[0067] Among them, x is related to M 粗 The vector corresponding to the vertex position, and p is M 粗 Any point on .

[0068] M 粗 Each edge in is defined as the spring energy

[0069] where p0 and p1 are the edge endpoints, and r is the edge length before conservative enhancement.

[0070] In some embodiments, M 粗 is a triangular mesh or a polygonal mesh. To express the unilateral constraint in the above optimization problem, the method and system described in this article detect M 粗 Contact (or collision) with the signed distance field φ. If M 粗If any point on the surface of has a sign value greater than 0, a collision occurs. The methods and systems described herein check whether a collision occurs at each step during optimization. When a collision occurs, the following soft SDF penalty energy is added to the objective function:

[0071]

[0072] To replace the hard constraints in Equation 1. Taking the above into account, the optimization is reformulated into the following unconstrained form:

[0073]

[0074] In some embodiments, this method is essentially a penalty method for handling hard constraints with automatic parameter adjustment. Although no weights are introduced for ESDF, if the same consecutive collisions occur repeatedly, more ESDF terms will be added, essentially increasing their weights. 粗 There are usually less than 100 vertices, so in some embodiments, a Quasi-Newton method is used to solve the optimization. Newton's method is another method for solving the optimization.

[0075] Figure 6 An example of voxel-based mesh simplification is shown. An input model 600 is provided, from which isosurfaces 602 are obtained. Isosurfaces 620 are simplified to a simplified mesh 606. Some portions of simplified mesh 606 are non-conservative (e.g., extend beyond the volume of input model 600). Final mesh 608 is made more conservative by pushing faces back into final mesh 608. Figure 6 With the sharp corners highlighted in face 610, the methods and systems described herein push a coarse mesh into the building to increase accuracy.

[0076] Occlusion Evaluation

[0077] Input model M 输入 The obstruction M 遮挡物 The two metrics precision P and recall R are used to evaluate the quality of occluders and guide the further mesh simplification process.

[0078] Fig. 7A The following evaluation scheme is shown, in which both the occluder and the structure (e.g., building 700) are placed at the origin 701, and the viewer (represented by viewpoint 702) is positioned outside the structure and facing the origin. The evaluation method described herein, such as Figure 7B As shown, a player is allowed to walk through a structure (e.g., a building 704 having interior walls, caves, tunnels, and buildings), and camera perspectives from the interior 708 and recessed areas of such a structure are taken into account. For example, Figure 7BSampling on the 3D space is shown, including point 706. At each point including point 706, all camera views (e.g., four directions: up, down, left, right), including interior and recessed areas, are evaluated. Therefore, the evaluation method includes calculating precision P and recall R on the 3D evaluation space. The player can view the environment space in all directions at any accessible location on the 3D space. The evaluation domain is defined as B′=(1+ε 填充 )BM 输入 .

[0079] B' is M 输入 The enlarged volume B of the bounding box (enlarged by (1+ε 填充 )) and M 输入 The overall precision P and recall R are given as follows:

[0080] and

[0081] The above integral can be numerically approximated by uniformly partitioning B' into blocks with a spacing of Δx. 输入 All volumes outside are marked as valid. Overall accuracy and recall is calculated as follows:

[0082]

[0083]

[0084] Where N is the number of valid blocks, and ΔV = Δx 3 is the block volume.

[0085] P x and R x represents the precision and recall at the block center x.

[0086] To calculate P at a fixed camera position (e.g., block center x) x and R x , the full viewing direction space is discretized into 6 cones along the ±X, Y, and Z axes, each with a 90° viewing angle. The block center is the location where the fixed camera device is positioned during evaluation.

[0087] In some embodiments, by comparing 遮挡物 and M 输入 The 2D area occluded by each of the frustums is used to reduce the occlusion calculation from 3D space to 2D screen space. Monte Carlo sampling is used for each frustum pair P x and R x Make an approximation.

[0088] For a randomly sampled, axis-aligned quadrilateral N rasterized as an occluder in the evaluation space (e.g., 2D screen space, a 2D plane in 3D virtual space) 四边形 There are three possibilities for each of :

[0089] (1) True affirmation: The quadrilateral is M 遮挡物 and M 输入 The number of pixels in such a quadrilateral is denoted as N t ;

[0090] (2) False positive: The quadrilateral is M 输入 Completely covered, but not by M 遮挡物 Coverage. The number of pixels in such a quadrilateral is denoted as P f ;

[0091] (3) False Negation: The quadrilateral is M 遮挡物 Fully covered, but some pixels are not covered by M 输入 Covered. The quadrilateral is not covered by M 输入 The number of pixels covered is denoted as N f .

[0092] Discretized P x and R x is calculated as follows:

[0093]

[0094] Here, the summation is performed in all six directions ±X, Y, Z.

[0095] Metric-guided occluder simplification

[0096] The results from the patch-based simplification method (e.g., result 302) and the results from the voxel-based simplification method (e.g., result 304) are combined to generate a high-quality face candidate set (e.g., combination 306). The final step includes using a metric-guided face reduction algorithm to select a subset of faces to form the final occluder while maintaining their occlusion quality. A naive approach to this goal greedily removes the faces that produce the smallest reduction in recall ΔR. However, in some embodiments, this will be computationally too expensive. For a combined mesh M with m faces 组合 (e.g., combination 306), when n view position samples are used to calculate the recall rate, Visual evaluation to remove k faces. Alternatively, the methods and systems described herein perform the following steps in the simplification algorithm: check all faces, and if face f is removed i This will cause the accuracy to change P(M)-P(Mf i )>ε P , then from M组合 Remove f i Since removing a face from an occluder does not increase P(Mf i ), so when discarding f i P is not updated afterwards. The next step is to check all remaining faces again. If removing fi will result in ΔR < ε R , then from M 组合 Remove f i And R is updated. Since removing a face may increase the contribution of other faces to the recall, R is updated during each iteration.

[0097] The strategies of (1) reducing neighboring views and (2) skipping unnecessary evaluations further accelerate metric-guided occlusion simplification.

[0098] Sampling perspective reduction:

[0099] When two views are close to each other, the difference between the occlusion results of the two views will be small. Therefore, in some embodiments, the number of view samples is reduced by merging adjacent views.

[0100] For example, in some embodiments, the method includes evenly dividing the domain B into N equal-sized blocks (single-sized blocks 800), such as Fig. 8A In other words, the empty space is discretized into many blocks 800 of a single size. Figure 8B As shown, the method replaces 2×2×2 adjacent blocks with larger blocks (e.g., larger block 802 and largest block 804) in a manner similar to an octree until no further merging can be performed. At each block, there are six viewing directions along ±X, Y, and Z. If the center of any of the blocks is inside the building, no merging occurs. Equation 5 is re-expressed as

[0101]

[0102] Where, ΔV i and x i are the block volume and center position of the i-th sample respectively.

[0103] Sample Skip:

[0104] When a structure (e.g., a building) is outside the viewing frustum of the viewing position, N t , P f and N f Therefore, before simplification, in some embodiments, one or more views (eg, most views, all views) are tested, and if the view does not see the structure at all, it is marked as skipped. Figure 8CViews marked as skipped (eg, view 806) are shown in grey because the building cannot be seen from the grey view direction.

[0105] In some embodiments, when surface 808 is removed, as Fig.8D As shown in , the metric values ​​measured from a viewpoint where the face cannot be seen will not be changed. Therefore, the evaluation domain is divided into two parts by the orientation of the face. Fig.8D Those viewing angle positions 810 shown being on the positive side of the face 808 (eg, the positive side of the face normal) update the metric values.

[0106] Example Implementation

[0107] In some embodiments, the methods and systems are implemented in C++ with CGAL (Computational Geometry Algorithms Library, CGAL) and libigl. To evaluate occluders and calculate metrics, fast parallel software rasterization on the CPU in Unreal Engine 4 is used. Specifically, the input model and occluders are rasterized into a depth buffer. Then, many quadrilaterals are randomly generated on the depth buffer, and the precision and recall are calculated using Equation 6. In order to avoid too many empty pixels in the depth buffer, the minimum length of the bounding box of the input model is used as ε 填充 In some embodiments, the method is implemented on a computer having an AMD Ryzen Threadripper 3970X32 core processor @ 3.69 GHz and 256 GB RAM (Random Access Memory, RAM).

[0108] Ablation studies

[0109] Measure discretization accuracy:

[0110] In some embodiments, the number of screen quadrilaterals N 四边形 Can affect the accuracy of approximate metric calculations. Using the example building model ( Figure 2A The metrics were calculated using 100, 1,000, 5,000, 10,000, 20,000, 30,000, and 100,000 quads per view, respectively, using the actual screen size of the software rasterization in the mobile game (e.g., 256×256). For each number of quads, the metrics were calculated ten times using a different set of quads randomly selected. Fig.9A The standard deviations of the ten measures are shown. Graph 902 shows the standard deviation of the recall for different numbers of quadrilaterals per view. Fig.9AThe other graph in shows the standard deviation of the accuracy. Throughout the rest of the experiments, 5,000 quads per view angle were used to balance computational cost and accuracy.

[0111] Sampling distance:

[0112] The viewing angle sampling distance Δx can affect the accuracy of the metric approximation. Halving the sampling distance increases the computational cost by a factor of 8. 输入 Experiments were performed with 8%, 4%, 2%, 1% and 0.5% of the maximum diagonal length of the bounding box of . Similarly, the metric was calculated ten times at each sampling distance. Fig. 9B The standard deviation of both recall and precision is shown. Fig. 9B A graph 904 is shown showing the standard deviation of the recall rate at different sampling distances. Since the standard deviations of the recall rates at 4% and 2% are very close, they are 1.9×10 -3 and 1.8×10 -3 , so throughout the rest of the experiments, 4% was used as the sampling distance.

[0113] Sample reduction:

[0114] Sample reduction and / or sample skipping can speed up metric computation, which in turn speeds up metric-guided mesh simplification. By testing all 77 models, the results show that the total number of evaluation tests is reduced to 16.3% of the number of tests without using any evaluation acceleration techniques. After skipping sample views where the model cannot be seen and / or faces have just been removed, the ratio is further reduced to 13.1% and 5.9%. Although there is no significant difference between the reduction results with / without sample reduction, there are fluctuations of 0.5% and 0.2% in precision and recall, respectively, and sample reduction can save 83.7% of samples on average. Overall, by using sample reduction, the computation time can be accelerated by 5.56 times. Sample skipping does not affect the accuracy of the evaluation results.

[0115] experiment

[0116] The methods and systems described in this paper are evaluated using a dataset of 77 building models used in games such as Fig.10 Each building has hundreds of parts and thousands of intersecting triangle pairs, which makes processing using conventional mesh simplification methods extremely difficult, if not impossible. 5000 randomly generated quads are rasterized on the depth buffer to collect information for calculating precision and recall to evaluate the generated occluders. s = 1% is set to M 输入 The maximum diagonal length of the bounding box. sThe lines are also defined above as test line segments for the "hole filling" process. All hyperparameters are listed in Table 1. Hyperparameters refer to parameters that were usually manually adjusted by technical artists who designed video game graphics based on their experience before the methods and systems were described herein. No theoretical explanation is given for why the parameters should carry specific values. parameter value <![CDATA[ε a ]]> π / 3 <![CDATA[N P 600]]> 600 <![CDATA[ε P ]]> <![CDATA[1×10 -3 ]]> <![CDATA[ε R ]]> <![CDATA[1×10 -3 ]]>

[0117] Table 1. Hyperparameters.

[0118] On average, the occluders generated using the methods and systems described herein have 260 faces with a recall of 78.0% and a precision of 99.4%, as shown in Figure 2. Fig.11 And as shown in Table 2. Fig.12 Also shown are 10 example buildings and corresponding occluders generated by Simplygon and the methods and systems described herein.

[0119] Conservative enhancement: Fig.11 It shows that conservative enhancement can increase the accuracy from 94.6% ( Fig.11 (a)) increased to 95.7% ( Fig.11 (b)). However, as precision increases, recall decreases, which is understandable. When a given coarse mesh is made completely inside the input mesh, there are areas where the coarse mesh is not filled. In some embodiments, since false rejections lead to severe visual artifacts, higher precision is preferred even at the expense of recall. Because isosurface generation is based on the number of convolutions of the interior-exterior segments, the precision of the voxel-based result may be lower than that of the patch-based solution, which may lead to precision errors.

[0120] Combine patch / voxel based results: Fig.11 shows the use of a patch-based Fig.11 (a)) and voxel-based ( Fig.11 (c)) as the face candidate set, the generated occluders have a recall rate of 41.2% and 78.4% and the number of faces of 500 and 53 respectively.

[0121] Fig.11 The combined candidate set in (d) yields a significantly higher recall of 86.0%. FIG. 3A to FIG. 3E An example of combining patch-based and voxel-based results can be found in .

[0122] Timing: Across 77 test building models, the method and system described herein took an average of 155 seconds (Table 2), while patch-based mesh simplification and voxel-based mesh simplification took 5 seconds and 24 seconds, respectively. Further reduction of the number of faces from 553 to 260 took 126 seconds through metric-guided mesh simplification.

[0123] Table 2. Average number of faces and calculations on 77 test buildings using the described method, Simplygon and planar occluders. *For single-sided rendering, the number needs to be doubled.

[0124] Comparison with Simplygon Using the visibility-driven mesh simplification pipeline in Simplygon, the target triangle count was set to 300 - a common number of occluder faces in mobile games. Simplygon preserved silhouettes at a fairly fast speed (3 seconds per model), with a recall of 74.3%, which is 3.7% lower than the recall obtained using the methods and systems described in this article. However, Simplygon failed to remain conservative (96.2% precision vs. 99.4% precision obtained using the methods and systems described in this article). More importantly, the standard deviation of the precision obtained using the methods and systems described in this article is only 0.6%, while the standard deviation of Simplygon is 4.3%, indicating that the methods and systems described in this article have more stable performance. Lower precision is more disadvantageous than lower recall. In the case of low recall, the system must render more hidden objects, which will hinder rendering effectiveness. However, as Figure 1B and Figure 1C As shown, low precision may cause objects to be incorrectly culled even though they are visible to the player. Fig.12 For the first model in , even when the occluders generated by Simplygon can capture the overall input shape, its recall is only 66.9% due to the small cracks between the disconnected walls, which significantly weakens its occlusion ability.

[0125] Comparison with planar occluders: To compare with planar occluders, the input mesh is first voxelized to generate isosurfaces. The Silvennoinen method assumes that the building model is viewed from a distance and generates only one plane for each viewing direction. After selecting a set of planes, Silvennoinen's method greedily removes the triangle with the smallest area instead of minimizing the loss of recall. The methods and systems described in this article are optimized by evaluating occlusion whenever a face is discarded to reduce faces more accurately. Even with such optimization, the output planar occluders can only achieve an average recall of 39.7% and a precision of 92.3%. One reason is that the test model contains thin walls and nested structures that are difficult to voxelize correctly. Therefore, the output isosurface only captures a small part of the input mesh with a large precision error, which can also be observed in the voxel-based results (only 41.2% recall). Regarding computation time, Silvennoinen's method takes 267 seconds per model, which is slower than the methods and systems described herein, and Silvennoinen's occlusion metric is only half of the occlusion metric obtained using the methods and systems described herein. Silvennoinen's method also assumes double-sided rendering. For culling methods using single-sided rendering, the number of faces of the occluders must be doubled. For a proper comparison, Silvennoinen's target output face count was set to 150 and doubled during runtime because the game engine (based on Unreal Engine 4) used in some embodiments of the methods and systems described herein uses single-sided rendering.

[0126] The method and system described in this paper combine patch-based and voxel-based surface generation techniques. Based on a new evaluation metric, the best subset of surfaces is selected to form occluders. Two evaluation metrics are also introduced in the 3D domain to measure the quality of the occluders, and several strategies to speed up the evaluation process are also described. Testing of the method and system described in this paper using 77 building models in Unreal Engine 4 highlights the ability of the method to generate occluders with high precision and recall.

[0127] The methods and systems described herein are not limited to inputs that are manifold and watertight. Problem-specific techniques using heuristics involving hyperparameters are another approach. The methods and systems described herein are not limited to utilizing only patch-based and voxel-based mesh simplification tools, and results from additional different mesh simplification techniques can be fused to improve the quality of the face candidate set. In addition, metric-guided occluder simplification can include additional operations such as edge collapsing and vertex removal, (although at the cost of higher computational burden), rather than using only face reduction.

[0128] In some embodiments, a seam closure is used. Fig.13As shown in , once small and narrow patches are removed from the input mesh, seams may appear, which may greatly reduce the accuracy. In order to close these seams, the boundaries of all patches are first split into multiple straight line segments. Assume that there are i and l j and direction d i and d j If two segments from different patches are parallel and have similar lengths And the normal n of the corresponding patch i With n j The angle between the two is within the user-specified range , then the two segments will be marked as candidate pairs for closure.

[0129] Seam closure is performed by adding a quadrilateral Q formed by the four vertices of the two segments. Note that a candidate will be considered a true seam only if the gap between the pair is closed in the input mesh, typically via some intersecting narrow patches such as pillars or fillets. To prevent incorrect seam closure, a polygon Q with length l is uniformly sampled inside Q along its normal direction. s (For example, s Between 50mm and 200mm, l s Multiple test line segments (100 mm) Fig.13 (c)). As long as there is a segment that does not match M 输入 Intersection means that in M 输入 There may be hollow structures in Q, and Q will be discarded.

[0130] Fig.13 (a) shows the input mesh with two walls and one column. Fig.13 (b) shows the paired segments after patch removal. Fig.13 (c) shows line segments uniformly placed inside the quadrilateral formed by the segment pairs. Fig.13 (d) shows the mesh after the seams are closed.

[0131] A heterogeneous building is a building that is only partially accessible. In some embodiments, the lower portion of a heterogeneous building has an interior structure and can be walked into by a player, while the upper portion is a large enclosed structure that can only be viewed from the outside. In some embodiments, such a heterogeneous building structure can be processed by first splitting the building vertically into two parts, applying a coarse mesh generation (e.g., patch-based simplification) only to the lower portion, and applying mesh simplification with conservative enhancement to the upper portion, and then combining the two results into a final coarse mesh.

[0132] In some embodiments, a heterogeneous building has multiple large horizontal planes (usually floors and ceilings) facing downward, and the building can be split into two parts. The splitting plane is selected from these candidates. For a candidate plane P, the splitting plane is selected by using P +η and P -η Slice the building to compare the generated 2D segment soup, where P +η and P -η is parallel to P and has a vertical offset of ±η (e.g., in some embodiments, η≈1×10 -3 ) planes. If there is a significant area difference between the two segments, such as the ratio of their areas ε a is greater than a threshold (e.g., ε a =10), then the candidate plane is selected as the final segmentation plane. In some embodiments, the plane having the largest difference between the first area and the second area is selected as the final segmentation plane.

[0133] Given a 2D segment soup, its area is computed by first obtaining a closed 2D triangle mesh, which can be computed using TriWild, and then simply summing the areas of all triangles. Fig.14A and Fig. 14B Examples of several candidate segmentation planes and their corresponding slice regions of a heterogeneous building model according to some implementations of the present application are shown. Fig.14A An input building and five potentially transparent segmentation planes are shown. Potentially transparent segmentation planes are candidate planes for segmenting the building into two or more parts. Fig. 14B The upper and lower slices for each splitting plane are shown. The 2D intersection segments and internal triangles are shown. In some embodiments, the method will select splitting plane (4) because the area of ​​the lower slice is significantly smaller than the upper slice.

[0134] Fig.15 Depicted is a process performed by a computing system for automatically generating occluders for a visual three-dimensional structure in accordance with some implementations of the present application.

[0135] First, a computing system receives (1510) an input model of a visual three-dimensional structure, the input model comprising a plurality of faces. Next, the computing system generates (1520) an initial occluder by simplifying the input model into a plurality of candidate patches in a patch-based coarse mesh. In some embodiments, the visual three-dimensional structure corresponds to a visual structure in a video game. In some embodiments, the computing system automatically generates the occluder before a user initializes the video game to play the game. In some embodiments, the computing system automatically generates the occluder during a production phase of the video game. In some embodiments, after the user initializes the video game, the video game displays structures and images that are not blocked by the occluder. In some embodiments, the visual three-dimensional structure is mapped with texture and color before being displayed (e.g., during the production phase of the video game, before the user initializes the video game). In some embodiments, the coarse mesh is an approximate mesh generated from a fine rendering mesh (e.g., input mesh, visual mesh). In some embodiments, the coarse mesh has not undergone refinement (e.g., no metric-based simplification, conservativeness has not been checked). The initial occluder blocks objects behind the visual three-dimensional structure along a first viewing direction. In some embodiments, when occluders are automatically generated during a production phase of a video game, graphics associated with the visual three-dimensional structure are not rendered. The computing system compares (1530) a first two-dimensional area occluded by an input model of the visual three-dimensional structure and a second two-dimensional area occluded by an initial occluder along a first viewing direction to determine a first quality metric based on a first number of pixels blocked by the input model and also blocked by the initial occluder. The computing system removes (1540) a plurality of faces from the initial occluder while maintaining the first quality metric above a first threshold to form an occluder for the visual three-dimensional structure. The occluder blocks objects behind the visual three-dimensional structure from being rendered in the application along the first viewing direction. In some embodiments, the automatically generated occluder is the final occluder being used in the video game application (e.g., the video game application does not use the initial occluder at runtime).

[0136] In some implementations, the computing system voxelizes (1550) the input model to obtain a plurality of voxels for generating a voxelized coarse mesh, and combines (1560) the patch-based coarse mesh and the voxelized coarse mesh to form an initial occluder. In some implementations, the computing system determines (1570) a second quality metric based on a second number of pixels blocked by both the initial occluder and the input model. Reducing the input model to a plurality of candidate patches includes merging a first number of faces from the plurality of faces into a plurality of candidate patches that meet a threshold of the first quality metric or the second quality metric. In some implementations, the computing system merges (1580) the first number of faces into a plurality of candidate patches including combining faces within a first degree of coplanarity into candidate planar patches from the plurality of candidate patches.

[0137] In some implementations, the computing system generates (1590) a voxelization-based coarse grid including: voxelizing a bounding box of an input model to obtain a plurality of voxels; calculating a winding number for each voxel in the plurality of voxels; extracting an isosurface based on the winding number; and simplifying the isosurface to obtain the voxelization-based coarse grid.

[0138] Although specific implementations are described above, it will be understood that the present invention is not intended to be limited to these specific implementations. On the contrary, the present invention includes alternatives, modifications, and equivalents within the spirit and scope of the appended claims. In order to provide a thorough understanding of the subject matter presented herein, many specific details are set forth. However, it will be apparent to one of ordinary skill in the art that this subject matter can be practiced without these specific details. In other instances, well-known methods, processes, components, and circuits are not described in detail to avoid unnecessarily obscuring various aspects of this implementation.

[0139] Although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, without departing from the scope of the present application, the first sorting criterion may be referred to as the second sorting criterion, and similarly, the second sorting criterion may also be referred to as the first sorting criterion. Both the first sorting criterion and the second sorting criterion are sorting criteria, but they are not the same sorting criteria.

[0140] The terms used in the description of the invention herein are for the purpose of describing specific implementations only, and are not intended to limit the present invention. As used in the description of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are also intended to include plural forms. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items in the associated listed items. It will also be understood that when the terms are used in this specification to include "(include)", "comprise (comprise)" and / or "comprising (comprising)", it specifies the presence of the features, operations, elements and / or parts, but does not exclude the presence or addition of one or more other features, operations, elements, parts and / or their groups.

[0141] As used herein, the term "if" may be interpreted as meaning "when" or "after" or "in response to determining that" or "in accordance with determining that" or "in response to detecting that" the precondition is true, depending on the context. Similarly, the phrase "if it is determined that [the precondition is true]" or "if [the precondition is true]" or "when [the precondition is true]" may be interpreted as meaning "after determining that the precondition is true" or "in response to determining that the precondition is true" or "in accordance with determining that the precondition is true" "after detecting that the precondition is true" or "in response to detecting that the precondition is true", depending on the context.

[0142] Although some of the various figures show a number of logical stages in a particular order, stages that are not order dependent may be reordered, and other stages may be combined or decomposed. Although some reorderings or other groupings are specifically mentioned, other reorderings or groupings will be apparent to one of ordinary skill in the art, and therefore no exhaustive list of alternatives is presented. Furthermore, it should be appreciated that the stages may be implemented in hardware, firmware, software, or any combination thereof.

[0143] For the purpose of illustration, the foregoing description has been described with reference to a specific implementation. However, the above illustrative discussion is not intended to be exhaustive or to limit the invention to the precise form disclosed. In accordance with the above teachings, many modifications and variations are possible. Implementations are selected and described to best illustrate the principles of the invention and its practical application, so that other technical personnel in the art can best utilize the invention and various implementations with various modifications suitable for the intended specific use. Implementations include alternatives, modifications and equivalents within the spirit and scope of the appended claims. In order to provide a thorough understanding of the subject matter presented herein, many specific details are set forth. However, it will be apparent to those of ordinary skill in the art that this subject matter can be practiced without these specific details. In other instances, well-known methods, processes, components and circuits are not described in detail to avoid unnecessarily obscuring the various aspects of this implementation.

Claims

1. A method for automatically generating occluders for a visual three-dimensional structure, the method comprising: receiving an input model of the visual three-dimensional structure, the input model comprising a plurality of faces; Generating an initial occluder by simplifying the input model into a plurality of candidate patches in a patch-based coarse grid, wherein the initial occluder blocks an object behind the three-dimensional structure along a first viewing direction; comparing a first two-dimensional area occluded by the input model of the visual three-dimensional structure with a second two-dimensional area occluded by the initial occluder along the first viewing direction to determine a first quality metric based on a first number of pixels blocked by the input model and also blocked by the initial occluder; and While maintaining the first quality metric above a first threshold, a plurality of faces are removed from the initial occluder to form the occluder for the visual three-dimensional structure, wherein the occluder blocks objects behind the visual three-dimensional structure from being rendered in an application along the first viewing direction.

2. The method according to claim 1, further comprising: voxelize the input model to obtain a plurality of voxels for generating a voxelized coarse grid; as well as The patch-based coarse grid is combined with the voxelized-based coarse grid to form the initial occluder.

3. The method according to claim 2, further comprising: A second quality metric is determined based on a second number of pixels blocked by both the initial occluder and the input model, wherein reducing the input model to the plurality of candidate patches comprises merging a first number of the plurality of patches into the plurality of candidate patches, the plurality of candidate patches satisfying a threshold of the first quality metric or the second quality metric.

4. The method according to claim 3, wherein: Merging the first number of faces into the plurality of candidate face patches includes combining faces within a first degree of coplanarity into candidate planar face patches in the plurality of candidate face patches.

5. The method according to claim 4, further comprising: According to the determination that the shared edge of two candidate planar patches is less than a threshold: the two candidate planar patches are grouped into a curved patch.

6. The method according to claim 3, wherein: The first quality metric or the second quality metric is a user specific value.

7. The method according to claim 2, wherein: Generating a voxelized coarse grid involves: voxelize the bounding box of the input model to obtain the plurality of voxels; calculating a convolution number for each voxel in the plurality of voxels; Extracting an isosurface based on the winding number; and The isosurface is simplified to obtain the voxelization-based coarse grid.

8. The method according to claim 7, wherein: Extracting the isosurface includes using a marching cubes algorithm; and simplifying the isosurface includes using a quadratic error method (QEM) guided approach to generate a simplified mesh. 9 . The method of claim 8 , further comprising performing conservative enhancement on the simplified mesh to constrain the simplified mesh to be within the input model.

10. The method according to claim 9, wherein: Execution of conservative enhancements includes: determining a signed distance field based on the isosurface; defining each edge in the simplified mesh according to a spring energy; and Penalty energy is added when the simplified mesh extends beyond the input model.

11. The method according to claim 1, wherein: Removing the plurality of faces includes: Discretizing the space around and inside the input model into a plurality of blocks of equal size, each of the blocks of equal size having a plurality of viewing directions; merging a portion of the plurality of equal-sized blocks into a plurality of larger blocks; and Removing a viewing direction from a corresponding one of the plurality of larger blocks for which the input model is outside a viewing frustum of the viewing direction.

12. The method according to claim 11, wherein: The plurality of viewing directions include six viewing directions along ±X, Y, and Z at each of the plurality of larger blocks and at each of the plurality of equal-sized blocks.

13. The method of claim 1, further comprising hole filling the patch-based coarse mesh.

14. The method according to claim 13, wherein: Holes are filled when test segments oriented perpendicular to quadrilaterals covering gaps in the patch-based coarse mesh intersect the input model.

15. The method according to claim 14, wherein: The visual three-dimensional structure includes a building, and windows of the building are not filled in the obstruction.

16. The method according to claim 1, wherein: The visual three-dimensional structure includes a building having non-manifold, non-watertight and / or self-intersecting features, and wherein the building includes an internal structure defining a viewing direction therein.

17. The method according to claim 16, further comprising: A plane is determined for dividing the building into a first portion and a second portion, wherein the second portion includes the interior structure.

18. The method according to claim 17, wherein: Determining the plane includes: Determine for a corresponding one of the multiple candidate planes: a first region of the building captured by an upper slice offset from the corresponding one of the plurality of candidate planes; a second region of the building captured by a lower slice offset from the corresponding one of the plurality of candidate planes; and A plane having a maximum difference between the first region and the second region is selected from the plurality of candidate planes.

19. The method according to claim 1, wherein: The input model is represented as a mesh comprising a polygon soup, and the mesh includes hundreds of disconnected components and nested structures.

20. The method according to claim 1, wherein: The number of faces in the occluder is less than 10% of the number of faces in the plurality of faces of the input model.

21. A computer device comprising one or more processors and a memory storing a program, which, when executed by the one or more processors, causes the computer device to perform the method for automatically generating occluders for visual three-dimensional structures according to claims 1 to 20.

22. A non-transitory computer-readable storage medium storing a program in combination with a computer device comprising one or more processors, wherein: When the program is executed by the one or more processors, the computer device executes the method for automatically generating occluders for a visual three-dimensional structure according to claims 1 to 20.