CN115994393A - Fitting degree driven clothing CAD plate multi-constraint self-adaptive adjustment optimization method - Google Patents
Fitting degree driven clothing CAD plate multi-constraint self-adaptive adjustment optimization method Download PDFInfo
- Publication number
- CN115994393A CN115994393A CN202211396172.6A CN202211396172A CN115994393A CN 115994393 A CN115994393 A CN 115994393A CN 202211396172 A CN202211396172 A CN 202211396172A CN 115994393 A CN115994393 A CN 115994393A
- Authority
- CN
- China
- Prior art keywords
- grid
- point
- plate
- cad
- coordinates
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The existing CAD plate adjusting method can only ensure the size of the clothing and can not ensure the deviation design of the whole shape of the clothing plate, or can not ensure the polygon structure of the two-dimensional plate after parameterization and can not carry out automatic repeated iterative modification, and the transformation from the grid to the plate is needed to cause the distortion of data. A fit-driven garment CAD plate multi-constraint self-adaptive adjustment optimization method is provided. According to the method, the side length and the angle of the two-dimensional plate are directly used as target parameters, the side length of the simulated grid and the original angle of the plate are considered according to the constraint condition of the polygonal shape, so that the generated new plate can be more matched with a human body model, the shape of the plate is more consistent with that of the original plate designed by a designer, and the grid is not required to be converted into the plate secondarily. Meanwhile, the method can add symmetrical constraint according to angles and side lengths, so that the generated cloth sheet meets the symmetrical requirement.
Description
Technical Field
The invention belongs to the field of computer aided design, and particularly relates to a fit-driven clothing CAD plate multi-constraint self-adaptive adjustment optimization method.
Technical Field
Today, as the demand in the apparel industry increases, there is an increasing demand for computer aided apparel design. On the one hand, the real clothing field needs more personalized clothing design, which brings impact to the traditional clothing design mode, and the virtual clothing design can more conveniently and rapidly realize the personalized design requirement of each person. On the other hand, the design of virtual characters such as movies and games also puts great demands on the clothing design of the virtual characters.
Garment design is an interactive process involving multiple modifications to the CAD plate. Making such mannequin-compliant garment panels is a particularly tedious task for the garment designer who is required to continually modify the shape of the panels by observing the effects of the three-dimensional simulation. Such modifications rely on the experience of the garment designer, and for a large number of design requirements, such methods rely on the designer's experience to waste a great deal of time on fit matching, allowing the designer less time to perform creative work.
In recent years, many studies have focused on a method for automatically adjusting the fit of a plate. The main method is to adjust the size and the side length of the plate by the result of physical simulation wearing, and judge whether the length of the corresponding CAD plate needs to be increased according to the stretching degree of each side in the simulation process. The method can quickly obtain the CAD plate meeting the fit requirement, but does not consider the integral deformation constraint of the clothing, so that the shape change of the modified plate is relatively large compared with that of the original plate, the shape of the generated plate can be changed into another shape in the iterative process, and the original shape is deviated from the design purpose more greatly, and the plate needs to be redesigned. Another method is to directly parameterize the simulated three-dimensional grid into a two-dimensional grid, directly generating the two-dimensional grid. This approach has the advantage of being more closely matched to the three-dimensionally modeled plate. However, the clothing grid is generated by two-dimensional plate gridding during simulation, the grid generated by a parameterization method cannot be directly used for modifying the two-dimensional plate, or the data of the grid need to be extracted and modified, and the transformation in the grid can also cause the distortion of the data, so that the generated plate has poor fit.
A method of adaptively modifying a plate according to a virtual wearing effect of a garment is presented herein. The method directly uses the side length and the angle of the two-dimensional plate as target parameters, and does not need the transformation from the grid to the plate. According to the method, according to the characteristic of taking the polygon as a constraint condition, the side length of the simulated grid and the original angle of the plate are considered, so that the generated new plate can be more matched with the human body model, and the shape of the plate is more consistent with the original plate designed by a designer. Meanwhile, the method can add symmetrical constraint according to angles and side lengths, so that the generated cloth sheet meets the symmetrical requirement.
Disclosure of Invention
Aiming at the defects of the existing clothing self-adaption method, the invention provides a clothing plate self-adaption fitting simulation wearing human body method based on angles and side lengths. The method can make the fit of the clothing plate higher under the condition of keeping the original shape of the CAD plate as much as possible. According to the symmetry requirement of the plate, symmetry constraint can be added to the plate, so that the generated plate is symmetrical.
The invention provides a fit-driven clothing CAD plate multi-constraint self-adaptive adjustment optimization method, which comprises the following steps:
step 1, gridding a CAD plate:
the CAD plate consists of n two-dimensional control points p i (u i ,v i ) And an annular structure formed by edges between two adjacent control points, wherein the edges comprise straight edges and curved edges, the curved edges are represented by multi-section lines, and the multi-section lines are formed by a plurality of curve control points cp (u, v) and straight edges between the points;
the coordinate sequence of the control points of the CAD plate is converted into a grid composed of a plurality of triangles through a Delaulay triangulation process to be used as an original grid, wherein the original grid comprises: the method comprises the steps of (1) coordinates of each point in a grid and a topological structure, wherein the topological structure is a coordinate index of each triangle, and m particles and t triangles are arranged in the original grid;
step 2, evaluating the fit degree of the clothing;
the method comprises the steps of adopting a spring particle model to simulate and run an original grid onto a collision model of a human body shape, outputting a simulated grid with the same topological structure as the original grid, and obtaining the position coordinate of each point on the grid after the operation is finished, wherein the position coordinate is used as the coordinate of the grid after the simulation is finished;
solving the area of each triangle on the original grid and the simulated grid by a vector cross multiplication modulus method, respectively summing the areas of each triangle on the original grid and the simulated grid to obtain the surface area of the original grid and the surface area of the simulated grid, dividing the surface area of the original grid and the surface area of the simulated grid to obtain a surface area stretching ratio, setting a stretching expected threshold value, judging the fit degree of the garment according to the difference between the surface area stretching ratio and the stretching expected threshold value,
when the surface area stretching ratio is smaller than the stretching expected threshold value, the step 3 is entered
Step 3, processing the data of the grid after simulation
The control points (p 1 ,p 2 …p n ) The method comprises the following steps of: from the angle θ (θ 1 ,θ 2 …θ n ) And a side length of each side l (l 1 ,l 2 …l n ) A set of components (θ, l); the method comprises the steps of carrying out a first treatment on the surface of the The specific transformation mode is as follows;
l i =||p i p next(i) ||
next(i)=(i+1)mod n
pre(i)=(i-1+n)mod n
the coordinates representing each control point p by (θ, l) are expressed as:
calculating a target angle according to the data of the grid after simulation and the angle of the CAD plateAnd length->/>
The target angle and side length are as follows:
e is the edge length of the corresponding plate edge on each triangle corresponding to the current CAD plate edge on the grid after simulation;
for the processing of CAD edges set as curves, replacing the corresponding curves with straight lines between control points;
for each point j on the curve of the ith CAD side, it is calculated as two scale values,representing the vector from the start control point to the current point at point p i To p nrxt(i) Length and side length l of projection on vector of (2) i Ratio of->Representing from the current point to p i To p next(i) Distance and side length l of vector of (2) i The ratio of the lengths of (2):
the coordinates of each control node in the curve are expressed as:
by p i And p next(i) Representing the first control point coordinate and the last control point coordinate of the curve, and calculating a unit vector perpendicular to the line segment of the control point according to the control point coordinatesLength of control point segment l i ;
For the target length of the curve edge, corresponding proportional conversion is carried out according to the straight line edge:
recording symmetry information, finding the corresponding symmetry angle and side length of the CAD plate containing the symmetry information according to the information of the symmetry point, and finding the symmetry point p i And p j Angular and side length constraints:
θ i =θ j
l i =l pre(j)
l pre(i) =l j
Step 4, constructing an optimization problem equation
4.1 setting an optimization target:
the target to be obtained is the internal angle set theta of CAD plate points res And the length set l of each edge of the CAD plate res ;
According to the target length and angle to be optimized, an optimization target is constructed as follows:
α+β=1.0,α,β≥0
determining whether the optimization target tends to keep the shape or the size by setting parameters of the normalization parameters α and β;
4.2, constraint conditions are set:
setting an angle constraint according to the internal angle and theorem of the polygon:
according to the sealing characteristic of the CAD plate, the coordinates of the n+1th point of the CAD plate are overlapped with the coordinates of the first point, and an initial point p is set 1 (u 1 ,v 1 ) Coordinates (0, 0), coordinate value constraints are set:
for the symmetrical constraint of the CAD plate, let the equal angle logarithm be s, the equal edge logarithm be d, and set the constraint that the angle and the edge length of each pair are equal as follows:
and->Index representing the i-th pair of symmetrical angles iota 1 (i) And iota (iota) 2 (i) An index representing an ith pair of symmetric edges;
step 5, calculating the optimization problem
5.1 converting the optimization problem constructed in step 4 into an augmented objective function using a lagrangian multiplier method;
5.2 calculating the augmentation objective function by Newton's method to obtain a result set of the optimization problem, wherein the result set comprises: CAD plate angle and side length set (θ) corresponding to polygon res ,l res );
Step 6, restoring the coordinates of each control point of the CAD plate according to the angles and the side lengths of the corresponding polygons of the CAD plate obtained by the optimization equation in step 5
And 7, updating the coordinates x of each point in the original grid corresponding to the CAD plate, and returning to the step 2.
Preferably, the step 2 specifically includes the following substeps:
generating an octree structure OT of the human body collision model based on an octree method, wherein the octree structure OT represents whether a square space is inside or outside the human body collision model, if not, the current octree structure OT is continuously subdivided into 8 sub octree structures OT so as to respectively represent 8 sub square spaces equally divided by the current square space, and then continuously judging whether the current space is inside or outside the human body collision model; setting a subdivision depth maximum value OT_MAX, stopping subdivision if the subdivision depth reaches OT_MAX, and setting the current OT to be in the human body collision model.
Wherein each octree structure OT contains the maximum and minimum coordinates x of its spatial extent max ,x min A judgment value isin e (true, unknown) whether or not inside the model, and 8 sub octree structures OT if isin=unknown;
an initial octree structure OT is set, wherein all coordinates on a human body collision model are x min And x max Between them;
the specific steps of outputting the simulated grid with the same topological structure as the original grid by adopting the spring particle model include:
for each particle of the simulated grid in three dimensions, its motion behavior is calculated:
is the acceleration of the particle, +.>Is the velocity of each particle, x ε R 3m Is the three-dimensional coordinate of the grid, M epsilon R 3m×3m Is a quality matrix, f.epsilon.R 3m Is based on the position x and the speed of each point>The force of the mass point is calculated;
definition t 0 The position and speed of the moment are x respectively 0 =x(t 0 ),The position change amount and the speed change amount after the time h are Δx=x (t 0 +h)-x(t 0 ),/>
the force f taylor is spread and first order approximated:
the finishing gives Δv independent of Δx:
describing the energy of each particle on the grid by using a scalar potential energy function E (x), and customizing a plurality of local energy functions C (x) E R with the target quantity of 0 3n To define the energy E of its local system i (x) Correlating the energy function with C (x), where k is a stiffness constant;
the force to which each particle i is energy constrained is expressed as:
let f i The derivative of point j is K ij
For each particle x of the grid in three dimensions i ∈R 3 Calculating the movement behavior of the robot; describing the kinematic behaviour of a triangular mesh using a potential energy function E (x), the force generated by the potential energy being
Decomposing the motion behavior of the mesh into a plurality of potential energy functions:
E(x)=∑ δ E δ (x)
each E δ Forming a local system by the related grid points;
the tensile force function of each triangle in the mesh is expressed as:
Δx 1 =x j -x i ,Δx 2 =x k -x i ,u,x
i, j, k are numbers of three vertexes of the triangle, u, v represent (u, v) coordinates on the original two-dimensional grid of the grid;
the shear force function against bending is:
C(x)=w u (x) T w v (x)
the damping force depends on the speed of the points, and the damping force potential energy of the points on the triangular mesh is as follows:
ζ is the damping coefficient;
the force potential energy of the self-defined fixed point is as follows:
ψ i is the magnitude of the force applied to the point i, x target Is the position of the coordinates where the x point is fixed;
Detection of a new Point x by OT i Whether or not the position of (c) is within the human collision model:
searching from the initial OT, if the point is located in the current OT with isin=unknown, finding x in the OT min ≤x≤x max Starting judgment of sub OT;
if isin=false, skip the step;
if isin=true, x is calculated from the cube space plane otf traversed by the particle i Symmetry point to otf face
Applying a reverse potential energy function for the next iteration, the reverse potential energy function being:
recording the total energy e contained in the garment in each simulated time step h, stopping the simulation process when e < epsilon, and starting to judge the fit index of the garment according to the simulation result, wherein the threshold epsilon represents the optimized precision; outputting the final position x of the simulation grid;
calculating the area of each triangle in the simulation grid by a vector cross multiplication modulus method, wherein the area of the ith triangle is a i Summing to obtain the surface area of the simulation grid;
calculating the area of each triangle in the original state of the original grid as a 'by a vector cross multiplication modulus method' i Summing to obtain the surface area of the original grid;
calculating the fit evaluation pvalue of the garment according to the surface area stretching ratio, wherein the fit evaluation pvalue is as follows:
setting a stretching expected threshold value o, when the fit evaluation pvalue is smaller than the set threshold value o, performing step 3, and when the fit evaluation p is not smaller than the set threshold value o, outputting the current CAD plate.
Preferably, in the step 5, the augmentation objective function is:
the specific form is as follows:
preferably, the step 6 specifically includes the following steps:
6.1 importing the coordinates p of the first control point of the CAD plate 1 (u 1 ,v 1 ) And an angle θ of the first side with respect to the u-axis start The initial position of the first point and the initial direction of the first edge of the updated CAD plate are used as the initial position of the first point and the initial direction of the first edge of the updated CAD plate;
the coordinates of the first point are set to the coordinates of the first point of the new CAD plate result:
6.2 updating the positions of the remaining n-1 points, wherein the updating formula is as follows:
updating control point set coordinates p (u) of CAD plate res ,v res );
6.3 reduction of the treatment curves for each point cp on each curve i,j There is an update formula:
preferably, in the step 7, the positive mean coordinate PMVC method is adopted to update the coordinates of each point in the original grid corresponding to the CAD plate.
The invention has the substantial effects that on the basis of ensuring the fit degree of the plate of the clothing, the shape of the plate is more in line with the initial shape designed by a designer, the workload of the designer for manually adjusting again due to overlarge deformation of the plate caused by self-adaptive plate adjustment is reduced, meanwhile, the symmetrical effect of the plate can be ensured, and the complicated work of the designer for adjusting the symmetry of the plate by himself is further reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings is provided below, and some specific examples of the present invention will be described in detail below by way of example and not by way of limitation with reference to the accompanying drawings. The same reference numbers will be used throughout the drawings to refer to the same or like parts or portions. It will be appreciated by those skilled in the art that the drawings are not necessarily drawn to scale. In the accompanying drawings:
FIG. 1 is a flow chart of the present invention
FIG. 2 is a CAD plate and its corresponding grid pattern
FIG. 3 is a diagram showing the simulated wearing effect of a garment grid
FIG. 4 is an effect diagram of a garment with a grid of fixed edges
FIG. 5 is a diagram of edge length and angle definitions in a CAD plate
FIG. 6 is a diagram of a method of processing a curve on a CAD plate
FIG. 7 is a simulation effect diagram of a CAD plate before optimization and its corresponding grid
FIG. 8 is a graph showing a CAD plate before and after optimization
FIG. 9 is an effect diagram of a grid update after CAD plate update
FIG. 10 is a graph showing the effect of the clothing wear after the mesh is updated
The specific embodiment is as follows:
in order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
As shown in fig. 1, a fit-driven clothing CAD plate multi-constraint self-adaptive adjustment optimization method specifically comprises the following steps:
step 1, gridding a CAD sheet bar:
the CAD sheet is formed by a two-dimensional control point p i (u i ,v i ) And an edge between two adjacent control points, wherein the edge comprises a straight line edge and a curve edge, wherein the curve edge is represented by a multi-section line, and the multi-section line is composed of a plurality of curve control points cp (u, v) and straight edges between the points. The CAD plate has n control points in total;
converting a coordinate sequence of a CAD plate control point into a grid consisting of a plurality of triangles through a Delaulay triangulation process, wherein the grid is used as an original grid and comprises the following steps: the coordinates of each point in the grid and the topological structure, wherein the topological structure is the coordinate index of each triangle, and the grid has m particles and t triangles.
The CAD plate and its corresponding grid are shown in fig. 2.
And 2, evaluating the fit degree of the clothing.
Generating an octree structure OT of the human body collision model based on the octree method, wherein the OT represents whether a square space is inside or outside the human body model, if the square space is not judged, the current OT is continuously subdivided into 8 sub-square spaces of which the 8 sub-OTs respectively represent the equal division of the current square space, and then continuously judging whether the current space is inside or outside the model. The simulated display space is taken as the initial OT. Setting a subdivision depth maximum value OT_MAX, stopping subdivision if the subdivision depth reaches OT_MAX, and setting the current OT to be in the model.
Each OT contains the maximum and minimum coordinates x of its spatial extent max ,x min A judgment value isin e (true, false, unknown) of whether or not inside the model and 8 sub OTs if isin=unknown.
And (3) using a spring particle model to simulate and run the original grid on a collision model with a human body shape, and outputting a simulated grid with the same topological structure as the original grid.
The spring mass point model is a structure with a grid as mass points and a plurality of springs between the mass points, and the sides of the triangle of the grid are used as springs to keep the stretching property of the whole grid. The human body collision model is to divide the simulation space by octree, and cut the octree tree structure of the human body model to judge whether the grid is inside or outside the human body.
For each particle of the simulated grid in three dimensions, its motion behavior is calculated:
is the acceleration of the particle, +.>Is the velocity of each particle, x ε R 3m Is the three-dimensional coordinate of the grid, M epsilon R 3m×3m Is a quality matrix, f.epsilon.R 3m Is based on the position x and the speed of each point>The force of the particle was determined.
Definition t 0 The position and speed of the moment are x respectively 0 =x(t 0 ),The position change amount and the speed change amount after the time h are Δx=x (t 0 +h)-x(t 0 ),/>
spreading the force f Taylor and performing a first order approximation
the finishing gives Δv independent of Δx:
describing the energy of each particle on the grid by using a scalar potential energy function E (x), and customizing a plurality of local energy functions C (x) E R with the target quantity of 0 3n To define the energy E of its local system i (x) The energy function is related to C (x), where k is a stiffness constant.
The force to which each particle i is energy constrained is expressed as:
let f i The derivative of point j is K ij
For each particle x of the grid in three dimensions i ∈R 3 The locomotor activity was calculated. Describing the kinematic behaviour of a triangular mesh using a potential energy function E (x), the force generated by the potential energy being
Decomposing the motion behavior of the mesh into a plurality of potential energy functions:
E(x)=∑ δ E δ (x)
each E δ A local system is formed by the associated grid points.
The tensile force function of each triangle in the mesh is expressed as:
Δx 1 =x j -x i ,Δx 2 =x k -x i ,u,v
i, j, k are the numbers of the three vertices of the triangle, u, v representing the (u, v) coordinates on the original two-dimensional mesh of the mesh.
The shear force function against bending is:
c(x)=w u (x) T w v (x)
the damping force depends on the speed of the points, and the damping force potential energy of the points on the triangular mesh is as follows:
ζ is the damping coefficient.
The force potential energy of the self-defined fixed point is as follows:
ψ i is the magnitude of the force applied to the point i, x target Is the location of the coordinates where the x point is fixed.
Detection of a new Point x by OT i Whether the location of (c) is inside the model:
searching from the initial OT, if the point is located in the current OT with isin=unknown, finding x in the OT min ≤x≤x max Is started to judge the sub OT of (c).
If isin=false, skip this step.
If isin=true, x is calculated from the cube space plane otf traversed by the particle i Symmetry point to otf face
Applying a reverse potential energy function is:
for the next iteration.
The total energy e contained in the garment is recorded in each simulated time step h, when e < epsilon, the simulation process is stopped, and the fit index of the garment is judged according to the simulation result, wherein the threshold epsilon represents the optimization accuracy.
As shown in fig. 3, the effect of the simulated mesh on the human body is simulated.
As shown in fig. 4, the effect diagram after the edge is fixed by the simulation grid is shown.
Calculating the area of each triangle in the simulation grid, wherein the area of the ith triangle is a i 。
Calculating the area of each triangle in the original state of the original grid as a' i 。
Calculating fit evaluation pvalue of clothing as
Setting a fit threshold o of a garment, in this embodiment, the set o is 0.9, when the fit evaluation pvalue is smaller than the set threshold o, performing the plate self-adaptive modification flow in the step 3, and if the fit requirement is met, stopping optimization, and outputting the current CAD plate.
The value of the initial o is set to 90%. The value of o is adjusted to set the scalability desire for different plate materials.
Step 3, processing the data of the simulated clothing
The control point (p 1 ,p 2 …p n ) Is converted into a set of angles θ (θ 1 ,θ 2 …θ n ) And a side length of each side l (l 1 ,l 2 …l n ) (θ, l). The specific transformation mode is as follows.
l i =||p i p next(i) ||
next(i)=(i+1)mod n
pre(i)=(i-1+n)mod n
The coordinates representing each control point p by (θ, l) are expressed as:
converting the CAD plate into angle and length, and calculating the target angle according to the data of the simulated clothing grid and the angle of the CAD plateAnd length->
The target angle and side length are as follows:
e is the edge length of the corresponding tile edge on each triangle on the simulated mesh corresponding to the current CAD tile edge.
The correspondence between side lengths and angles in a CAD plate is shown in fig. 5.
For the processing of CAD edges set as curves, the corresponding curves are replaced by straight lines between control points, and relevant parameters of the shapes of the curves are calculated and stored. In order to ensure that the curve can keep a corresponding shape after recovery and is not influenced by the change of the length, the curve information is calculated as the proportion information. For each point j on the curve of the ith CAD side, it is calculated as two scale values,representing the vector from the start control point to the current point at point p i To p next(i) Length and side length l of projection on vector of (2) i Ratio of->Representing from the current point to p i To p next(i) Distance and side length l of vector of (2) i The ratio of the lengths of (2);
the coordinates of each control node in the curve are expressed as:
by p i And p next(i) Representing the first control point coordinate and the last control point coordinate of the curve, and calculating a unit vector perpendicular to the line segment of the control point according to the control point coordinatesLength of control point segment l i 。
For the target length of the curve edge, the conversion of corresponding proportion is carried out according to the straight line edge:
Recording symmetry information, finding the corresponding symmetry angle and side length of the CAD plate containing the symmetry information according to the information of the symmetry point, and finding the symmetry point p i And p j Angular and side length constraints:
θ i =θ j
l i =l pre(j)
l pre(i) =l j
FIG. 6 shows a method for processing a curve on a CAD plate.
Step 4, constructing an optimization problem equation
4.1 setting an optimization target:
the object to be obtained is the internal angle set theta of CAD sheet points res And the length set l of each side of the CAD sheet res 。
According to the target length and angle to be optimized, an optimization target is constructed as follows:
α+β=1.0,α,β≥0
the parameters of the normalization parameters α and β are set to decide whether the optimization objective is to tend to keep the shape or the size.
4.2, constraint conditions are set:
setting an angle constraint according to the internal angle and theorem of the polygon:
according to the sealing characteristic of the CAD plate, the coordinates of the n+1th point of the CAD plate are overlapped with the coordinates of the first point, and an initial point p is set 1 (u 1 ,v 1 ) Coordinates (0, 0), coordinate value constraints are set:
for the symmetrical constraint of the CAD plate, let the equal angle logarithm be s, the equal edge logarithm be d, and set the constraint that the angle and the edge length of each pair are equal as follows:
and->Index representing the i-th pair of symmetrical angles iota 1 (i) And iota (iota) 2 (i) Representing the index of the ith pair of symmetric edges.
Step 5, calculating the optimization problem
5.1 converting the optimization problem constructed in step 4 into an augmented objective function using Lagrangian multiplier method
The specific form is as follows:
5.2 calculating the augmentation objective function by Newton's method to obtain a result set of the optimization problem, wherein the result set comprises: CAD plate angle and side length set (θ) corresponding to polygon res ,l res );
Step 6, restoring the coordinates of each control point of the CAD plate according to the angles and the side lengths of the corresponding polygons of the CAD plate obtained by the optimization equation in step 5
6.1 importing the coordinates p of the first control point of the CAD plate 1 (u 1 ,v 1 ) And an angle θ of the first side with respect to the u-axis start As the initial position of the first point and the initial direction of the first edge of the updated CAD plate.
The coordinates of the first point are set to the coordinates of the first point of the new CAD plate result:
6.2 updating the positions of the remaining n-1 points, wherein the updating formula is as follows:
updating control point set coordinates p (u) of CAD plate res ,v res )。
6.3 reduction of the treatment curves for each point cp on each curve i,j There is an update formula:
fig. 7 is a diagram of the simulated effect of the mesh on the shape of the CAD plate before optimization.
Fig. 8 is a graph of a CAD plate before and after optimization.
And 7, updating the coordinates of each point in the original grid corresponding to the CAD plate by adopting a positive mean value coordinate PMVC method, and returning to the step 2.
Fig. 9 is an effect diagram of the CAD plate grid after updating.
Fig. 10 is a graph showing the wearing effect of the garment after mesh updating.
While the invention has been described with respect to certain preferred embodiments, it will be apparent to those skilled in the art that various changes and substitutions can be made herein without departing from the scope of the invention as defined by the appended claims.
Claims (5)
1. The fit-driven clothing CAD plate multi-constraint self-adaptive adjustment optimization method is characterized by comprising the following steps of:
step 1, gridding a CAD plate:
the CAD plate consists of n two-dimensional control points p i (u i ,v i ) And an annular structure formed by edges between two adjacent control points, wherein the edges comprise straight edges and curved edges, the curved edges are represented by multi-section lines, and the multi-section lines are formed by a plurality of curve control points cp (u, v) and straight edges between the points;
the coordinate sequence of the control points of the CAD plate is converted into a grid composed of a plurality of triangles through a Delaulay triangulation process to be used as an original grid, wherein the original grid comprises: the method comprises the steps of (1) coordinates of each point in a grid and a topological structure, wherein the topological structure is a coordinate index of each triangle, and m particles and t triangles are arranged in the original grid;
step 2, evaluating the fit degree of the clothing;
the method comprises the steps of adopting a spring particle model to simulate and run an original grid onto a collision model of a human body shape, outputting a simulated grid with the same topological structure as the original grid, and obtaining the position coordinate of each point on the grid after the operation is finished, wherein the position coordinate is used as the coordinate of the grid after the simulation is finished;
solving the area of each triangle on the original grid and the simulated grid by a vector cross multiplication modulus method, respectively summing the areas of each triangle on the original grid and the simulated grid to obtain the surface area of the original grid and the surface area of the simulated grid, dividing the surface area of the original grid and the surface area of the simulated grid to obtain a surface area stretching ratio, setting a stretching expected threshold value, judging the fit degree of the garment according to the difference between the surface area stretching ratio and the stretching expected threshold value,
when the surface area stretching ratio is smaller than the stretching expected threshold value, the step 3 is entered
Step 3, processing the data of the grid after simulation
The control points (p 1 ,p 2 …p n ) The method comprises the following steps of: from the angle θ (θ 1 ,θ 2 …θ n ) And a side length of each side l (l 1 ,l 2 …l n ) A set of components (θ, l); the method comprises the steps of carrying out a first treatment on the surface of the The specific transformation mode is as follows;
l i =||p i p next(i) ||
next(i)=(i+1)modn
pre(i)=(i-1+n)modn
the coordinates representing each control point p by (θ, l) are expressed as:
calculating a target angle according to the data of the grid after simulation and the angle of the CAD plateAnd length->
The target angle and side length are as follows:
e is the edge length of the corresponding plate edge on each triangle corresponding to the current CAD plate edge on the grid after simulation;
for the processing of CAD edges set as curves, replacing the corresponding curves with straight lines between control points;
for each point j on the curve of the ith CAD side, it is calculated as two scale values,representing the vector from the start control point to the current point at point p i To p next(i) Length and side length l of projection on vector of (2) i Ratio of->Representing from the current point to p i To p next(i) Distance and side length l of vector of (2) i The ratio of the lengths of (2):
the coordinates of each control node in the curve are expressed as:
by p i And p next(i) Representing the first control point coordinate and the last control point coordinate of the curve, and calculating a unit vector perpendicular to the line segment of the control point according to the control point coordinatesLength of control point segment l i ;
For the target length of the curve edge, corresponding proportional conversion is carried out according to the straight line edge:
recording symmetry information, finding the corresponding symmetry angle and side length of the CAD plate containing the symmetry information according to the information of the symmetry point, and finding the symmetry point p i And p j Angular and side length constraints:
θ i =θ j
l i =l pre(j)
l pre(i) =l j
Step 4, constructing an optimization problem equation
4.1 setting an optimization target:
the object to be obtained is the inner angle set of CAD plate pointsθ res And the length set l of each edge of the CAD plate res ;
According to the target length and angle to be optimized, an optimization target is constructed as follows:
α+β=1.0,α,β≥0
determining whether the optimization target tends to keep the shape or the size by setting parameters of the normalization parameters α and β;
4.2, constraint conditions are set:
setting an angle constraint according to the internal angle and theorem of the polygon:
according to the sealing characteristic of the CAD plate, the coordinates of the n+1th point of the CAD plate are overlapped with the coordinates of the first point, and an initial point p is set 1 (u 1 ,v 1 ) Coordinates (0, 0), coordinate value constraints are set:
for the symmetrical constraint of the CAD plate, let the equal angle logarithm be s, the equal edge logarithm be d, and set the constraint that the angle and the edge length of each pair are equal as follows:
and->Index representing the i-th pair of symmetrical angles iota 1 (i) And iota (iota) 2 (i) An index representing an ith pair of symmetric edges;
step 5, calculating the optimization problem
5.1 converting the optimization problem constructed in step 4 into an augmented objective function using a lagrangian multiplier method;
5.2 calculating the augmentation objective function by Newton's method to obtain a result set of the optimization problem, wherein the result set comprises: CAD plate angle and side length set (θ) corresponding to polygon res ,l res );
Step 6, restoring the coordinates of each control point of the CAD plate according to the angles and the side lengths of the corresponding polygons of the CAD plate obtained by the optimization equation in step 5
And 7, updating the coordinates x of each point in the original grid corresponding to the CAD plate, and returning to the step 2.
2. The fit-driven garment CAD plate multi-constraint adaptive adjustment optimization method of claim 1, wherein step 2 specifically comprises the sub-steps of:
generating an octree structure OT of the human body collision model based on an octree method, wherein the octree structure OT represents whether a square space is inside or outside the human body collision model, if not, the current octree structure OT is continuously subdivided into 8 sub octree structures OT so as to respectively represent 8 sub square spaces equally divided by the current square space, and then continuously judging whether the current space is inside or outside the human body collision model; setting a subdivision depth maximum value OT_MAX, stopping subdivision if the subdivision depth reaches the OT_MAX and setting the current OT to be in the human body collision model;
wherein each octree structure OT contains the maximum and minimum coordinates x of its spatial extent max ,x min A judgment value isin e (true, unknown) whether or not inside the model, and 8 sub octree structures OT if isin=unknown;
an initial octree structure OT is set, wherein all coordinates on a human body collision model are x min And x max Between them;
the specific steps of outputting the simulated grid with the same topological structure as the original grid by adopting the spring particle model include:
for each particle of the simulated grid in three dimensions, its motion behavior is calculated:
is the acceleration of the particle, +.>Is the velocity of each particle, x ε R 3m Is the three-dimensional coordinate of the grid, M epsilon R 3m×3m Is a quality matrix, f.epsilon.R 3m Is based on the position x and the speed of each point>The force of the mass point is calculated;
definition t 0 The position and speed of the moment are x respectively 0 =x(t 0 ),The position change amount and the speed change amount after the time h are Δx=x (t 0 +h)-x(t 0 ),/>
the force f taylor is spread and first order approximated:
the finishing gives Δv independent of Δx:
using scalar potential energy function E (x) to describe the energy of each particle on a gridCustomizing a plurality of local energy functions C (x) E R with target quantity of 0 3n To define the energy E of its local system i (x) Correlating the energy function with C (x), where k is a stiffness constant;
the force to which each particle i is energy constrained is expressed as:
let f i The derivative of point j is K ij
For each particle x of the grid in three dimensions i ∈R 3 Calculating the movement behavior of the robot; describing the kinematic behaviour of a triangular mesh using a potential energy function E (x), the force generated by the potential energy being
Decomposing the motion behavior of the mesh into a plurality of potential energy functions:
E(x)=∑ δ E δ (x)
each E δ Forming a local system by the related grid points;
the tensile force function of each triangle in the mesh is expressed as:
Δx 1 =x j -x i ,Δx 2 =x k -x i ,u,v
i, j, k are numbers of three vertexes of the triangle, u, v represent (u, v) coordinates on the original two-dimensional grid of the grid;
the shear force function against bending is:
C(x)=w u (x) T w v (x)
the damping force depends on the speed of the points, and the damping force potential energy of the points on the triangular mesh is as follows:
ζ is the damping coefficient;
the force potential energy of the self-defined fixed point is as follows:
ψ i is the magnitude of the force applied to the point i, x target Is the position of the coordinates where the x point is fixed;
Detection of a new Point x by OT i Whether or not the position of (c) is within the human collision model:
searching from the initial OT, if the point is located in the current OT with isin=unknown, finding x in the OT min ≤x≤x max Starting judgment of sub OT;
if isin=false, skip the step;
if isin=true, x is calculated from the cube space plane otf traversed by the particle i Symmetry point to otf face
Applying a reverse potential energy function for the next iteration, the reverse potential energy function being:
recording the total energy e contained in the garment in each simulated time step h, stopping the simulation process when e < epsilon, and starting to judge the fit index of the garment according to the simulation result, wherein the threshold epsilon represents the optimized precision; outputting the final position x of the simulation grid;
calculating the area of each triangle in the simulation grid by a vector cross multiplication modulus method, wherein the area of the ith triangle is a i Summing to obtain the surface area of the simulation grid;
calculating the area of each triangle in the original state of the original grid as a 'by a vector cross multiplication modulus method' i Summing to obtain the surface area of the original grid;
calculating the fit evaluation pvalue of the garment according to the surface area stretching ratio, wherein the fit evaluation pvalue is as follows:
setting a stretching expected threshold value o, when the fit evaluation pvalue is smaller than the set threshold value o, performing step 3, and when the fit evaluation p is not smaller than the set threshold value o, outputting the current CAD plate.
4. the fit-driven garment CAD plate multi-constraint adaptive adjustment optimization method of claim 3, wherein the step 6 specifically comprises the steps of:
6.1 importing the coordinates p of the first control point of the CAD plate 1 (u 1 ,v 1 ) And an angle θ of the first side with respect to the u-axis start The initial position of the first point and the initial direction of the first edge of the updated CAD plate are used as the initial position of the first point and the initial direction of the first edge of the updated CAD plate;
the coordinates of the first point are set to the coordinates of the first point of the new CAD plate result:
6.2 updating the positions of the remaining n-1 points, wherein the updating formula is as follows:
updating control point set coordinates p (u) of CAD plate res ,v res );
6.3 reduction of the treatment curves for each point cp on each curve i,j There is an update formula:
5. the fit-driven garment CAD plate multi-constraint adaptive adjustment optimization method according to claim 1, wherein in step 7, the positive mean coordinate PMVC method is adopted to update the coordinates of each point in the original grid corresponding to the CAD plate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211396172.6A CN115994393A (en) | 2022-11-09 | 2022-11-09 | Fitting degree driven clothing CAD plate multi-constraint self-adaptive adjustment optimization method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211396172.6A CN115994393A (en) | 2022-11-09 | 2022-11-09 | Fitting degree driven clothing CAD plate multi-constraint self-adaptive adjustment optimization method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115994393A true CN115994393A (en) | 2023-04-21 |
Family
ID=85994429
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211396172.6A Pending CN115994393A (en) | 2022-11-09 | 2022-11-09 | Fitting degree driven clothing CAD plate multi-constraint self-adaptive adjustment optimization method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115994393A (en) |
-
2022
- 2022-11-09 CN CN202211396172.6A patent/CN115994393A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107067473B (en) | Method, device and system for reconstructing 3D modeling object | |
US8190412B2 (en) | Method of simulating deformable object using geometrically motivated model | |
US7872654B2 (en) | Animating hair using pose controllers | |
Chao et al. | Realistic data-driven traffic flow animation using texture synthesis | |
US10163243B2 (en) | Simulation of hair in a distributed computing environment | |
Plante et al. | A layered wisp model for simulating interactions inside long hair | |
US9519988B2 (en) | Subspace clothing simulation using adaptive bases | |
Holden et al. | Learning an inverse rig mapping for character animation | |
JP7294788B2 (en) | Classification of 2D images according to the type of 3D placement | |
Moustakas et al. | SQ-Map: Efficient layered collision detection and haptic rendering | |
Sieger et al. | A comprehensive comparison of shape deformation methods in evolutionary design optimization | |
KR101775836B1 (en) | 3D character operation Implementation method using the plug-in program for converting the 3D characters movement | |
CN112512755A (en) | Robotic manipulation using domain-invariant 3D representations predicted from 2.5D visual data | |
JP2021131854A (en) | Basic learning of deformation | |
Holden et al. | Learning inverse rig mappings by nonlinear regression | |
CN114387462A (en) | Dynamic environment sensing method based on binocular camera | |
CN110176063B (en) | Clothing deformation method based on human body Laplace deformation | |
Angelidis et al. | Sweepers: Swept user-defined tools for modeling by deformation | |
Vyatkin et al. | Real-time deformations of function-based surfaces using perturbation functions | |
US20210406432A1 (en) | Calculation method, medium and system for real-time physical engine enhancement based on neural network | |
US7256787B2 (en) | Method to imitate lifelike images for computer deformed objects | |
JP2881389B2 (en) | Automatic mesh generation method and system | |
JP2603902B2 (en) | Automatic mesh generation method and system | |
CN115994393A (en) | Fitting degree driven clothing CAD plate multi-constraint self-adaptive adjustment optimization method | |
CN114841079A (en) | Continuous collision detection method based on deep neural network optimization |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |