Self-adaptive anisotropic cloth simulation method and system based on position dynamics, electronic equipment and storage medium
By adopting an adaptive anisotropic cloth simulation method based on positional dynamics in computer graphics physical simulation, the problem of low computing efficiency and difficulty in balancing the realism of cloth simulation in the existing technology is solved, and efficient and realistic cloth simulation is achieved. animation.
Patent Information
- Application Number
- CN202411558135.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-11-04
AI Technical Summary
The prior art is difficult to accurately capture the mechanical properties of fabrics in all directions, and the computational efficiency is low, making it difficult to take into account both the reality of fabric simulation animation and the simulation efficiency.
An adaptive anisotropic cloth simulation method based on positional dynamics is used to form non-uniform various cloth meshes by constructing the original cloth mesh, applying external forces, performing iterative parallel calculations of strain constraints, and refining or coarsening the mesh according to the degree of deformation. Anisotropic cloth mesh.
It improves the computational efficiency of cloth simulation, can accurately reproduce the mechanical properties of cloth in different directions, improves the realism of simulation animation, and finds a better balance solution in scenarios with limited computing performance.
Smart Images

Figure CN119313784A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer graphics physical simulation, and relates to a method, system, electronic equipment and storage medium for simulating an adaptive anisotropic cloth based on position dynamics. Background Art
[0002] In reality, cloth often exhibits anisotropic properties, which means that it stretches and bends differently in different directions, increasing the diversity of surface wrinkles. Accurately capturing the mechanical properties of cloth in all directions requires a huge amount of calculations and requires a very fine triangular mesh representation of the cloth.
[0003] The accuracy and stability of the cloth simulation algorithm largely determine the computational efficiency of the cloth simulation. On the other hand, the efficiency of the cloth simulation algorithm largely determines the highest resolution that can be achieved by real-time cloth simulation, and the cloth mesh resolution determines the richness and realism of the simulated cloth movement details. It can be seen that the above two points are complementary. With the development of graphics hardware computing performance, improving the expressiveness of physical models on cloth behavior characteristics and the solving efficiency of simulation algorithms, further enhancing the realism of cloth simulation animations, and finding a better balance between the realism of cloth simulation animations and simulation efficiency in scenarios with limited computing performance are still issues that need to be studied and solved. Summary of the invention
[0004] In view of this, an object of the present invention is to provide an adaptive anisotropic cloth simulation method, system, electronic device and storage medium based on position dynamics.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] An adaptive anisotropic cloth simulation method based on position dynamics, the method comprising the following steps:
[0007] The original cloth mesh is constructed using the constitutive model, physical quantities are added to the mesh nodes, the three-dimensional spatial coordinates and two-dimensional mapping of the original cloth mesh nodes are obtained, mesh edges and mesh triangles are constructed according to adjacent nodes, the topological relationship between mesh nodes, edges and triangles is calculated, and a set of points, edges and faces is formed based on the nodes;
[0008] According to Newton's law, external force is applied to the cloth grid, and the coordinate matrix of the grid points, edges and faces is used to form a linear system. The conjugate gradient method is used to solve the coordinate change of the cloth grid under the action of external force;
[0009] The graph coloring method is used to decouple the data dependency of the grid. The position dynamics method is used to perform iterative parallel calculation of strain constraints according to the changing coordinates to obtain the coordinate correction after the cloth motion deformation and correct the cloth grid coordinates.
[0010] The mesh tensor field is calculated according to the corrected coordinates, the mesh deformation degree is judged according to the tensor field, the mesh is refined and coarsened, the mesh topology is updated, and a non-uniform anisotropic cloth mesh is formed.
[0011] Further, the method of constructing the original cloth mesh by using the constitutive model, adding physical quantities to the mesh nodes, obtaining the three-dimensional spatial coordinates and two-dimensional mapping of the original cloth mesh nodes, constructing mesh edges and mesh triangles according to adjacent nodes, calculating the topological relationship between mesh nodes, edges and triangles, and forming a set of points, edges and faces based on nodes, specifically includes:
[0012] According to the physical properties of different cloth materials, the attribute characteristics of the nodes are set on the basis of the original grid, adding material properties, mass, three-dimensional space coordinates, two-dimensional mapping, and speed to form a point set;
[0013] On the basis of the original grid, two adjacent nodes are grouped together to form an edge, and the geometric properties of the edge and the topological relationship between the points and the edge are calculated to form an edge set;
[0014] According to the point set and edge set, triangular faces are constructed using adjacent points and adjacent edges, and the geometric properties of the faces and the topological relationships between the faces, edges and points are calculated to form a face set.
[0015] Furthermore, according to Newton's law, an external force is applied to the cloth mesh, a linear system is formed using the coordinate matrix of the grid points, edges and faces, and a conjugate gradient method is used to solve the coordinate change of the cloth mesh under the external force, which specifically includes:
[0016] According to the degree of freedom components required by the external forces, the number of matrix entries under different external forces is calculated;
[0017] According to Newton's law, external forces are applied to the grid and the external force matrix is calculated;
[0018] According to the number of points, edges, and faces and the required number of entries, a coordinate matrix is constructed, and combined with the external force matrix to form a linear system about the external force;
[0019] The conjugate gradient method is used to solve the linear system and obtain the acceleration of each node under the action of external force;
[0020] The acceleration is used to calculate the changed coordinates of the mesh nodes.
[0021] Furthermore, the graph coloring method is used to decouple the data dependency of the grid, and the position dynamics method is used to perform iterative parallel calculation of strain constraints according to the changed coordinates to obtain the coordinate correction amount after the cloth motion deformation, and correct the cloth grid coordinates;
[0022] According to the topological relationship of the points, edges and faces, the grid is colored and grouped using the graph coloring method, and the points, edges and faces with data dependencies are separated into different color groups;
[0023] Add strain constraints to different color groups, use the method based on position dynamics to iteratively and parallelly calculate the strain constraints according to the changed coordinates, and obtain the coordinate correction of each node after the cloth motion deformation;
[0024] Change the node coordinates according to the coordinate correction amount.
[0025] Further, the mesh tensor field is calculated according to the corrected coordinates, the mesh deformation degree is determined according to the tensor field, the mesh is refined and coarsened, the mesh topology is updated, and a non-uniform anisotropic cloth mesh is formed, which specifically includes:
[0026] The curvature matrix, deformation matrix, and compression matrix of each triangular face element are calculated according to the corrected coordinates to form a tensor matrix, and the maximum tensor field is obtained by calculation;
[0027] Perform eigenvalue decomposition on the maximum tensor field and make adaptive adjustments based on the eigenvalues to ensure that the adjusted matrix meets the maximum and minimum size constraints. Recombine the adjusted eigenvalues and eigenvectors to generate a triangular face size matrix that characterizes the degree of mesh deformation.
[0028] Determine whether the mesh needs to be refined or coarsened based on the size matrix, and dynamically adjust the local mesh fineness;
[0029] Calculate the topological relationship of the dynamically adjusted mesh and generate a non-uniform anisotropic cloth mesh.
[0030] A system based on the method, the system comprising:
[0031] An initialization module is used to construct the original cloth mesh using the constitutive model, add physical quantities to the mesh nodes, obtain the three-dimensional spatial coordinates and two-dimensional mapping of the original cloth mesh nodes, construct mesh edges and mesh triangles according to adjacent nodes, calculate the topological relationship between mesh nodes, edges and triangles, and form a set of points, edges and faces based on nodes;
[0032] The external force module is used to apply external force to the cloth mesh according to Newton's law, form a linear system using the coordinate matrix of the grid points, edges and faces, and use the conjugate gradient method to solve the coordinate changes of the cloth mesh under the action of external force;
[0033] The deformation calculation module is used to use the graph coloring method to decouple the data dependency of the grid, use the position dynamics method to perform iterative parallel calculation of strain constraints according to the changing coordinates, obtain the coordinate correction amount after the cloth motion deformation, and correct the cloth grid coordinates;
[0034] The regridding module is used to calculate the mesh tensor field according to the corrected coordinates, determine the mesh deformation degree according to the tensor field, refine and coarsen the mesh, update the mesh topology, and form a non-uniform anisotropic cloth mesh.
[0035] An electronic device comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the method described.
[0036] A storage medium stores a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device executes the method described.
[0037] The beneficial effects of the present invention are: combining dynamic mesh re-division and parallelized position dynamics methods, capturing the subtle wrinkles and folds of the cloth by refining the mesh, and maintaining large meshes in smooth areas, thereby improving calculation efficiency. In addition, the anisotropic behavior of the cloth is fully considered during the simulation process, and the mechanical properties of the cloth in different directions can be accurately reproduced. Through this method, the complex dynamics and detailed characteristics of the cloth can be realistically simulated while achieving efficient calculations.
[0038] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0040] Figure 1 It is a schematic diagram of the process of the adaptive anisotropic cloth simulation method based on position dynamics in the present invention;
[0041] Figure 2 It is the original cloth mesh structure;
[0042] Figure 3 This is a simulation image diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0044] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0045] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0046] The present invention provides a method, system, electronic device and storage medium for simulating an adaptive anisotropic cloth based on position dynamics, the method comprising:
[0047] The original cloth mesh is constructed using the constitutive model, physical quantities are added to the mesh nodes, the three-dimensional spatial coordinates and two-dimensional mapping of the original cloth mesh nodes are obtained, mesh edges and mesh triangles are constructed according to adjacent nodes, the topological relationship between mesh nodes, edges and triangles is calculated, and a set of points, edges and faces is formed based on the nodes;
[0048] According to Newton's law, external force is applied to the cloth grid, and the coordinate matrix of the grid points and edges is used to form a linear system. The conjugate gradient method is used to solve the coordinate change of the cloth grid under the action of external force;
[0049] The graph coloring method is used to decouple the data dependency of the grid. The position dynamics method is used to perform iterative parallel calculation of strain constraints according to the changing coordinates to obtain the coordinate correction after the cloth motion deformation and correct the cloth grid coordinates.
[0050] The mesh tensor field is calculated according to the corrected coordinates, the mesh deformation degree is judged according to the tensor field, the mesh is refined and coarsened, the mesh topology is updated, and a non-uniform anisotropic cloth mesh is formed.
[0051] Figure 1 The schematic diagram of the process of the embodiment of the present application is shown. Figure 1 The flowchart shown explains each step in detail:
[0052] In this embodiment, the constitutive model is used to construct the original cloth mesh, physical quantities are added to the mesh nodes, the three-dimensional space coordinates and two-dimensional mapping of the original cloth mesh nodes are obtained, mesh edges and mesh triangles are constructed according to adjacent nodes, and the topological relationship between mesh nodes, edges and triangles is calculated. The steps of forming a set of points, edges and faces based on nodes include:
[0053] like Figure 2 As shown, the numbered vertices are regarded as mesh nodes, and the attribute characteristics of the nodes are set based on the original mesh, adding material properties, mass, three-dimensional space coordinates, two-dimensional mapping, and velocity to form a point set.
[0054] On the basis of the original mesh, two adjacent nodes are grouped together to form an edge, which contains information such as related nodes, vertices, adjacent faces, etc. At the same time, it is checked whether the edge is a free edge, boundary edge or seam edge; the geometric calculation method includes calculating the boundary, total area, length and angle of the edge; the above information is counted to form an edge set.
[0055] According to the point set and edge set, the adjacent points and edges are used to construct triangular faces, including the vertices, edges, materials and other information related to them; and the initial area, quality and other properties are calculated; as well as whether the vertex or edge is contained in the face element, whether the face element is free or adjacent; geometric calculations include the boundary, position, gradient, curvature and other properties of the face; the above information is counted to form a face set.
[0056] In this embodiment, according to Newton's law, an external force is applied to the cloth mesh, a linear system is formed using the coordinate matrix of the grid points, edges and faces, and the steps of using the conjugate gradient method to solve the coordinate change of the cloth mesh under the external force include:
[0057] First, the function initializes and gets the number of nodes, edges, and faces. Nodes, edges, and faces represent the basic components of the cloth mesh. Each node, edge, and face is stored in a GPU device vector and accessed through a pointer. According to Newton's law F = m·a, a linear system A·x = b can be constructed. Then the degree of freedom components required for the external force are calculated to calculate the number of matrix entries under different external forces:
[0058] Size=c1×nNodes+c2×nEdges+c3×nFaces+c4×Others;
[0059] Among them, c1 is the degree of freedom about the node action, c2 is the degree of freedom about the edge action, c3 is the degree of freedom about the surface action, and c4 is the degree of freedom of other forces.
[0060] After all external forces are applied, the function establishes and solves the linear system A·x=b, where A is a sparse matrix, x is the velocity of the node, and b is the result of the external force. The function uses the conjugate gradient method to solve the linear system, obtains the acceleration x under the external force, and finally calculates the changed coordinates Position of the mesh node. new =Position old +x·dt, where dt is the time step.
[0061] In this embodiment, the graph coloring method is used to decouple the data dependency of the grid, and the position dynamics method is used to perform iterative parallel calculation of the strain constraint according to the change coordinates to obtain the coordinate correction amount after the cloth motion deformation. The steps of correcting the cloth grid coordinates include:
[0062] By building an adjacency matrix to determine adjacent elements, first assign an initial color to each element, and then use a greedy algorithm to color it, ensuring that adjacent elements do not have the same color. The greedy coloring algorithm here traverses, selects the smallest available color that is different from the adjacent color, and updates the maximum color value;
[0063] Construct the adjacency matrix:
[0064]
[0065] Assign color: color(i) = min{color not used};
[0066] Update the maximum color:
[0067] maxColor=max(maxColor,color(i));
[0068] According to the shading results, the elements that meet the conditions are matched for parallel processing; the mass and position coordinates of the vertices are obtained, and the strain constraints are imposed on the matching results using the method based on position dynamics. For each vertex k, the deformation gradient Sij is calculated:
[0069] Sij=r0·ci·invRestMat(k,i)+r1·cj·invRestMat(k,j);
[0070] Among them, r0 and r1 are the initial and current coordinate vectors of the vertex; ci and cj are column vectors associated with the inverse static matrix; invRestMat(k,i) and invRestMat(k,j) are the elements of the inverse static matrix.
[0071] According to the target deformation gradient and the inverse mass of the vertex, the Lagrange multiplier λ is calculated and applied to the correction, and then the correction is added to the node coordinates.
[0072] In this embodiment, the steps of calculating the mesh tensor field according to the corrected coordinates, determining the mesh deformation degree according to the tensor field, refining and coarsening the mesh, updating the mesh topology structure, and forming a non-uniform anisotropic cloth mesh include:
[0073] The curvature matrix, deformation matrix, and compression matrix of each triangular face element are calculated according to the corrected coordinates to form a tensor matrix, and the maximum tensor field is obtained by calculation;
[0074] Perform eigenvalue decomposition on the maximum tensor field S to obtain the orthogonal matrix Q and eigenvalue vector l:
[0075] S = Q × diagonal (l) × Q T ;
[0076] Where diagonal(l) is the diagonal matrix of the eigenvalue vector l; Q^T is the transpose of the matrix Q.
[0077] And adaptively adjust according to the eigenvalue to ensure that the adjusted matrix meets the maximum and minimum size constraints:
[0078] l(i)=clamp(l(i),1 / (sizeMax) 2 ,1 / (sizeMin) 2 );
[0079] Among them, sizeMax and sizeMin are parameters for presetting the size of the grid element.
[0080] The adjusted eigenvalues and eigenvectors are recombined to generate a triangle face size matrix that represents the degree of mesh deformation, and multiplied by the area of the triangle face to obtain the size of the triangle face vertex.
[0081] According to each vertex size matrix, it is determined whether the mesh needs to be refined or coarsened, the local fineness of the mesh is dynamically adjusted, the topological relationship of the dynamically adjusted mesh is calculated, and a non-uniform anisotropic cloth mesh is generated, such as Figure 3 shown.
[0082] In this embodiment, the present invention further provides a system for implementing the above method, including:
[0083] An initialization module is used to construct the original cloth mesh using the constitutive model, add physical quantities to the mesh nodes, obtain the three-dimensional spatial coordinates and two-dimensional mapping of the original cloth mesh nodes, construct mesh edges and mesh triangles according to adjacent nodes, calculate the topological relationship between mesh nodes, edges and triangles, and form a set of points, edges and faces based on nodes;
[0084] The external force module is used to apply external force to the cloth mesh according to Newton's law, form a linear system using the coordinate matrix of the grid points, edges and faces, and use the conjugate gradient method to solve the coordinate changes of the cloth mesh under the action of external force;
[0085] The deformation calculation module is used to use the graph coloring method to decouple the data dependency of the grid, use the position dynamics method to perform iterative parallel calculation of strain constraints according to the changing coordinates, obtain the coordinate correction amount after the cloth motion deformation, and correct the cloth grid coordinates;
[0086] The regridding module is used to calculate the mesh tensor field according to the corrected coordinates, determine the mesh deformation degree according to the tensor field, refine and coarsen the mesh, update the mesh topology, and form a non-uniform anisotropic cloth mesh.
[0087] In this embodiment, the present invention also provides an electronic device, comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the method described above.
[0088] In this embodiment, the present invention further provides a storage medium storing a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device executes the above-mentioned method.
[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. An adaptive anisotropic cloth simulation method based on position dynamics, characterized by: The method comprises the following steps: The original cloth mesh is constructed using the constitutive model, physical quantities are added to the mesh nodes, the three-dimensional spatial coordinates and two-dimensional mapping of the original cloth mesh nodes are obtained, mesh edges and mesh triangles are constructed according to adjacent nodes, the topological relationship between mesh nodes, edges and triangles is calculated, and a set of points, edges and faces is formed based on the nodes; According to Newton's law, external force is applied to the cloth grid, and the coordinate matrix of the grid points, edges and faces is used to form a linear system. The conjugate gradient method is used to solve the coordinate change of the cloth grid under the action of external force; The graph coloring method is used to decouple the data dependency of the grid. The position dynamics method is used to perform iterative parallel calculation of strain constraints according to the changing coordinates to obtain the coordinate correction after the cloth motion deformation and correct the cloth grid coordinates. The mesh tensor field is calculated according to the corrected coordinates, the mesh deformation degree is judged according to the tensor field, the mesh is refined and coarsened, the mesh topology is updated, and a non-uniform anisotropic cloth mesh is formed.
2. The method for simulating anisotropic cloth based on position dynamics according to claim 1, characterized in that: The method of constructing the original cloth mesh by using the constitutive model, adding physical quantities to the mesh nodes, obtaining the three-dimensional spatial coordinates and two-dimensional mapping of the original cloth mesh nodes, constructing mesh edges and mesh triangles according to adjacent nodes, calculating the topological relationship between mesh nodes, edges and triangles, and forming a set of points, edges and faces based on nodes specifically includes: According to the physical properties of different cloth materials, the attribute characteristics of the nodes are set on the basis of the original grid, adding material properties, mass, three-dimensional space coordinates, two-dimensional mapping, and speed to form a point set; On the basis of the original grid, two adjacent nodes are grouped together to form an edge, and the geometric properties of the edge and the topological relationship between the points and the edge are calculated to form an edge set; According to the point set and edge set, triangular faces are constructed using adjacent points and adjacent edges, and the geometric properties of the faces and the topological relationships between the faces, edges and points are calculated to form a face set.
3. The method for simulating anisotropic cloth based on position dynamics according to claim 1, characterized in that: According to Newton's law, an external force is applied to the cloth grid, a linear system is formed using the coordinate matrix of the grid points, edges and faces, and the conjugate gradient method is used to solve the coordinate change of the cloth grid under the external force, which specifically includes: According to the degree of freedom components required by the external forces, the number of matrix entries under different external forces is calculated; According to Newton's law, external forces are applied to the grid and the external force matrix is calculated; According to the number of points, edges, and faces and the required number of entries, a coordinate matrix is constructed, and combined with the external force matrix to form a linear system about the external force; The conjugate gradient method is used to solve the linear system and obtain the acceleration of each node under the action of external force; The acceleration is used to calculate the changed coordinates of the mesh nodes.
4. The method for simulating anisotropic cloth based on position dynamics according to claim 1, characterized in that: The graph coloring method is used to decouple the data dependency of the grid, and the position dynamics method is used to perform iterative parallel calculation of strain constraints according to the changed coordinates to obtain the coordinate correction amount after the cloth motion deformation, and correct the cloth grid coordinates; According to the topological relationship of the points, edges and faces, the grid is colored and grouped using the graph coloring method, and the points, edges and faces with data dependencies are separated into different color groups; Add strain constraints to different color groups, use the method based on position dynamics to iteratively and parallelly calculate the strain constraints according to the changed coordinates, and obtain the coordinate correction of each node after the cloth motion deformation; Change the node coordinates according to the coordinate correction amount.
5. The method for simulating anisotropic cloth based on position dynamics according to claim 1, characterized in that: The method of calculating the mesh tensor field according to the corrected coordinates, judging the mesh deformation degree according to the tensor field, refining and coarsening the mesh, updating the mesh topology structure, and forming a non-uniform anisotropic cloth mesh specifically includes: The curvature matrix, deformation matrix, and compression matrix of each triangular face element are calculated according to the corrected coordinates to form a tensor matrix, and the maximum tensor field is obtained by calculation; Perform eigenvalue decomposition on the maximum tensor field and make adaptive adjustments based on the eigenvalues to ensure that the adjusted matrix meets the maximum and minimum size constraints. Recombine the adjusted eigenvalues and eigenvectors to generate a triangular face size matrix that characterizes the degree of mesh deformation. Determine whether the mesh needs to be refined or coarsened based on the size matrix, and dynamically adjust the local mesh fineness; Calculate the topological relationship of the dynamically adjusted mesh and generate a non-uniform anisotropic cloth mesh.
6. A system according to any one of claims 1 to 5, characterized in that: The system includes: An initialization module is used to construct the original cloth mesh using the constitutive model, add physical quantities to the mesh nodes, obtain the three-dimensional spatial coordinates and two-dimensional mapping of the original cloth mesh nodes, construct mesh edges and mesh triangles according to adjacent nodes, calculate the topological relationship between mesh nodes, edges and triangles, and form a set of points, edges and faces based on nodes; The external force module is used to apply external force to the cloth mesh according to Newton's law, form a linear system using the coordinate matrix of the grid points, edges and faces, and use the conjugate gradient method to solve the coordinate changes of the cloth mesh under the action of external force; The deformation calculation module is used to use the graph coloring method to decouple the data dependency of the grid, use the position dynamics method to perform iterative parallel calculation of strain constraints according to the changing coordinates, obtain the coordinate correction amount after the cloth motion deformation, and correct the cloth grid coordinates; The regridding module is used to calculate the mesh tensor field according to the corrected coordinates, determine the mesh deformation degree according to the tensor field, refine and coarsen the mesh, update the mesh topology, and form a non-uniform anisotropic cloth mesh.
7. An electronic device, characterized in that: The method comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the method according to any one of claims 1 to 5.
8. A storage medium, characterized in that: The computer program executable by an electronic device is stored therein, and when the program is run on the electronic device, the electronic device executes the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Simulating and optimizing method of clothes of different materials based on laplacian coordinates
CN106096130A
A method for accelerating the finite element solution of elastic deformation of object mesh model
CN108986220A
Two-dimensional anisotropic grid cell measurement tensor field smoothing method
CN111079326A
Cloth simulation method and system for anisotropic materials based on spring mass point model, electronic equipment and storage medium
CN113191018A
Virtual character simulation and live broadcast method and device, equipment and storage medium
CN114565705A
Cited By
Computer numerical simulation method, system and equipment for composite material
CN119889543A