An approximation method of detail level mesh model based on approximate global optimization
By constructing a sparrow-gray wolf optimization algorithm based on collaborative learning, the problem of large approximation error in existing technologies after reducing the number of vertices in the mesh model is solved, achieving efficient generation of detailed level mesh models, maintaining the model topology and reducing computational costs.
Patent Information
- Application Number
- CN202211498735.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2042-11-28
AI Technical Summary
Existing technologies struggle to effectively reduce the number of vertices and faces without causing excessive approximation errors when generating detailed mesh models, and local optimization methods cannot globally optimize vertex positions.
We employ a detailed mesh model approximation method based on approximate global optimization, combining the global exploration capability of the Sparrow Algorithm and the local exploration capability of the Grey Wolf Algorithm to construct a collaborative learning Sparrow-Grey Wolf optimization algorithm. By calculating the movable range of each point and the globally optimized vertex position, while keeping the surface structure unchanged, we search for the optimal vertex set to reduce errors.
It achieves the maximum search of all possible combinations of vertex positions while keeping the mesh topology unchanged, avoiding local optima, obtaining an optimized 3D mesh model with the minimum approximation error, improving visual quality and reducing computational cost.
Smart Images

Figure CN115759175B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of computer application, computer graphics and intelligent optimization, and particularly relates to a detail level mesh model approximation method based on approximate global optimization. BACKGROUND
[0002] With the development of three-dimensional technology, three-dimensional mesh models have been widely applied in many fields, such as entertainment industry, virtual reality, three-dimensional reconstruction, city modeling, etc. However, large-scale mesh models will consume a large amount of computing cost and storage resources, making the storage, rendering and transmission of these operations very difficult. At the same time, the precision requirements of mesh models are different in different application scenarios. Therefore, it is necessary to simplify the three-dimensional mesh model and generate a detail level mesh model approximating the original model.
[0003] The generation of a detail level mesh model refers to reducing the number of vertices and facets in the model while ensuring that the overall appearance and topological structure of the model remain basically unchanged, that is, generating a detail level mesh model approximating the original model while reducing the number of points and facets. For a detail level mesh model with a specified number of vertices, the key problem is how to reduce the approximation error between the detail level model and the original model. Previous simplification methods are mostly based on greedy algorithms and local optimization, that is, by controlling the local error during the simplification process, the vertices of the model can only be simplified without the opportunity for optimization. SUMMARY
[0004] In view of the deficiencies in the prior art, the application provides a detail level mesh model approximation method and a computing system based on approximate global optimization, comprising the following steps:
[0005] Step 1: using a simplification algorithm to preliminarily simplify an arbitrary original three-dimensional mesh model to obtain a detail level mesh model with fewer vertices and facets;
[0006] Step 2: calculating the movable range of each point of the detail level mesh model in step 1;
[0007] Step 3: combining the global exploration ability of the Sparrow Algorithm and the local exploration ability of the Grey Wolf Algorithm to construct a Sparrow-Grey Wolf Optimization Algorithm with collaborative learning, comprising the following sub-steps:
[0008] Step 3.1: randomly initializing a population in the movable range of the vertex, each individual in the population being a possible vertex position set, and the position of the i th individual in the population being denoted as X i ;
[0009] Step 3.2: in the global search stage, updating the vertex position by using the producer, follower, detector and early warning mechanism in the Sparrow Algorithm;
[0010] Step 3.3, the optimal solution found by the sparrow algorithm is used as the alpha wolf of the grey wolf algorithm to continue guiding the search;
[0011] Step 3.4, in the local search stage, the hunting and hunting mechanism of the grey wolf algorithm is used to update the vertex position.
[0012] Step 4, in the case of preserving the face structure of the detail level grid model, the sparrow-grey wolf optimization algorithm is used to globally optimize all vertices of the detail level grid, so as to approach the original grid model.
[0013] Moreover, the movable range of each point is calculated by using the variable geometry space of the nearest neighbor point in step 2, for a vertex v(x, y, z) of the detail level grid model, its variable geometry space based on the nearest neighbor point is defined as:
[0014] R(v) = {min v′∈N(v) |x-x′|,min v′∈N(v) |y-y′|,min v′∈N(v) |z-z′|} (1)
[0015] In the formula, R(v) represents the movable range of each point, N(v) is the set of adjacent points in the neighborhood of v, v' is an adjacent point in N(v), x', y', and z' are the coordinates of v' in the x-axis, y-axis, and z-axis directions, respectively.
[0016] Moreover, the producer in step 3.2 is an individual whose fitness value is less than a set threshold in the population, and the position updating formula is:
[0017]
[0018] In the formula, X i (t) and X i (t+1) represent the position of the i-th individual in the population in the t-th and t+1-th iterations, T max represents the maximum number of iterations, α ∈ (0, 1] is a uniform random number, Q is a random number subject to normal distribution, L is a full one matrix of 1×N d , N d is the number of vertices of the simplified model, R is the current warning value, and ST is the preset safety threshold.
[0019] The follower is other individual in the population except the producer, and the position updating formula is:
[0020]
[0021] In the formula, X i (t) and X iX (t) represents the position of the i-th individual in the population in the t-th iteration; X w and X b are the current worst and best positions; Q is a random number obeying normal distribution; n is the number of individuals in the population; N d is the number of vertices of the simplified model; A is a matrix of N d × N d , each element of which is randomly assigned as 1 or -1; L is a 1 × N d all-one matrix.
[0022] The detection and warning mechanism assumes that a certain proportion of producers and followers can feel the danger in advance, and their positions will be updated as follows:
[0023]
[0024] In the formula, X i (t), X i (t+1) represents the position of the i-th individual in the population in the t-th iteration, X b is the current best position, β is a random number representing the step size, K ∈ [-1, 1] is a uniform random number, f i is the fitness value of the i-th individual, f b and f w are the current best and worst fitness values, and ε is a very small constant to avoid division by zero.
[0025] Moreover, the optimal solution found by the sparrow algorithm in step 3.3 is the vertex position set with the smallest fitness value.
[0026] Moreover, when the grey wolves are hunting prey, they will gradually form a circle around the prey target, and the position update is guided by the positions of the alpha, beta and delta wolves, which are the three individuals with the smallest fitness values in the population:
[0027] D α = |C1X α (t) - X(t) | (5)
[0028] D β = |C2X β (t) - X(t) | (6)
[0029] D δ = |C3X δ (t) - X(t) | (7)
[0030] X1(t+1) = X α (t) - A1D α (8)
[0031] X2(t+1)=X β (t)-A2D β (9)
[0032] X3(t+1)=X δ (t)-A3D δ (10)
[0033]
[0034] In the formula, X(t+1) represents the position of the gray wolf in the (t+1)th iteration, X α (t), X β (t), X δ Let X(t) represent the positions of α, β, and δ wolves in the t-th iteration, respectively, and let X(t) represent the position of the gray wolf in the t-th iteration. α D β and D δ A1, A2, A3 and C1, C2, C3 are the distances from other wolves to α, β and δ wolves, respectively.
[0035] Furthermore, the global optimization problem in step 4 is modeled as follows: given the original 3D mesh model M o (V o ,F o ) and the simplified level of detail model M s (V s ,F s ), in the face set F s Searching for the optimal vertex set while keeping the structure unchanged. Make and M o The error is minimized:
[0036]
[0037] In the formula, V and F represent the vertex set and face set of the corresponding mesh model, respectively, and D() represents the fitness function, which is calculated as follows:
[0038]
[0039] In the formula, d(p,p′) represents the shortest distance from point p to model M, and d(p,p′) represents the Euclidean distance between p and p′.
[0040] Compared with the prior art, the present invention has the following advantages:
[0041] 1) Based on the nearest neighbor point, the movable range of each point of the detail level grid model is calculated, the grid geometry topology can be maintained, and the deviation of the optimized grid vertex and the original vertex is avoided to be too large;
[0042] 2) In the case of preserving the surface structure of the detail level grid model, all vertices of the detail level grid are globally optimized, all possible combinations of vertex positions can be searched in the maximum range, and falling into local optimization is avoided;
[0043] 3) The sparrow-grey wolf optimization algorithm is used to search the optimal vertex position set, and the optimized three-dimensional grid model with the smallest approximation error can be obtained. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 The flowchart of the embodiment of the present application.
[0045] Figure 2 The optimization effect diagram of the method proposed in the present application on four detail level grid models under different resolutions.
[0046] Figure 3 The convergence comparison diagram of the optimization method based on sparrow-grey wolf (SSA-GWO) and the sparrow optimization algorithm (Sparrow Search Algorithm, SSA) and the grey wolf optimization algorithm (Grey Wolf Optimizer, GWO) on three grid models.
[0047] Figure 4 The visual quality comparison effect diagram of the method proposed in the present application before and after optimization. DETAILED DESCRIPTION
[0048] The present application provides a detail level grid model approximation method based on approximate global optimization, and the technical scheme of the present application is further described below with reference to the drawings.
[0049] As shown in Figure 1 , the flow of the embodiment of the present application includes the following steps:
[0050] Step 1: using QEM simplification algorithm to preliminarily simplify any original three-dimensional grid model to obtain a detail level grid model with fewer vertices and surface patches.
[0051] Step 2: calculating the movable range of each point of the detail level grid model in step 1.
[0052] The movable range of each point is calculated by using the variable geometry space of the nearest neighbor point, for a vertex v(x, y, z) of the detail level grid model, the variable geometry space based on the nearest neighbor point is defined as:
[0053]
[0054] where R(v) represents the movable range of each vertex, N(v) is the set of adjacent vertices in the neighborhood of v, v' is an adjacent vertex in N(v), and x', y', z' are the coordinates of v' in the x-axis, y-axis, and z-axis directions, respectively.
[0055] Step 3, combined with the global exploration ability of the Sparrow Algorithm and the local exploration ability of the Grey Wolf Algorithm, a Sparrow-Grey Wolf Optimization Algorithm with collaborative learning is constructed, including the following sub-steps:
[0056] Step 3.1, randomly initialize the population in the movable range of the vertex, each individual in the population is a possible vertex position set, and the position of the i-th individual in the population is denoted as X i .
[0057] Step 3.2, in the global search stage, the producer, follower, detection and warning mechanism in the Sparrow Algorithm is used to update the vertex position.
[0058] The producer refers to the individual in the population whose fitness value is less than the set threshold, and the position update formula is:
[0059]
[0060] where X i (t) and X i (t+1) represent the position of the i-th individual in the population in the t-th and t+1-th iterations, T max represents the maximum number of iterations, α ∈ (0, 1] is a uniform random number, Q is a random number following a normal distribution, L is a 1 × N d full one matrix, and N d is the number of vertices in the simplified model, R is the current warning value, and ST is the preset safety threshold.
[0061] The follower is the individual in the population other than the producer, and the position update formula is:
[0062]
[0063] where X i (t) and X i (t+1) represent the position of the i-th individual in the population in the t-th and t+1-th iterations; X w and X b are the current worst and best positions; Q is a random number following a normal distribution; n is the number of individuals in the population; N d is the number of vertices in the simplified model; and A is N d × N da matrix of size N x N, where each element is randomly assigned to be 1 or -1; L is a 1 x N d a matrix of all ones.
[0064] The detection and warning mechanism assumes that a certain proportion of producers and followers can feel the danger in advance, and their positions will be updated as follows:
[0065]
[0066] where X i (t), X i (t+1) represent the position of the i-th individual in the population at the t, t+1 iteration, X b is the current best position, β is a random number representing the step size, K ∈ [-1, 1] is a uniform random number, f i is the fitness value of the i-th individual, f b and f w are the current best and worst fitness values, and ε is a very small constant to avoid division by zero.
[0067] Step 3.3, the optimal solution found by the Sparrow Algorithm is used as the alpha wolf of the Grey Wolf Algorithm to continue guiding the search.
[0068] The optimal solution found by the Sparrow Algorithm is the vertex position set with the smallest fitness value.
[0069] Step 3.4, in the local search stage, the hunting and hunting mechanism of the Grey Wolf Algorithm is used to update the vertex position.
[0070] When the grey wolves are looking for prey (i.e. the best position), they will gradually form a circle around the prey target, guided by the positions of alpha, beta and delta wolves (i.e. the three individuals with the smallest fitness values in the population), and update their positions:
[0071] D α = |C1X α (t) - X(t)| (5)
[0072] D β = |C2X β (t) - X(t)| (6)
[0073] D δ = |C3X δ (t) - X(t)| (7)
[0074] X1(t+1) = X α (t) - A1D α (8)
[0075] X2(t+1) = X β (t) - A2Dβ (9)
[0076] X3(t+1)=X δ (t)-A3D δ (10)
[0077]
[0078] In the formula, X(t+1) represents the position of the gray wolf in the (t+1)th iteration, X α (t), X β (t), X δ Let X(t) represent the positions of α, β, and δ wolves in the t-th iteration, respectively, and let X(t) represent the position of the gray wolf in the t-th iteration. α D β and D δ A1, A2, A3 and C1, C2, C3 are the distances from other wolves to α, β and δ wolves, respectively.
[0079] Step 4: While preserving the surface structure of the level-of-detail mesh model, use the Sparrow-Grey Wolf optimization algorithm to globally optimize all vertices of the level-of-detail mesh to make it approximate the original mesh model.
[0080] This global optimization problem can be modeled as follows: given the original 3D mesh model M o (V o ,F o ) and the simplified level-of-detail model M of the QEM algorithm s (V s ,F s ), in the face set F s Searching for the optimal vertex set while keeping the structure unchanged. Make and M o The error is minimized:
[0081]
[0082] In the formula, V and F represent the vertex set and face set of the corresponding mesh model, respectively, and D() represents the fitness function. In this embodiment, Hausdorff distance is used, and the calculation method is as follows:
[0083]
[0084] In the formula, d(p,p′) represents the shortest distance from point p to model M, and d(p,p′) represents the Euclidean distance between p and p′.
[0085] Table 1 compares the optimization effects of the proposed method on 13 mesh models. o and N drespectively represent the number of vertices before and after simplification, Err, Err * respectively represent the approximation error before and after optimization, Err / Err * is the ratio of the approximation error before and after optimization.
[0086] Table 1
[0087]
[0088] It can be seen from Table 1 that the method proposed in the present application has achieved good optimization effect for meshes with different topological structures and sizes. In terms of size, the ratio of the approximation error before and after optimization for the smaller model "Horse" with 233 vertices and the large model "Buddha" with 61512 vertices is 1.41 and 1.43 respectively, and the optimization effect does not decrease with the increase of size. In terms of topological structure, the optimization effect of the "Hammer" model with sharp edges and the "Knot108s" model with complex curvature change is not affected by the special topological structure.
[0089] Figure 2 Fig. 1 is a schematic diagram of the optimization effect of the method proposed in the present application on four kinds of detail level mesh models Teddy, Teapot, Kitten and Bunny under different resolutions. The solid line is the approximation error before optimization, and the dashed line is the approximation error after optimization. Since there is a big difference between the error of the detail level mesh model under different resolutions and the error of the original mesh model, in order to intuitively show the optimization effect under high and low resolutions, the optimization effect under high resolution is specially shown in the upper right corner. It can be seen from Fig. 1 that under different resolutions, the method proposed in the present application can achieve good optimization effect, and the optimization effect is not affected by the resolution. Figure 2
[0090] Table 2 shows the optimization effect of the method proposed in the present application on the detail level mesh models generated by five different mesh simplification algorithms, in which MD (Mesh Decimation), PM (Progressive Meshes) and CGAL (Computational Geometry Algorithms Library) are three classic mesh simplification algorithms, and Lescoat and Liang represent two latest mesh simplification algorithms.
[0091] Table 2
[0092]
[0093] N o and N d respectively represent the number of vertices before and after simplification, using the approximation error before and after optimization Err, Err* , the ratio of the approximation error before optimization and the approximation error after optimization Err / Err / The optimization effect is evaluated as an evaluation index. As can be seen from Table 2, the method proposed in the application is not limited to a certain specific mesh simplification algorithm, and for the detail level models generated by different simplification methods, a certain optimization effect can be achieved.
[0094] Figure 3 is the convergence comparison chart of the optimization method based on sparrow-grey wolf (SSA-GWO) of the application, sparrow search algorithm (SSA) and grey wolf optimization algorithm (GWO) for Chair, Pig and Teddy three kinds of mesh models. From Figure 3 It can be known that the sparrow search algorithm SSA can quickly find a vertex set with smaller error than the given detail level mesh error, which shows that its global exploration ability and solving efficiency are particularly excellent, but the population diversity decreases in the later iteration. The grey wolf optimization algorithm GWO has good local exploration ability and optimization performance, but the convergence speed is slow. The optimization method based on sparrow-grey wolf SSA-GWO of the application can make up for the respective shortcomings of SSA and GWO, and can fully exert the global exploration ability of SSA and the local exploration ability of GWO.
[0095] Table 3
[0096]
[0097] Table 3 shows the minimum approximation error Min and average approximation error Avg of the optimization method based on sparrow-grey wolf (SSA-GWO) of the application, sparrow search algorithm (SSA) and grey wolf optimization algorithm (GWO) for mesh model approximation problem. As can be known from Table 3, the minimum error and average error of the optimization method based on sparrow-grey wolf SSA-GWO of the application are obviously smaller than those of the other two optimization algorithms.
[0098] Figure 4 The visual quality effect before and after optimization of the method proposed in the application is shown, the perception-driven evaluation matrix MSDM2 is used as the fitness evaluation function, and the deformation degree of each vertex relative to the original mesh model is drawn, and the deeper the color, the greater the deformation degree. As can be seen from the deformation chart, the method proposed in the application can avoid large deformation and improve the visual quality.
[0099] The specific embodiments described herein are merely illustrative of the spirit of the application. Various modifications or changes in the specific embodiments described herein can occur to those skilled in the art to which the application pertains without departing from the spirit of the application, and it is understood that such modifications or changes are to be considered as within the scope of the application as defined by the appended claims.
Claims
1. A method for level-of-detail mesh model approximation based on approximate global optimization, characterized in that, The method comprises the following steps: Step 1, a preliminary simplification is performed on an arbitrary original three-dimensional mesh model by using a simplified algorithm to obtain a detail level mesh model with less vertices and facets; Step 2, the movable range of each point of the detail level mesh model in step 1 is calculated; The movable range of each point is calculated using the variable geometry space of the nearest neighbor point, for a vertex of a level of detail mesh model its variable geometry space based on the nearest neighbor point is defined as: (1) wherein, represents the movable range of each point, is v a set of neighboring points within the neighborhood, is a neighboring point in , , are in x axis, y axis, z axis direction; Step 3, a sparrow-grey wolf optimization algorithm with collaborative learning is constructed by combining the global exploration ability of the sparrow algorithm and the local exploration ability of the grey wolf algorithm; Step 3.1, randomly initialize the population within the movable range of the vertex, each individual in the population is a set of possible vertex positions, the position of the first individual in the population is recorded as i ; ; Step 3.2, in the global search stage, the producer, follower, detection and early warning mechanism in the sparrow algorithm is used to update the vertex position; Step 3.3, the optimal solution found by the sparrow algorithm is taken as the initial solution of the grey wolf algorithm The wolf continues to guide the search; Step 3.4, in the local search stage, the hunting and hunting mechanism of the grey wolf algorithm is used to update the vertex position; Step 4, in the case of preserving the facet structure of the detail level mesh model, the sparrow-grey wolf optimization algorithm is used to globally optimize all vertices of the detail level mesh so as to approach the original mesh model; The global optimization problem is modeled as follows: given the original 3D mesh model And the simplified level of detail model In the noodle set Searching for the optimal vertex set while keeping the structure unchanged. , making and The error is minimized: (12) In the formula, V F respectively represent the vertex set and the face set of the corresponding mesh model, indicates the fitness function, and the calculation is as follows: (13) wherein represents the shortest distance from a point p to a model M , denotes p the Euclidean distance between .
2. The level-of-detail mesh model approximation method based on approximate global optimization of claim 1, wherein: The producer in step 3.2 refers to individuals with fitness values less than a set threshold in the population, and the position updating formula is: (2) In the formula, , Indicates the first t, t+ The first iteration of the population i The location of each individual Indicates the maximum number of iterations. It is a uniformly random number. Q Let be a random number that follows a normal distribution. L for A matrix of all ones, To simplify the number of vertices in the model, R This is the current warning value. ST It is a preset safety threshold.
3. The level-of-detail mesh model approximation method based on approximate global optimization of claim 2, wherein: The follower in step 3.2 refers to other individuals in the population except the producer, and the position updating formula is: (3) In the formula, , Indicates the first t, t+ The first iteration of the population i The location of each individual; and It is both the worst and the best position at present; Q is a random number that follows a normal distribution; n is the number of individuals in the population; A represents the number of vertices in the simplified model; A is... A matrix, where each element is randomly assigned either 1 or -1; L for A matrix of all ones.
4. The level-of-detail mesh model approximation method based on approximate global optimization of claim 3, wherein: The detection and early warning mechanism in step 3.2 is that a certain proportion of producers and followers can feel danger in advance, and their positions are updated again as follows: (4) wherein , denotes the position of the i-th individual in the population of the j-th iteration, t, t+ 1, x (i) is the position of the i-th individual in the population of the j-th iteration, i 1, x (i) is the position of the i-th individual in the population of the j-th iteration, 1, x (i) is the position of the i-th individual in the population of the j-th iteration, 1, x (i) is the position of the i-th individual in the population of the j-th iteration, 1, x (i) is the position of the i-th individual in the population of the j-th iteration, 1, x (i) is the position of the i-th individual in the population of the j-th iteration, i 1, x (i) is the position of the i-th individual in the population of the j-th iteration, 1, x (i) is the position of the i-th individual in the population of the j-th iteration, 1, x (i) is the position of the i-th individual in the population of the j-th iteration, 1, x (i) is the position of the 5. The level-of-detail mesh model approximation method based on approximate global optimization of claim 1, wherein: The optimal solution of the sparrow algorithm in step 3.3 is the vertex position set with the minimum fitness value.
6. The level-of-detail mesh model approximation method based on approximate global optimization of claim 1, wherein: Step 3.4 When the gray wolves are looking for prey, they will gradually form a circle around the prey target to 、 and The position of the wolf is guided, 、 and The wolf is the three individuals with the smallest fitness value in the population, and the position is updated: (5) (6) (7) (8) (9) (10) (11) wherein, denotes the position of the gray wolf of the t+ 1st iteration, , , are the positions of the other wolves of the t th iteration , and wolf, denotes the position of the gray wolf of the t th iteration, , and are the distances of the other wolves to , and wolf, A1, A2, A3 and C1, C2, C3 are all coefficient vectors.
Citation Information
Patent Citations
Three-dimensional grid model simplification method and system based on optimized feature preservation
CN111667565A
Optimization method based on improved sparrow search algorithm
CN112990419A