A model processing method and system of a three-dimensional model

By employing implicit model processing methods, a hierarchical bounding volume of a 3D model is constructed using Morton codes and locally ordered clustering to generate the distance field of the sampled point cloud. This solves the problem of low efficiency in 3D model processing in existing technologies and achieves high-precision and high-efficiency model processing.

CN120689497BActive Publication Date: 2026-03-17TECH & ENG CENT FOR SPACE UTILIZATION CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies suffer from high algorithm complexity, low processing efficiency, and poor application flexibility when processing 3D models, especially when processing high-precision mesh models, which involve high computational performance, high cost, and large memory consumption.

Method used

An implicit model-based processing method is adopted. By sorting and encoding polygon patches using Morton code, a model hierarchical bounding volume is constructed to generate the unsigned distance field of the sampled point cloud. The signed distance field is determined by combining the inner and outer decision algorithms, and finally the target 3D model is generated.

Benefits of technology

It improves the processing accuracy and efficiency of 3D models, reduces memory usage, and enhances processing flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689497B_ABST
    Figure CN120689497B_ABST
Patent Text Reader

Abstract

The application provides a model processing method and system of a three-dimensional model. The method first determines a plurality of encoded polygon patches by sorting and encoding a plurality of polygon patches through a Morton code method based on bounding box information of a first model extracted. Then, a model hierarchical bounding volume is constructed through a locally ordered clustering method based on the plurality of encoded polygon patches. Next, an unsigned distance field of a sampling point cloud is determined based on the bounding box information and the model hierarchical bounding volume. Further, the first sampling point is detected inside and outside through an inside-outside determination algorithm according to patch information, and a signed distance field of the sampling point cloud is determined in combination with the unsigned distance field. Finally, a target three-dimensional model is generated according to the signed distance field of the sampling point cloud. The method adopts an implicit model-based model processing method, and has beneficial effects of high modeling accuracy and efficiency, low memory occupation, and high processing flexibility. In this way, the accuracy and efficiency of model processing of the three-dimensional model can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of 3D modeling technology, specifically to a method and system for processing 3D models. Background Technology

[0002] Model processing of 3D models is a core component of computer-aided design tools, encompassing various techniques such as offsetting, Boolean operations, shelling, deformation, simplification, smoothing, and reconstruction. Model processing enables 3D models to meet the demands of complex applications. However, current model processing methods typically target explicit models, which primarily employ boundary representations (e.g., STEP, IGS) and mesh representations (STL, OBJ). This representation, combining discrete elements, significantly increases the complexity of 3D models, leading to substantial increases in processing time and cost.

[0003] Taking a 3D model represented by a mesh (hereinafter referred to as a mesh model) as an example, mesh models, due to their use of discrete patches to fit complex surfaces, struggle to achieve a balance between model accuracy and data volume. For high-precision mesh models with complex surfaces, the number of meshes is enormous, requiring calculations on a large number of meshes during geometric modeling. This not only demands high computational performance but also results in long computation times, high costs, and large memory consumption.

[0004] It is evident that the existing model processing methods suffer from problems such as high algorithm complexity, low processing efficiency, and poor application flexibility, resulting in low accuracy and efficiency in processing 3D models. Summary of the Invention

[0005] The technical problem to be solved by this invention is the inability to quickly and accurately process three-dimensional models.

[0006] To address the aforementioned technical problems, this invention provides a method and system for processing three-dimensional models, specifically employing the following technical solution:

[0007] In a first aspect, the present invention provides a model processing method for a three-dimensional model, specifically comprising: First, extracting bounding box information and patch information of a first model. The first model is a mesh model composed of multiple polygonal patches, and the patch information is used to characterize the structure and properties of the polygonal patches. Then, based on the patch information, the multiple polygonal patches are sorted and encoded using the Morton code method to determine multiple coded polygonal patches. Second, based on the multiple coded polygonal patches, a model hierarchical bounding volume is constructed using a local ordered clustering method. The model hierarchical bounding volume includes: multiple child nodes and a root node, where each child node corresponds to at least one coded polygonal patch, and the root node corresponds to the multiple coded polygonal patches constituting the first model. Next, based on the bounding box information and the sampling resolution of the first point cloud, a sampling point cloud is generated, which includes multiple first sampling points. Based on the bounding box information and the model hierarchical bounding volume, an unsigned distance field of the sampling point cloud is determined, where the unsigned distance field characterizes the shortest distance from the first sampling point to the surface of the first model. Then, based on the patch information, an inside / outside detection algorithm is used to detect the inside / outside of the first sampling points, and the signed distance field of the sampling point cloud is determined in conjunction with the unsigned distance field. The symbolic distance field is used to characterize the shortest distance and positional relationship from the first sampling point to the surface of the first model. Finally, a target 3D model is generated based on the symbolic distance field of the sampling point cloud. The target 3D model includes voxel information, and the voxel information includes the symbolic distance field.

[0008] This method first sorts and encodes multiple polygonal patches using Morton coding based on the bounding box information of the extracted first model, determining multiple coded polygonal patches. Then, based on these coded polygonal patches, a hierarchical bounding volume is constructed using a local ordered clustering method. Next, the unsigned distance field of the sampled point cloud is determined based on the bounding box information and the hierarchical bounding volume. Further, based on the patch information, an inside / outside detection algorithm is used to perform inside / outside detection on the first sampling points, and the signed distance field of the sampled point cloud is determined by combining this with the unsigned distance field. Finally, the target 3D model is generated based on the signed distance field of the sampled point cloud. This method employs an implicit model-based model processing approach, offering advantages such as high modeling accuracy and efficiency, low memory consumption, and high processing flexibility. This effectively improves the accuracy and efficiency of 3D model processing.

[0009] In conjunction with the first aspect, in one alternative implementation, the aforementioned patch information includes: centroid information of the polygonal patches. Then, based on the patch information, multiple polygonal patches are sorted and encoded using the Morton code method to determine multiple coded polygonal patches, including: sorting and encoding multiple polygonal patches based on the centroid information using a Z-shaped space-filling curve using the Morton code method to determine multiple coded polygonal patches.

[0010] In this implementation, Morton code encoding of multiple polygonal patches can be achieved quickly by sorting and encoding them using a Z-shaped space-filling curve based on centroid information.

[0011] In conjunction with the first aspect, in one alternative implementation, the above-mentioned construction of the model hierarchical bounding volume based on coded polygon patches using a local ordered clustering method includes: First, determining the nearest neighbor pair within a preset search radius based on the coded polygon patches corresponding to the child nodes. Each nearest neighbor pair includes two child nodes that are mutually adjacent. Then, determining the merging cost of the nearest neighbor pair based on the patch information of the coded polygon patches corresponding to the child nodes in the nearest neighbor pair. Finally, merging the nearest neighbor pair when the merging cost meets a merging threshold to serve as an intermediate child node, the intermediate child node corresponding to at least two coded polygon patches.

[0012] In this implementation, the model hierarchical bounding body is constructed by determining the nearest neighbor pairs and merging cost judgments. This allows for the construction of the model hierarchical bounding body through local ordered clustering, reducing the computational overhead of global sorting while maintaining the compactness of the bounding body structure. This, in turn, improves the accuracy and efficiency of constructing the model hierarchical bounding body.

[0013] In conjunction with the first aspect, in an alternative implementation, before merging the nearest neighbor pairs when the merging cost value meets the merging threshold, the method further includes: determining whether the number of coded polygon patches corresponding to the merged nearest neighbor nodes is less than or equal to a preset patch number threshold. If the number of coded polygon patches corresponding to the merged nearest neighbor nodes is less than or equal to the preset patch number threshold, it is then determined whether the merging cost value meets the merging threshold. The expression for the merging cost value is:

[0014]

[0015]

[0016] Among them, Cost(N) C ,d) represents the nearest neighbor pair N L and N R Merge into intermediate child node N C The merged cost, d represents the intermediate child node N. C The depth parameter in the model hierarchy bounding volume, Area(N) L ) represents child node N L The surface area of ​​the bounding box composed of the corresponding encoded polygonal patches, Area(N) R ) represents child node N R The surface area of ​​the bounding box composed of the corresponding encoded polygonal patches, Area(N)C ) represents the intermediate child node N C The surface area of ​​the bounding box composed of the corresponding encoded polygonal patches, where λ represents the preset depth penalty factor, and C T This represents the pre-defined cost of traversing a child node.

[0017] In this implementation, the construction method of the model hierarchical bounding volume is optimized by combining the depth penalty factor and the number restriction factor, thereby improving the efficiency of sampling point distance query and thus improving the efficiency and accuracy of constructing the 3D model.

[0018] In conjunction with the first aspect, in one alternative implementation, the determination of the unsigned distance field of the sampled point cloud based on bounding box information and the model hierarchical bounding volume includes: First, based on the bounding box information and the model hierarchical bounding volume, a query upper bound for the first sampling point is determined using a heuristic multi-point sampling method according to preset lower and upper bounds. Then, based on the query upper bound of the first sampling point and the model hierarchical bounding volume, collision detection is performed between the first sampling point and the first model to determine the shortest distance from the first sampling point to the surface of the first model. Finally, the unsigned distance field of the sampled point cloud is determined based on the shortest distance from the first sampling point to the surface of the first model.

[0019] In conjunction with the first aspect, in one alternative implementation, the above-mentioned determination of the query upper bound of the first sampling point based on bounding box information and the model hierarchical bounding volume, according to a preset lower bound and a preset upper bound, using a heuristic multi-point sampling method, includes: First, based on the bounding box information and the second point cloud sampling resolution, determine multiple second sampling points. Determine the distances between each of the multiple second sampling points and the first sampling point to obtain multiple first distances. Then, update the minimum distance value among the multiple first distances as the candidate upper bound, with the initial value of the candidate upper bound being the preset upper bound. Second, determine whether a sphere centered on the first sampling point with a first radius intersects with the bounding box composed of coded polygonal faces corresponding to each child node and the root node in the model hierarchical bounding volume. The first radius is half the sum of the candidate upper bound and the candidate lower bound, with the initial value of the candidate lower bound being the preset lower bound. Next, if the sphere centered on the first sampling point with a first radius intersects with the bounding box composed of coded polygonal faces corresponding to the child nodes or the root node in the model hierarchical bounding volume, update the first radius as the candidate upper bound. If the sphere centered at the first sampling point and with a first radius does not intersect with the bounding box composed of the coded polygon faces corresponding to the child nodes or root node in the model hierarchy, the first radius is updated as a candidate lower bound. Finally, after the iteration stopping condition is met, the candidate upper bound corresponding to the last iteration is used as the query upper bound of the first sampling point.

[0020] In conjunction with the first aspect, in one alternative implementation, the aforementioned child nodes include: leaf nodes and intermediate child nodes. A leaf node corresponds to one coded polygon patch, and an intermediate child node corresponds to multiple coded polygon patches. Based on the query upper bound of the first sampling point and the model hierarchy bounding volume, collision detection is performed between the first sampling point and the first model to determine the shortest distance from the first sampling point to the surface of the first model. This includes: first, determining whether a sphere centered on the first sampling point and with a radius equal to the query upper bound intersects with the bounding box formed by the coded polygon patches corresponding to the child nodes and the root node in the model hierarchy bounding volume. Then, if the sphere centered on the first sampling point and with a radius equal to the query upper bound intersects with the bounding box formed by the coded polygon patches corresponding to the child nodes or the root node in the model hierarchy bounding volume, determining the node type corresponding to the intersecting bounding box. If the node type is a leaf node, determining the distance from the first sampling point to the coded polygon patch corresponding to the intersecting node as the shortest distance. When the node type is an intermediate child node, determine the multiple leaf nodes corresponding to the intermediate child node, and determine the distance from the first sampling point to the coded polygon patch corresponding to the leaf node, so as to obtain multiple second distances. The minimum second distance among the multiple second distances is determined as the shortest distance.

[0021] In conjunction with the first aspect, in one alternative implementation, the aforementioned method of performing interior / exterior detection on the first sampling point based on the patch information using an interior / exterior determination algorithm, and determining the signed distance field of the sampling point cloud by combining the unsigned distance field, includes: First, uniform sampling is performed on the surface of a sphere centered on the first sampling point and with a query upper bound as its radius to determine multiple third sampling points. Then, multiple first direction vectors are determined based on the first sampling point and the multiple third sampling points. The multiple first direction vectors are converted from spherical coordinates to rectangular coordinates to obtain multiple second direction vectors. Next, it is determined whether the multiple second direction vectors intersect with the first model surface. If the second direction vectors intersect with the first model surface, the dot product value of the normal vectors of the polygonal patches where the second direction vectors intersect with the first model surface is determined. Second, the dot product values ​​corresponding to the second direction vectors that intersect with the first model surface are accumulated and weighted to determine the weighted dot product value. The interior / exterior sign of the first sampling point is determined based on the weighted dot product value and a preset dot product threshold. Finally, the signed distance field of the first sampling point is determined based on the interior / exterior sign of the first sampling point and the unsigned distance field.

[0022] In conjunction with the first aspect, in one alternative implementation, the azimuth expression for the third sampling point is:

[0023] θ=2π·U1, U1~Uniform(0,1);

[0024] Where θ represents the azimuth angle, and U1 represents the first preset uniform random number. The polar angle expression for the third sampling point is:

[0025] φ=cos -1 (1-2·U2), U2~Uniform(0,1);

[0026] Where φ represents the polar angle and U2 represents the second preset uniform random number.

[0027] Secondly, this invention provides a model processing system for a three-dimensional model, comprising: an extraction module, an encoding module, a clustering module, a sampling module, a distance determination module, an interior / exterior detection module, and a generation module. The extraction module extracts bounding box information and patch information of a first model, which is a mesh model composed of multiple polygonal patches. The patch information characterizes the structure and properties of the polygonal patches. The encoding module sorts and encodes the multiple polygonal patches using Morton codes based on the patch information, determining multiple encoded polygonal patches. The clustering module constructs a model hierarchical bounding volume based on the multiple encoded polygonal patches using a locally ordered clustering method. The model hierarchical bounding volume includes multiple child nodes and a root node. Each child node corresponds to at least one encoded polygonal patch, and the root node corresponds to the multiple encoded polygonal patches constituting the first model. The sampling module generates a sampled point cloud based on the bounding box information and the sampling resolution of the first point cloud. The distance determination module determines the unsigned distance field of the sampled point cloud based on the bounding box information and the model hierarchical bounding volume. The unsigned distance field characterizes the shortest distance from the first sampling point to the surface of the first model. The interior / exterior detection module can be used to perform interior / exterior detection on the first sampling point based on the patch information using an interior / exterior determination algorithm, and combine this with the unsigned distance field to determine the signed distance field of the sampling point cloud. The signed distance field is used to characterize the shortest distance and positional relationship from the first sampling point to the surface of the first model. The generation module can be used to generate a target 3D model based on the signed distance field of the sampling point cloud. The target 3D model includes voxel information, and the voxel information includes the signed distance field.

[0028] Thirdly, the present invention provides an electronic device, comprising: a memory and one or more processors; the memory being coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the method provided by the first aspect and any of its alternative implementations.

[0029] Fourthly, the present invention provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the method provided by the first aspect and any alternative implementation thereof.

[0030] Understandably, the beneficial effects of the model processing system for the three-dimensional model provided in the second aspect, the electronic equipment in the third aspect, and the computer-readable storage medium in the fourth aspect can be referenced to the beneficial effects of the first aspect and any of its possible design methods, and will not be repeated here. Attached Figure Description

[0031] Figure 1 A flowchart illustrating the model processing method for a three-dimensional model provided in an embodiment of this application;

[0032] Figure 2 A schematic diagram illustrating the principle of the locally ordered clustering method provided in the embodiments of this application;

[0033] Figure 3 This is a schematic diagram showing the location of the third sampling point provided in an embodiment of this application;

[0034] Figure 4 This is a schematic diagram illustrating the bias operation performed on the target 3D model according to an embodiment of this application;

[0035] Figure 5 This is a schematic diagram illustrating the model shelling operation performed on a target 3D model, as provided in an embodiment of this application.

[0036] Figure 6 This is a schematic diagram illustrating the model coupling attribute field operation on a target 3D model provided in an embodiment of this application;

[0037] Figure 7 A schematic diagram of the structure of the model processing system for the three-dimensional model provided in the embodiments of this application. Detailed Implementation

[0038] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.

[0039] Model processing of 3D models is a core component of computer-aided design tools, encompassing various techniques such as offsetting, Boolean operations, shelling, deformation, simplification, smoothing, and reconstruction. Model processing enables 3D models to meet the demands of complex applications. However, current model processing methods typically target explicit models, which primarily employ boundary representations (e.g., STEP, IGS) and mesh representations (STL, OBJ). This representation, combining discrete elements, significantly increases the complexity of 3D models, leading to substantial increases in processing time and cost.

[0040] Taking a 3D model represented by a mesh (hereinafter referred to as a mesh model) as an example, mesh models, due to their use of discrete patches to fit complex surfaces, struggle to achieve a balance between model accuracy and data volume. For high-precision mesh models with complex surfaces, the number of meshes is enormous, requiring calculations on a large number of meshes during geometric modeling. This not only demands high computational performance but also results in long computation times, high costs, and large memory consumption.

[0041] It is evident that the existing model processing methods suffer from problems such as high algorithm complexity, low processing efficiency, and poor application flexibility, resulting in low accuracy and efficiency in processing 3D models.

[0042] To address the aforementioned issues, this application provides a method and system for processing 3D models. This method and system employ implicit model-based model processing. Implicit models are an important geometric representation method in computer graphics, defining the distance relationship between points in space and geometric surfaces through mathematical functions (such as the symbolic distance field, SDF). Compared to explicit representations (such as polygonal meshes), implicit models offer significant advantages in model processing: 3D models based on mathematical function representations have significantly reduced processing time and memory usage; and the model function field can be coupled with other mathematical fields and attribute fields to achieve more complex transformations. This avoids the problems of high algorithm complexity, low processing efficiency, low model accuracy, and large memory consumption found in related technologies, thereby effectively improving the accuracy and efficiency of 3D model processing.

[0043] The solutions provided in the embodiments of this application will be described below with reference to the accompanying drawings.

[0044] Specifically, Figure 1 This is a flowchart illustrating the model processing method for a 3D model provided in an embodiment of this application, as shown below. Figure 1 As shown, the model processing method for a three-dimensional model provided in this application embodiment includes the following steps S101-S107:

[0045] S101. Extract the bounding box information and face information of the first model.

[0046] In this embodiment, the first model is a pre-acquired model used to construct a three-dimensional model of a lattice structure. Specifically, the first model is a mesh model composed of multiple polygonal patches. For example, the polygonal patches can be triangular patches, quadrilateral patches, pentagonal patches, etc. The first model can be a model in mesh format such as stereolithography (STL) or OBJ.

[0047] To construct the 3D lattice structure model corresponding to the first model, it is first necessary to extract the bounding box information and facet information of the first model. The bounding box information can be used to characterize a simplified geometry (such as a cube or cuboid) that encloses the first model; this bounding box represents the approximate spatial extent of the first model. For example, the bounding box can be an axis-aligned bounding box (AABB).

[0048] Patch information can be used to characterize the structure and properties of polygon patches. For example, patch information may include: the centroid information of the patch, the vertex coordinates of the patch, and the surface normal information.

[0049] In some embodiments, vertex information, face vertex coordinates, and face normals of the first model can be extracted by parsing the mesh file of the first model. For example, taking a first model in STL or OBJ mesh format, the vertex information and face vertex coordinates of the first model are typically stored in the mesh file of the first model and can be read. Face normals can be determined by calculating the cross product of the face vertex coordinates.

[0050] Furthermore, by traversing the vertex information of the first model, the maximum and minimum values ​​in the vertex information are determined, and then the maximum coordinate max[3] and minimum coordinate min[3] of the bounding box (hereinafter referred to as the target bounding box) can be determined, thus obtaining the bounding box information.

[0051] S102. Based on the patch information, sort and encode multiple polygonal patches using the Morton code method to determine multiple encoded polygonal patches.

[0052] In this embodiment, the Morton code method is used to sort and encode multiple polygonal faces. The Morton code method can form a one-dimensional code by interleaving the coordinates in the multidimensional space, which preserves the locality of space and makes the differences between adjacent polygonal faces small after encoding, so as to quickly and accurately realize subsequent local ordered clustering to construct the model hierarchical bounding volume.

[0053] In some embodiments, the aforementioned patch information may include: centroid information of the polygonal patches. Then, S102 sorts and encodes multiple polygonal patches according to the patch information using the Morton coding method to determine multiple encoded polygonal patches, specifically including:

[0054] The Morton code method is used to sort and encode multiple polygonal faces based on centroid information using a Z-shaped space-filling curve, thereby determining multiple encoded polygonal faces.

[0055] In this way, the Morton code method can map multidimensional data into one-dimensional data based on centroid information through a Z-shaped space-filling curve, and encode the spatial data (i.e., polygon patch data) according to the order.

[0056] S103. Based on multiple coded polygon patches, construct the model hierarchical bounding volume through a local ordered clustering method.

[0057] In this embodiment, a locally ordered clustering method is used to reduce the computational overhead of global sorting while maintaining the compactness of the bounding volume structure. Locally ordered clustering divides the geometric elements (i.e., coded polygon patches) in the first model into locally ordered subsets (i.e., child nodes), reducing computational complexity. Simultaneously, these subsets (child nodes) are merged from bottom to top to form a Bounding Volume Hierarchy (BVH), thus obtaining the model hierarchical bounding volume. The model hierarchical bounding volume includes multiple child nodes and a root node. Each child node corresponds to at least one coded polygon patch, and the root node corresponds to the multiple coded polygon patches constituting the first model.

[0058] Specifically, child nodes are further divided into leaf nodes and intermediate child nodes. Leaf nodes are the lowest level child nodes, and each leaf node corresponds one-to-one with a coded polygon patch. Intermediate child nodes are child nodes in the middle layer, and each intermediate child node corresponds to a coded polygon patch.

[0059] For example, Figure 2 This is a schematic diagram illustrating the principle of the locally ordered clustering method provided in the embodiments of this application, as shown below. Figure 2 As shown in (1), coded polygon patches A and B are a set of nearest neighbors, coded polygon patches C and D are a set of nearest neighbors, and coded polygon patch E is an independent patch (i.e., not adjacent to any other coded polygon patches). Figure 2 As shown in Figure (2), the constructed model hierarchical bounding volume 200 consists of the bottom-level coded polygon patches A, B, C, D, and E, which are the leaf nodes. Coding polygon patches A and B can be clustered into intermediate child nodes 201, and coded polygon patches C and D can be clustered into intermediate child nodes 202. Furthermore, intermediate child node 202 and the leaf node's coded polygon patch E can also be clustered into intermediate child node 203. Finally, by merging the child nodes from bottom to top, the root node 204 is obtained, which corresponds to all the coded polygons constituting the first model.

[0060] In some embodiments, during the construction of the model hierarchical bounding volume, the coded polygon patches after Morton code encoding can be used as leaf nodes of the model hierarchical bounding volume. For leaf node N i Its Morton code is M i Within the search radius <M i -r,M i Search within the range of +r> for the leaf node N. i The nearest other leaf nodes are identified and marked as neighboring nodes. When two leaf nodes are neighboring nodes, these two leaf nodes are considered as the nearest neighbor pair, and it is further determined whether to merge the nearest neighbor pair. Specifically, the difference in cost before and after merging can be used to determine whether to merge the child nodes of the nearest neighbor pair. For example, the surface area heuristic (SAH) algorithm can be used to estimate the cost of node traversal. If the SAH cost of the child nodes exceeds a preset threshold, merging is stopped.

[0061] Specifically, S103, based on coded polygon patches, constructs a model hierarchical bounding volume using a local ordered clustering method, which may include the following steps S1031-S1034:

[0062] S1031. Based on the coded polygon patches corresponding to the child nodes, determine the nearest neighbor pair within a preset search radius.

[0063] The nearest neighbor pair consists of two child nodes that are neighbors of each other. If a child node has no nearest neighbor, then that child node will be treated as a leaf node.

[0064] S1032. Determine whether the number of coded polygon patches corresponding to the merged nearest neighbor nodes is less than or equal to the preset patch number threshold.

[0065] Specifically, the embodiments of this application incorporate a quantity limiting factor, namely a preset threshold P for the number of facets. max The number of encoded polygon patches after merging two child nodes in a nearest neighbor pair is limited. If the number of encoded polygon patches after merging two child nodes is too high (i.e., exceeds a preset patch count threshold P), the limit is applied. max In the case of ), these two child nodes will not be merged.

[0066] S1033. Based on the patch information of the encoded polygon patches corresponding to the child nodes in the nearest neighbor pair, determine the merging value of the nearest neighbor pair.

[0067] Furthermore, if the number of coded polygon patches corresponding to the merged nearest neighbor nodes is less than or equal to a preset patch number threshold, it can be determined whether the merging cost meets the merging threshold. Specifically, the merging cost of the nearest neighbor pair is first determined based on the patch information of the coded polygon patches.

[0068] In some embodiments, a depth penalty factor λ is introduced to further control the depth and uniformity of the model hierarchy bounding volume. The expression for the merging cost value is then:

[0069]

[0070] Among them, Cost(N) C ,d) represents the nearest neighbor pair N L and N R Merge into intermediate child node N C The merged cost, d represents the intermediate child node N. C The depth parameter in the model hierarchy bounding volume, Area(N) L ) represents child node N L The surface area of ​​the bounding box composed of the corresponding encoded polygonal patches, Area(N) R ) represents child node N R The surface area of ​​the bounding box composed of the corresponding encoded polygonal patches, Area(N) C ) represents the intermediate child node N C The surface area of ​​the bounding box composed of the corresponding encoded polygonal patches, where λ represents the preset depth penalty factor, and C T This represents the pre-defined cost of traversing a child node.

[0071] The expression for the surface area Area of ​​the bounding box mentioned above is:

[0072] Area=2·(dx·dy+dy·dz+dz·dx);

[0073] Where dx represents the diagonal length (i.e., maximum value) of the bounding box formed by the coded polygon patches corresponding to the child node in the x-axis direction, dy represents the diagonal length (i.e., maximum value) of the bounding box formed by the coded polygon patches corresponding to the child node in the y-axis direction, and dz represents the diagonal length (i.e., maximum value) of the bounding box formed by the coded polygon patches corresponding to the child node in the z-axis direction.

[0074] In one implementation, to facilitate calculation and improve processing efficiency, half-area can be used instead of surface area for subsequent calculations. Specifically, the expression for half-area is:

[0075]

[0076] S1034. If the merging cost satisfies the merging threshold, merge the nearest neighbor pair as intermediate child nodes.

[0077] The middle child node corresponds to at least two coded polygon patches.

[0078] The above steps S1031-S1034 can be considered as an iterative process, with each iteration including a merging operation on all child nodes. After multiple iterations, the model's hierarchical bounding box will achieve a more compact node layout through local clustering optimization.

[0079] S104. Based on the bounding box information and the sampling resolution of the first point cloud, generate a sampled point cloud.

[0080] Then, point cloud sampling can be performed within the target bounding box corresponding to the bounding box information according to the first point cloud resolution to generate a uniformly distributed 3D point cloud, which is the sampled point cloud. The sampled point cloud includes multiple first sampling points, specifically including: first sampling points inside the first model, first sampling points on the surface of the first model, and first sampling points outside the first model.

[0081] The cloud resolution mentioned above can be preset based on the size of the target bounding box and actual application requirements; this application does not impose any specific limitations on it.

[0082] S105. Determine the unsigned distance field of the sampled point cloud based on bounding box information and model hierarchical bounding volume.

[0083] Furthermore, based on the model hierarchy bounding volume determined in S103 and the bounding box information mentioned above, the unsigned distance field of the sampling point cloud can be determined. This unsigned distance field can be used to characterize the shortest distance from the first sampling point to the surface of the first model.

[0084] Specifically, the model hierarchical bounding volume can accelerate distance query efficiency by clustering coded polygon faces that are close in space into a single node. Therefore, the shortest distance from the first sampling point to the first model surface can be determined simply by finding the nearest node to the first sampling point within a specific query range (i.e., the upper bound of the query) and then finding the nearest coded polygon face to the first sampling point within that node.

[0085] In some embodiments, S105 may include two parts: determining an upper bound for the query and determining the shortest distance. Determining the upper bound reduces the number of nodes queried by the first sampling point. Then, collision detection is performed between the first sampling point and the first model by calculating the nearest distance from the first sampling point to the surface of the first model. Finally, an unsigned distance field is obtained based on the determined nearest distance. Specifically, S105 may include the following steps S1051-S1053:

[0086] S1051. Based on bounding box information and model hierarchical bounding volume, determine the query upper bound of the first sampling point using a heuristic multi-point sampling method according to the preset lower bound and preset upper bound.

[0087] S1052. Based on the upper bound of the query of the first sampling point and the model hierarchy bounding volume, perform collision detection between the first sampling point and the first model to determine the shortest distance from the first sampling point to the surface of the first model.

[0088] S1053. Determine the unsigned distance field of the sampling point cloud based on the shortest distance from the first sampling point to the surface of the first model.

[0089] Specifically, an unsigned distance field of the sampling point cloud can be generated based on the shortest distance from each first sampling point in the sampling point cloud to the surface of the first model.

[0090] In some embodiments, S1051 may specifically include the following steps S10511-S10517:

[0091] S10511. Based on the bounding box information and the second point cloud sampling resolution, determine multiple second sampling points.

[0092] The second point cloud sampling resolution may differ from the first point cloud sampling resolution. The second point cloud sampling resolution can be preset according to actual application requirements; this application does not impose specific limitations on it.

[0093] S10512. Determine the distances between multiple second sampling points and the first sampling point respectively to obtain multiple first distances.

[0094] For example, the second sampling point q i The first distance d from the first sampling point p i The expression is:

[0095] d i =‖pq i ‖.

[0096] S10513. Update the minimum distance value among multiple first distances to the candidate upper bound. The initial value of the candidate upper bound is the preset upper bound.

[0097] First, a preset upper bound is used as the initial value for the candidate upper bound. The preset upper bound U0 must satisfy the condition of covering the maximum possible distance from the sampling point p to the surface of the first model, for example:

[0098] U0 = ||pc root ‖+d root .

[0099] Among them, c root d represents the center coordinates of the bounding box formed by the coded polygon patches corresponding to the root node (i.e., the bounding box of the first model). root This represents the diagonal length of the bounding box of the first model (i.e., the longest spatial distance of the first model).

[0100] Then, a heuristic multi-point sampling method can be used to narrow down the candidate upper bound, that is, to update the minimum distance value among multiple first distances as the candidate upper bound, so as to reduce the number of model hierarchical bounding volume nodes that need to be detected in subsequent processing.

[0101] S10514. Determine whether the sphere centered at the first sampling point and with the first radius intersects with the bounding box composed of the coded polygon patches corresponding to each child node and the root node in the model hierarchy.

[0102] For example, methods for determining whether a sphere centered at a first sampling point and with a first radius (hereinafter referred to as the "first sphere") intersects with a bounding box composed of coded polygonal faces corresponding to each child node and the root node in the model hierarchy (hereinafter referred to as the "first bounding box") include: the Separating Axis Theorem (SAT) detection method, the closest point detection method from the center of the sphere to the bounding box, the step-by-step axis detection method, and the plane detection method.

[0103] Specifically, the detection principle of the separation axis theorem method is as follows: For two convex bodies (e.g., a first sphere and a first bounding box), if there exists a straight line (separation axis) such that the projections of the two convex bodies onto this line do not overlap, then the two convex bodies do not intersect; otherwise, the two convex bodies intersect. The detection principle of the closest point detection method from the center of the sphere to the bounding box is as follows: Determine the closest point from the center of the first sphere to the first bounding box, and calculate the distance d1 between the center of the sphere and the closest point of the first bounding box. If d1 ≤ the radius of the first sphere, then the first sphere intersects the first bounding box; otherwise, they do not intersect. The detection principle of the step-by-step axis detection method is as follows: Check the relationship between the three axes of the first sphere and the first bounding box respectively, and check whether the center of the first sphere is within the extended range of the three axes of the first bounding box. Specifically, extend the radius of the first sphere outward from the three dimensions of the first bounding box, and check whether the center of the first sphere is within this extended range. If it is, then they intersect; otherwise, they do not intersect. The detection principle of the plane detection method is as follows: detect whether the first sphere intersects with the planes of the six faces of the first bounding box. The distance between the first sphere and the plane is the distance from the center of the first sphere to the plane minus the radius of the first sphere. If the distance is less than or equal to 0, then the first sphere intersects with the plane. If at least one plane intersects with the first sphere, then the first sphere can be considered to intersect with the first bounding box.

[0104] Next, the estimation interval of the first sampling point is further adjusted using the bisection method, namely the interval between the candidate upper bound and the candidate lower bound. The first radius is half the sum of the candidate upper bound and the candidate lower bound, and the initial value of the candidate lower bound is a preset lower bound.

[0105] S10515. If a sphere centered at the first sampling point and with a first radius intersects with a bounding box composed of coded polygon faces corresponding to child nodes or the root node in the model hierarchy, it indicates that a closer coded polygon face exists. In this case, the first radius is updated as the candidate upper bound.

[0106] S10516. If the sphere centered at the first sampling point and with the first radius does not intersect with the bounding box composed of the coded polygon patches corresponding to the child nodes or root nodes in the model hierarchy, update the first radius as the candidate lower bound.

[0107] S10517. After the iteration stopping condition is met, the candidate upper bound corresponding to the last iteration is used as the query upper bound of the first sampling point.

[0108] The iteration stopping condition can be, for example, a preset number of iterations, or the interval range of the candidate upper bound and the candidate lower bound meets a preset range threshold.

[0109] In some embodiments, S1052 may specifically include the following steps S10521-S10524:

[0110] S10521. Determine whether the sphere centered at the first sampling point and with the upper bound of the query intersects with the bounding box composed of the coded polygon patches corresponding to the child nodes and the root node in the model hierarchy bounding body.

[0111] First, collision detection is performed on the sphere centered at the first sampling point and with the upper bound of the query as its radius, and the bounding box composed of the encoded polygonal faces corresponding to each child node and the root node in the model hierarchy bounding volume, to determine whether they intersect.

[0112] S10522. When a sphere centered at the first sampling point and with the upper bound of the query as its radius intersects with a bounding box composed of coded polygonal faces corresponding to child nodes or root nodes in the model hierarchy bounding body, determine the node type corresponding to the intersecting bounding box so as to determine the shortest distance corresponding to the first sampling point based on different node types.

[0113] S10523. When the node type is a leaf node, determine the distance from the first sampling point to the coded polygon patch corresponding to the intersecting node, and use it as the shortest distance.

[0114] S10524. When the node type is an intermediate child node, determine the multiple leaf nodes corresponding to the intermediate child node, and determine the distance from the first sampling point to the coded polygon patch corresponding to the leaf node, so as to obtain multiple second distances. The minimum second distance among the multiple second distances is determined as the shortest distance.

[0115] S106. Based on the patch information, the first sampling point is detected by the inside-outside judgment algorithm, and the signed distance field of the sampling point cloud is determined by combining the unsigned distance field.

[0116] Specifically, the signed distance field is used to characterize the shortest distance and positional relationship from the first sampling point to the surface of the first model. Specifically, the signed distance field includes: the unsigned distance field determined in S105 and its corresponding sign. A positive sign indicates that the first sampling point is outside the first model. A negative sign indicates that the first sampling point is inside the first model. A sign of 0 indicates that the first sampling point is on the surface of the first model.

[0117] In some embodiments, internal and external detection can be performed using methods such as random ray casting, weighted pseudonormal method, and spherical uniform sampling method to determine the symbolic distance field of the sampling point cloud.

[0118] In some embodiments, S106 may specifically include the following steps S1061-S1068:

[0119] S1061. Uniformly sample the surface of a sphere centered on the first sampling point and with the upper bound of the query as the radius to determine multiple third sampling points.

[0120] Specifically, Figure 3 This is a schematic diagram showing the location of the third sampling point provided in an embodiment of this application, as shown below. Figure 3 As shown, the third sampling point 302 is located on the surface 300 of a sphere centered on the first sampling point 301 and with a radius equal to the upper bound ρ. The third sampling point 302 is in a spherical coordinate system, where the azimuth angle θ represents the rotation angle of the third sampling point 302 around the z-axis in the xoy plane, and the polar angle φ represents the vertical distribution of the third sampling point 302 along the z-axis in the spherical coordinate system.

[0121] To achieve uniform sampling on the surface of the sphere, a uniformly distributed projection angle can first be generated on the sphere surface with the first sampling point as the center and the upper bound of the query as the radius. However, if uniform sampling is directly performed on the azimuth angle θ and the polar angle φ, more third sampling points will be concentrated near the pole. Therefore, this embodiment of the application adopts the inverse transformation sampling method, which can make the distribution of the third sampling points more uniform.

[0122] In some embodiments, the azimuth angle expression for the third sampling point is:

[0123] θ=2π·U1, U1~Uniform(0,1);

[0124] Where θ represents the azimuth angle and U1 represents the first preset uniform random number.

[0125] The polar angle expression for the third sampling point is:

[0126] φ=cos -1 (1-2·U2), U2~Uniform(0,1);

[0127] Where φ represents the polar angle and U2 represents the second preset uniform random number.

[0128] S1062. Based on the first sampling point and multiple third sampling points, determine multiple first direction vectors.

[0129] Specifically, the first direction vector is a vector that starts from the first sampling point and points to the third sampling point.

[0130] S1063. Convert the multiple first direction vectors from the spherical coordinate system to the rectangular coordinate system to obtain multiple second direction vectors. The second direction vectors are direction vectors located in the rectangular coordinate system.

[0131] S1064. Determine whether multiple second direction vectors intersect with the surface of the first model.

[0132] For example, the cross product of the second direction vector and the normal vector of the polygonal facet of the first model surface can be determined. If the cross product is 0, the second direction vector is determined to be parallel to the first model surface (i.e., not intersecting). If the cross product is not 0, the second direction vector is determined to intersect the first model surface.

[0133] S1065. When the second direction vector intersects the surface of the first model, determine the dot product value of the normal vector of the polygonal facet where the second direction vector intersects the surface of the first model.

[0134] Specifically, a negative dot product indicates an obtuse angle, meaning the second direction vector enters the first model from the outside. A positive dot product indicates an acute angle, meaning the second direction vector exits the first model from the inside.

[0135] S1066. Accumulate and weight the dot product values ​​corresponding to the second direction vectors that intersect with the surface of the first model, and determine the weighted dot product value.

[0136] Specifically, if the dot product value is negative, it can be assigned the value of 1 for cumulative weighting. If the dot product value is positive, it can be assigned the value of -1 for cumulative weighting.

[0137] S1067. Determine the inner and outer signs of the first sampling point based on the weighted dot product value and the preset dot product threshold.

[0138] S1068. Determine the symbolic distance field of the first sampling point based on the inner and outer symbols and the unsigned distance field of the first sampling point.

[0139] S1061-S1068 above describes the process of using the spherical uniform sampling method to detect the interior and exterior of the first sampling point, and combining this with the unsigned distance field to determine the signed distance field of the sampling point cloud. The spherical uniform sampling method involves uniformly setting several third sampling points on the surface of a sphere centered on the first sampling point and with a query upper bound as its radius, and projecting rays from the first sampling point to these third sampling points. Furthermore, the intersection relationship between these rays and the surface of the first model is used to determine whether the first sampling point is inside or outside the first model. The spherical uniform sampling method has the advantages of high stability and low computational cost, thus effectively improving the model processing efficiency of 3D models.

[0140] S107. Generate a three-dimensional model of the target based on the symbolic distance field of the sampled point cloud.

[0141] Finally, the target 3D model can be generated based on the symbolic distance field of the sampled point cloud determined in S106. This target 3D model includes voxel information, specifically the symbolic distance field. This symbolic distance field can be used to represent the target 3D model, avoiding the low accuracy problem of mesh-fitted models. Thus, using this symbolic distance field can improve the accuracy of model processing for the target 3D model.

[0142] In some embodiments, the generated target 3D model can be an XML file, which is a binary storage format. This allows for more compact data of the target 3D model, facilitates efficient reading and writing of the target 3D model, and makes it easier to process large-scale voxel data (i.e., voxel information) in the target 3D model.

[0143] In some embodiments, the voxel information further includes: preset texture information. The preset texture information can be preset by the user according to actual application requirements, and can be obtained in advance.

[0144] In some embodiments, the method can also be based on the symbolic distance field of the target 3D model, combined with field-driven methods to realize model processing operations such as model biasing, model shelling, and model coupling attribute fields.

[0145] Specifically, for the bias operation, since the signed distance field of the target 3D model includes the distance from each point in the space of the target 3D model to the model surface, where the signed distance field V of the model surface... sdf It is 0. Therefore, it can be achieved through different V values. sdf To obtain isosurfaces, values ​​greater than 0 indicate outward bias, and values ​​less than 0 indicate inward bias. This is achieved by using the V-axis of the model... sdf Expanding or shrinking to a preset offset value allows for quick and efficient offset operations on the target 3D model.

[0146] For example, Figure 4 This is a schematic diagram illustrating the bias operation on a target 3D model provided in an embodiment of this application, as shown below. Figure 4 As shown in (2), this is a schematic diagram of the target 3D model in an unbiased state. Figure 4 As shown in Figure (1), this is a schematic diagram of the structure of the target 3D model after the outward offset operation. Figure 4 As shown in (3), this is a schematic diagram of the structure of the target three-dimensional model after the inward offset operation.

[0147] Model shelling can convert a target 3D model into a hollow shell with uniform wall thickness. This is achieved by offsetting the surface of the target 3D model inwards or outwards and removing excess internal or external portions, thus creating a hollow structure. The use of a signed distance field facilitates the rapid location of isosurfaces at different distances from the target 3D model's surface, enabling the offset operation. The model information between the offset surface and the target 3D model's surface is preserved, while the original model's internal information is defined as empty, resulting in a hollow model and enabling rapid shelling. Figure 5 This is a schematic diagram illustrating the model shelling operation on a target 3D model provided in an embodiment of this application, as shown below. Figure 5 The image shows a schematic diagram of the structure of the target 3D model after the model shelling operation.

[0148] For model-coupled attribute fields, the symbolic distance field facilitates information coupling. For example, by defining other attributes such as material, color, density, and geometric features in the form of data fields, they can be coupled with the symbolic distance field to define the attributes of the 3D model.

[0149] Figure 6 This is a schematic diagram illustrating the model coupling attribute field operation on the target 3D model provided in an embodiment of this application, as shown below. Figure 6 The figure shows a schematic diagram of the structural effect after the symbolic distance field and geometric field of the target 3D model are coupled.

[0150] The model processing method for the 3D model provided in the above embodiments of this application firstly involves sorting and encoding multiple polygonal patches based on the extracted bounding box information of the first model using the Morton code method to determine multiple coded polygonal patches. Then, based on the multiple coded polygonal patches, a model hierarchical bounding volume is constructed using a local ordered clustering method. Next, the unsigned distance field of the sampling point cloud is determined based on the bounding box information and the model hierarchical bounding volume. Further, based on the patch information, an inside / outside detection algorithm is used to perform inside / outside detection on the first sampling points, and the signed distance field of the sampling point cloud is determined in conjunction with the unsigned distance field. Finally, the target 3D model is generated based on the signed distance field of the sampling point cloud.

[0151] This method employs an implicit model-based model processing approach, offering advantages such as high modeling accuracy and efficiency, low memory consumption, and high processing flexibility. Specifically, it optimizes the construction method of the model's hierarchical bounding volume by combining depth penalty factors and quantity constraint factors, improving the efficiency of sampling point distance queries and thus enhancing the efficiency and accuracy of 3D model construction. Compared to traditional mesh-represented models, implicit models require less data storage for the same accuracy requirements. It avoids intersection calculations with a large number of meshes during model processing, further reducing memory consumption during geometric processing. Furthermore, by leveraging the characteristics of the signed distance field, it enables implicit model processing using a field-driven method. This field-driven approach facilitates various geometric operations and the coupling of multiple attribute fields for modeling, significantly improving the flexibility of model geometric processing. Thus, it effectively improves the accuracy and efficiency of 3D model processing.

[0152] This application also provides a model processing system for three-dimensional models, specifically, Figure 7 This is a schematic diagram of the structure of the model processing system for the three-dimensional model provided in the embodiments of this application, as shown below. Figure 7 As shown, the model processing system 700 of the three-dimensional model includes: an extraction module 701, an encoding module 702, a clustering module 703, a sampling module 704, a distance determination module 705, an interior / exterior detection module 706, and a generation module 707.

[0153] The extraction module 701 can be used to extract the bounding box information and patch information of the first model. The first model is a mesh model composed of multiple polygonal patches, and the patch information is used to characterize the structure and properties of the polygonal patches.

[0154] The encoding module 702 can be used to sort and encode multiple polygonal faces based on the face information using the Morton code method, and determine multiple encoded polygonal faces.

[0155] The clustering module 703 can be used to construct a model hierarchical bounding volume based on multiple coded polygon patches using a local ordered clustering method; wherein the model hierarchical bounding volume includes: multiple child nodes and a root node, the child nodes corresponding to at least one coded polygon patch, and the root node corresponding to multiple coded polygon patches constituting the first model.

[0156] The sampling module 704 can be used to generate a sampled point cloud based on the bounding box information and the sampling resolution of the first point cloud;

[0157] The distance determination module 705 can be used to determine the unsigned distance field of the sampling point cloud based on the bounding box information and the model hierarchy bounding volume. The unsigned distance field is used to characterize the shortest distance from the first sampling point to the surface of the first model.

[0158] The internal and external detection module 706 can be used to perform internal and external detection on the first sampling point based on the surface information through an internal and external determination algorithm, and combine the unsigned distance field to determine the signed distance field of the sampling point cloud. The signed distance field is used to characterize the shortest distance and positional relationship from the first sampling point to the surface of the first model.

[0159] The generation module 707 can be used to generate a target 3D model based on the symbolic distance field of the sampled point cloud. The target 3D model includes voxel information, which includes the symbolic distance field.

[0160] In some embodiments, the clustering module 703, the distance determination module 705, and the internal / external detection module 706 described above can ultimately determine the symbolic distance field of the sampled point cloud through GPU multi-threaded parallelism, thereby improving the model processing efficiency of the 3D model.

[0161] The model processing system for the 3D model provided in the above embodiments of this application firstly sorts and encodes multiple polygonal patches using the Morton code method based on the extracted bounding box information of the first model, determining multiple coded polygonal patches. Then, based on the multiple coded polygonal patches, a model hierarchical bounding volume is constructed using a local ordered clustering method. Next, the unsigned distance field of the sampling point cloud is determined based on the bounding box information and the model hierarchical bounding volume. Further, based on the patch information, an inside / outside detection algorithm is used to perform inside / outside detection on the first sampling points, and the signed distance field of the sampling point cloud is determined in conjunction with the unsigned distance field. Finally, the target 3D model is generated based on the signed distance field of the sampling point cloud. This system can achieve model processing based on implicit models, thus effectively improving the accuracy and efficiency of 3D model processing.

[0162] This invention also provides an electronic device, which may include a display screen, a memory, and one or more processors. The display screen, memory, and processors are coupled. The memory stores computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device can perform various methods or steps executed in the above-described embodiments of the model processing method for three-dimensional models. Of course, this electronic device includes, but is not limited to, the aforementioned display screen, memory, and one or more processors.

[0163] This invention also provides a computer-readable storage medium for storing computer instructions for running the model processing method of the above-described three-dimensional model.

[0164] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0165] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0166] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0167] Similar parts between the embodiments provided in this application can be referred to mutually. The specific implementation methods provided above are only a few examples under the overall concept of this application and do not constitute a limitation on the scope of protection of this application. For those skilled in the art, any other implementation methods extended from the solution of this application without creative effort shall fall within the scope of protection of this application.

Claims

1. A model processing method of a three-dimensional model, characterized by, The method comprises the following steps: extracting bounding box information and face information of a first model, the first model being a mesh model composed of a plurality of polygonal faces, the face information being used to represent the structure and attributes of the polygonal faces; sorting and encoding the plurality of polygonal faces by a Morton code method according to the face information, to determine a plurality of encoded polygonal faces; constructing a model hierarchical bounding volume by a locally ordered clustering method based on the plurality of encoded polygonal faces; wherein the model hierarchical bounding volume comprises a plurality of child nodes and a root node, the child nodes corresponding to at least one of the encoded polygonal faces, and the root node corresponding to the plurality of encoded polygonal faces constituting the first model; generating a sampling point cloud based on the bounding box information according to a first point cloud sampling resolution, the sampling point cloud comprising a plurality of first sampling points; determining an unsigned distance field of the sampling point cloud based on the bounding box information and the model hierarchical bounding volume, the unsigned distance field being used to represent the shortest distance from the first sampling points to the surface of the first model; performing inside-out detection on the first sampling points by an inside-out determination algorithm according to the face information, and determining a signed distance field of the sampling point cloud in combination with the unsigned distance field, the signed distance field being used to represent the shortest distance and positional relationship from the first sampling points to the surface of the first model; generating a target three-dimensional model according to the signed distance field of the sampling point cloud, the target three-dimensional model comprising voxel information, the voxel information comprising the signed distance field; the method of constructing a model hierarchical bounding volume by a locally ordered clustering method based on the encoded polygonal faces comprises: determining a nearest node pair within a preset search radius based on the encoded polygonal faces corresponding to the child nodes of the nearest node pair, the nearest node pair comprising two child nodes that are adjacent to each other; determining a merging generation value of the nearest node pair based on the face information of the encoded polygonal faces corresponding to the child nodes in the nearest node pair; merging the nearest node pair as an intermediate child node under the condition that the merging generation value meets a merging threshold, the intermediate child node corresponding to at least two encoded polygonal faces; before the merging of the nearest node pair under the condition that the merging generation value meets the merging threshold, the method further comprises: determining whether the number of encoded polygonal faces corresponding to the nearest node pair after merging is less than or equal to a preset face number threshold; determining whether the merging generation value meets the merging threshold under the condition that the number of encoded polygonal faces corresponding to the nearest node pair after merging is less than or equal to the preset face number threshold; the expression of the merging generation value is: ; wherein, denotes the pair of nearest neighbor nodes and merge into an intermediate child node a merge generation value, denotes the intermediate child node a depth parameter in the model hierarchy bounding volume, denotes the child node a surface area of a bounding box composed of the corresponding encoded polygonal facets, denotes the child node a surface area of a bounding box composed of the corresponding encoded polygonal facets, denotes the intermediate child node a surface area of a bounding box composed of the corresponding encoded polygonal facets, denotes a preset depth penalty factor, denotes a preset generation value for traversing a child node.

2. The method of claim 1, wherein, the face information comprises the centroid information of the polygonal faces; the method of sorting and encoding the plurality of polygonal faces by a Morton code method according to the face information to determine a plurality of encoded polygonal faces comprises: sorting and encoding the plurality of polygonal faces by a Z-shaped space-filling curve based on the centroid information by a Morton code method, to determine the plurality of encoded polygonal faces.

3. The method of claim 1, wherein, The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps:

4. The method of claim 3, wherein, The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps:

5. The method according to claim 3 or 4, characterized in that, The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the In a case where the node type is a leaf node, a distance of the first sampling point to a coded polygon patch corresponding to an intersection node is determined as the shortest distance; In a case where the node type is an intermediate child node, a plurality of leaf nodes corresponding to the intermediate child node are determined, and distances of the first sampling point to coded polygon patches corresponding to the leaf nodes are respectively determined to obtain a plurality of second distances, and a minimum second distance in the plurality of second distances is determined as the shortest distance.

6. The method of claim 5, wherein, The inside-out detection of the first sampling point by the inside-out detection algorithm according to the patch information, and the determination of the signed distance field of the sampling point cloud in combination with the unsigned distance field, include: Uniform sampling is performed on a spherical surface with the first sampling point as a center and the query upper bound as a radius to determine a plurality of third sampling points; A plurality of first direction vectors are determined according to the first sampling point and the plurality of third sampling points; The plurality of first direction vectors are converted from a spherical coordinate system to a rectangular coordinate system to obtain a plurality of second direction vectors; Whether the plurality of second direction vectors respectively intersect the first model surface is determined; In a case where the second direction vector intersects the first model surface, a dot product value of a normal vector of a polygon patch intersected by the second direction vector and the first model surface is determined; The dot product values corresponding to the second direction vectors intersecting the first model surface are accumulated and weighted to determine a weighted dot product value; The inside-out sign of the first sampling point is determined according to the weighted dot product value and a preset dot product threshold; The signed distance field of the first sampling point is determined according to the inside-out sign of the first sampling point and the unsigned distance field.

7. The method of claim 6, wherein, An azimuth angle expression of the third sampling point is: ; wherein, denotes an azimuth angle, denotes a first pre-set uniform random number; A polar angle expression of the third sampling point is: ; wherein, denotes the polar angle, denotes a second preset uniform random number.

8. A model processing system of a three-dimensional model characterized by comprising: It includes: The extraction module, the encoding module, the clustering module, the sampling module, the distance determination module, the inside-out detection module and the generation module; wherein, The extraction module is configured to extract bounding box information and patch information of a first model, the first model being a mesh model composed of a plurality of polygon patches, and the patch information being used to represent structures and attributes of the polygon patches; The encoding module is configured to sort and encode the plurality of polygon patches by a Morgen code method according to the patch information to determine a plurality of coded polygon patches; The clustering module is configured to construct a model hierarchical bounding volume based on the plurality of coded polygon patches by a local ordered clustering method; wherein, the model hierarchical bounding volume includes a plurality of child nodes and a root node, the child nodes correspond to at least one of the coded polygon patches, and the root node corresponds to the plurality of coded polygon patches constituting the first model; The sampling module is configured to generate a sampling point cloud based on the bounding box information according to a first point cloud sampling resolution; The distance determination module is configured to determine an unsigned distance field of the sampling point cloud based on the bounding box information and the model hierarchical bounding volume, the unsigned distance field being used to represent a shortest distance of a first sampling point to a first model surface; and The inside-out detection module is configured to perform inside-out detection of the first sampling point by an inside-out detection algorithm according to the patch information, and determine a signed distance field of the sampling point cloud in combination with the unsigned distance field. The inside-out detection module is configured to perform inside-out detection on the first sampling points according to the patch information by using an inside-out determination algorithm, and determine a signed distance field of the sampling point cloud in combination with the unsigned distance field, the signed distance field being configured to represent the shortest distance and positional relationship of the first sampling points to the first model surface; The generation module is configured to generate a target three-dimensional model according to the signed distance field of the sampling point cloud, the target three-dimensional model including voxel information, and the voxel information including the signed distance field; The clustering module is specifically configured to: determine a nearest neighbor node pair within a preset search radius based on the encoded polygon patches corresponding to the child nodes, the nearest neighbor node pair including two child nodes that are adjacent to each other; determine a merging generation value of the nearest neighbor node pair based on patch information of the encoded polygon patches corresponding to the child nodes in the nearest neighbor node pair; merge the nearest neighbor node pair to serve as an intermediate child node when the merging generation value meets a merging threshold, the intermediate child node corresponding to at least two encoded polygon patches; Before the merging of the nearest neighbor node pair when the merging generation value meets the merging threshold, the clustering module is further configured to: determine whether the number of encoded polygon patches corresponding to the nearest neighbor nodes after merging is less than or equal to a preset patch quantity threshold; determine whether the merging generation value meets the merging threshold when the number of encoded polygon patches corresponding to the nearest neighbor nodes after merging is less than or equal to the preset patch quantity threshold; The expression of the merging generation value is: ; wherein, denotes the pair of nearest neighbor nodes and merge into an intermediate child node a merge generation value, denotes the intermediate child node a depth parameter in the model hierarchy bounding volume, denotes the child node a surface area of a bounding box composed of the corresponding encoded polygonal facets, denotes the child node a surface area of a bounding box composed of the corresponding encoded polygonal facets, denotes the intermediate child node a surface area of a bounding box composed of the corresponding encoded polygonal facets, denotes a preset depth penalty factor, denotes a preset generation value for traversing a child node.

Citation Information

Patent Citations

  • Three-dimensional modeling method, device and system based on multiple contour lines and storage medium

    CN109584357A

  • Three-dimensional reconstruction method and system, and storage medium

    WO2023078335A1