Search

CN-121999190-A - Topology consistency detection method and device for model, electronic equipment and storage medium

CN121999190ACN 121999190 ACN121999190 ACN 121999190ACN-121999190-A

Abstract

The application discloses a method, a device, electronic equipment and a storage medium for detecting topological consistency of models, which belong to the technical field of computers and are used for acquiring a first three-dimensional model and a second three-dimensional model, wherein the first three-dimensional model and the second three-dimensional model are models with different accuracies of a target object; the method comprises the steps of determining the topological characteristic of a first area based on at least one geometric data of each first area in a first three-dimensional model, determining a distance threshold corresponding to the first area based on the topological characteristic of the first area, determining a target distance between a vertex in the first area and a second three-dimensional model, and determining a topological consistency detection result between the first three-dimensional model and the second three-dimensional model based on the target distance and the distance threshold corresponding to the first area where the vertex is located, so that the accuracy of the topological consistency detection result can be improved.

Inventors

  • LI MENGEN

Assignees

  • 广州博冠信息科技有限公司

Dates

Publication Date
20260508
Application Date
20260106

Claims (10)

  1. 1. A method for detecting topological consistency of a model, comprising: Acquiring a first three-dimensional model and a second three-dimensional model, wherein the first three-dimensional model and the second three-dimensional model are models with different accuracies of a target object; Determining the topological characteristic of each first region based on at least one piece of geometric data of each first region in the first three-dimensional model, and determining a distance threshold corresponding to the first region based on the topological characteristic of the first region; determining a target distance between the vertex in the first region and the second three-dimensional model; And determining a topological consistency detection result between the first three-dimensional model and the second three-dimensional model based on the target distance and a distance threshold corresponding to a first area where the vertex is located.
  2. 2. The method according to claim 1, wherein the at least one geometrical data comprises a number of vertices in the first region and/or a normal vector of at least one face in the first region, the topological features comprising a vertex density and/or a curvature of the first region; the determining the topological feature of each first region based on at least one geometric data of the first region in the first three-dimensional model comprises: determining vertex densities of the first regions based on the number of vertices in each first region and the area of the first region in the first three-dimensional model; And/or determining the curvature of each first region based on the normal vector of the face in the first region and the normal vector of the first face adjacent to the face.
  3. 3. The method of claim 2, wherein the topological feature comprises a vertex density and a curvature, and wherein the determining the distance threshold corresponding to the first region based on the topological feature of the first region comprises: Determining a threshold adjustment value based on the vertex density and the curvature of the first region; And adjusting the preset basic threshold based on the threshold adjusting value to obtain a distance threshold corresponding to the first region.
  4. 4. The method of claim 1, wherein the determining the target distance between the vertex in the first region and the second three-dimensional model comprises: Dividing the second three-dimensional model to obtain second areas, wherein one second area comprises at least two faces on the second three-dimensional model; Controlling the vertexes in the first area to emit rays along the normal direction of the vertexes; determining a second target region of the second region that intersects the ray; determining an intersection point at which a face of the second target region intersects the ray; A target distance between the vertex and the second three-dimensional model is determined based on the vertex and the intersection point.
  5. 5. The method according to any one of claims 1-4, further comprising: Determining a normal vector included angle based on the normal vector of the vertex and the normal vector of the plane of the target point, wherein the target point is a point used for determining the target distance on the second three-dimensional model; The determining a topology consistency detection result between the first three-dimensional model and the second three-dimensional model based on the target distance and a distance threshold corresponding to a first area where the vertex is located, includes: if the target distance of the vertexes of the first preset proportion number is smaller than or equal to a distance threshold corresponding to a first area where the vertexes are located and the normal vector included angle is smaller than or equal to a preset angle, determining that a topological consistency detection result between the first three-dimensional model and the second three-dimensional model is topological consistency.
  6. 6. The method of claim 5, wherein the method further comprises: if the target distance is greater than a distance threshold corresponding to a first area where the vertex is located and the normal vector included angle is smaller than or equal to the preset angle, determining that the difference type of the vertex is a first type; And/or if the target distance is smaller than or equal to a distance threshold corresponding to a first area where the vertex is located and the normal vector included angle is larger than the preset angle, determining that the difference type of the vertex is a second type; and/or if the target distance is greater than a distance threshold corresponding to a first area where the vertex is located and the normal vector included angle is greater than the preset angle, determining that the difference type of the vertex is a third type.
  7. 7. The method of claim 6, wherein the vertex difference type is one of the first type, the second type, and the third type, and wherein in the case where the vertex difference type is the first type, the method further comprises: Determining a difference value between the target distance and a distance threshold corresponding to a first region where the vertex is located; Controlling the vertex to move the difference value along a first target direction and controlling the target vertex to move the difference value along a second target direction, wherein the first target direction is the opposite direction of the normal direction of the vertex, the target vertex is the vertex in the preset range of the vertex on the first three-dimensional model, and the second target direction is the opposite direction of the normal direction of the target vertex; in the case where the difference type of the vertex is the second type, the method further includes: turning over the normal vector of the vertex; in the case where the difference type of the vertex is the third type, the method further includes: determining a second face adjacent to the face where the vertex is located; Deleting the second face and updating the index of the vertex.
  8. 8. A topology consistency detection apparatus of a model, comprising: The model acquisition module is used for acquiring a first three-dimensional model and a second three-dimensional model which are models with different accuracies of a target object; the first determining module is used for determining the topological characteristics of each first area based on at least one piece of geometric data of each first area in the first three-dimensional model, and determining a distance threshold corresponding to the first area based on the topological characteristics of the first area; A second determining module for determining a target distance between the vertex in the first region and the second three-dimensional model; And the result determining module is used for determining a topological consistency detection result between the first three-dimensional model and the second three-dimensional model based on the target distance and a distance threshold value corresponding to a first area where the vertex is located.
  9. 9. An electronic device comprising a processor and a memory, the memory storing a plurality of instructions, the processor loading instructions from the memory to perform the steps of the topology uniformity detection method of a model according to any one of claims 1 to 7.
  10. 10. A computer-readable storage medium, having stored thereon a computer program, the computer program being loaded by a processor to perform the steps of the topology consistency detection method of a model of any of claims 1 to 7.

Description

Topology consistency detection method and device for model, electronic equipment and storage medium Technical Field The present application relates to the field of computer technologies, and in particular, to a method and apparatus for detecting topology consistency of a model, an electronic device, and a storage medium. Background In a virtual three-dimensional scene, diverse virtual objects are the basis for constructing a rich visual experience. Each virtual object often has a model of different accuracy to accommodate different rendering distances and performance requirements. To ensure seamless switching between model versions of different accuracy, topological consistency between them is typically detected. Traditional topology consistency detection methods include a manual method and a global fixed threshold method. The efficiency of the manual method is low and highly dependent on the experience of the inspector, so that the accuracy thereof is difficult to be ensured. The global fixed threshold rule adopts a unified threshold to measure topology differences under all conditions, ignores complexity of a model, and causes that accuracy of the model cannot meet requirements of practical application. Disclosure of Invention The application provides a topology consistency detection method and device of a model, electronic equipment and a storage medium, which can improve the topology detection efficiency and accuracy. In a first aspect, an embodiment of the present application provides a method for detecting topology consistency of a model, including: Acquiring a first three-dimensional model and a second three-dimensional model, wherein the first three-dimensional model and the second three-dimensional model are models with different accuracies of a target object; Determining a topological feature of each first region based on at least one geometric data of each first region in the first three-dimensional model, and determining a distance threshold corresponding to the first region based on the topological feature of the first region; determining a target distance between the vertex in the first region and the second three-dimensional model; And determining a topological consistency detection result between the first three-dimensional model and the second three-dimensional model based on the target distance and a distance threshold corresponding to a first area where the vertex is located. In a second aspect, an embodiment of the present application provides a topology consistency detection apparatus for a model, including: The model acquisition module is used for acquiring a first three-dimensional model and a second three-dimensional model which are models with different accuracies of a target object; The first determining module is used for determining the topological characteristic of each first area based on at least one geometric data of each first area in the first three-dimensional model, and determining a distance threshold corresponding to the first area based on the topological characteristic of the first area; a second determining module for determining a target distance between the vertex in the first region and the second three-dimensional model; And the result determining module is used for determining a topological consistency detection result between the first three-dimensional model and the second three-dimensional model based on the target distance and a distance threshold value corresponding to a first area where the vertex is located. In a third aspect, an embodiment of the present application further provides an electronic device, including a memory storing a plurality of instructions, where the processor loads the instructions from the memory to execute the topology consistency detection method of any one of the models provided in the embodiment of the present application. In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a plurality of instructions, where the instructions are adapted to be loaded by a processor to execute any of the topology consistency detection methods of the models provided in the embodiments of the present application. In the embodiment of the application, a first three-dimensional model and a second three-dimensional model are acquired, the first three-dimensional model and the second three-dimensional model are models with different precision of a target object, the topological characteristics of the first area are determined based on at least one geometric data of each first area in the first three-dimensional model, the distance threshold corresponding to the first area is determined based on the topological characteristics of the first area, the target distance between the vertex in the first area and the second three-dimensional model is determined, the topological consistency detection result between the first three-dimensional model and t