An adaptive anisotropic cloth simulation method and system based on position dynamics, electronic equipment and storage medium

By using an adaptive anisotropic cloth simulation method based on position dynamics to dynamically adjust the mesh topology, the computational efficiency and accuracy issues of cloth simulation algorithms are solved, and efficient cloth simulation animation effects are achieved.

CN119313784BActive Publication Date: 2026-04-14CHONGQING UNIV OF POSTS & TELECOMM
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING UNIV OF POSTS & TELECOMM
Filing Date
2024-11-04
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately capture the mechanical properties of fabric in different directions, resulting in insufficient computational efficiency and accuracy in fabric simulation algorithms, which affects the realism and resolution of fabric simulation animations.

Method used

An adaptive anisotropic cloth simulation method based on position dynamics is adopted. By constructing an original cloth mesh, applying external forces, and using the conjugate gradient method and graph coloring method for iterative parallel computation, the mesh topology is dynamically adjusted to form a non-uniform anisotropic cloth mesh.

Benefits of technology

It improves the computational efficiency and accuracy of cloth simulation, enabling realistic simulation of the mechanical properties of cloth in different directions, and enhancing the realism and detail of cloth simulation animation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313784B_ABST
    Figure CN119313784B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of based on position dynamics adaptive anisotropic cloth simulation method, system, electronic equipment and storage medium, belong to computer graphics physics simulation field.The method includes setting cloth grid;Topology relationship of grid is calculated, and the set of point edge surface is formed;According to Newton's law, the linear system of external force is constructed, and change coordinate is solved using conjugate gradient method;Using graph coloring method, data dependence is decoupled to grid, using the method of position dynamics, strain constraint iteration parallel computing is carried out to change coordinate, and the coordinate correction amount after cloth motion deformation is obtained;According to the revised coordinate, grid tensor field is calculated, grid dynamic refinement and coarsening are carried out, and non-uniform anisotropic cloth grid is formed.The present application uses position dynamics method to calculate dynamic non-uniform grid, simulates the anisotropy of cloth deformation, retains the dynamic behavior of cloth wrinkle under fine scale, is quickly solved on the basis of not losing simulation details, satisfies real-time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer graphics physical simulation, and relates to an adaptive anisotropic cloth simulation method, system, electronic device and storage medium based on position dynamics. Background Technology

[0002] Fabrics in reality often exhibit anisotropic properties, meaning they behave differently when stretched and bent in different directions, thus increasing the diversity of surface wrinkles. Accurately capturing the mechanical properties of fabrics in all directions requires a huge amount of computation and demands a very fine triangular mesh representation of the fabric.

[0003] The accuracy and stability of cloth simulation algorithms largely determine the computational efficiency of cloth simulation. Conversely, the efficiency of cloth simulation algorithms largely determines the highest resolution achievable in real-time cloth simulation. The cloth mesh resolution, in turn, determines the richness and realism of the simulated cloth movement details. Therefore, these two aspects are mutually reinforcing. With the development of graphics hardware computing performance, improving the expressiveness of physical models in depicting cloth behavior and the solution efficiency of simulation algorithms, further enhancing the realism of cloth simulation animations, and finding a better balance between realism and simulation efficiency in scenarios with limited computing power remain pressing issues requiring further research and resolution. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide an adaptive anisotropic fabric simulation method, system, electronic device and storage medium based on position dynamics.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] An adaptive anisotropic cloth simulation method based on position dynamics, comprising the following steps:

[0007] The original cloth mesh is constructed using a constitutive model. Physical quantities are added to the mesh nodes to obtain the three-dimensional spatial coordinates and two-dimensional mapping of the original cloth mesh nodes. Mesh edges and mesh triangles are constructed based on adjacent nodes. The topological relationships between mesh nodes, edges and triangles are calculated. A set of points, edges and faces is formed based on the nodes.

[0008] According to Newton's laws, an external force is applied to the cloth mesh, and a linear system is formed using the coordinate matrix of the mesh points and edges. The coordinate changes of the cloth mesh under the action of the external force are solved using the conjugate gradient method.

[0009] Using graph coloring, data dependencies of the mesh are decoupled. Using position dynamics, iterative parallel calculations of strain constraints are performed based on changing coordinates to obtain the coordinate correction amount after the fabric motion deformation, and the fabric mesh coordinates are corrected.

[0010] The mesh tensor field is calculated based on the corrected coordinates. The degree of mesh deformation is determined based on the tensor field. The mesh is then refined or coarsened, and the mesh topology is updated to form a non-uniform anisotropic fabric mesh.

[0011] Furthermore, the process of constructing an original cloth mesh using a constitutive model, adding physical quantities to the mesh nodes, obtaining the three-dimensional spatial coordinates and two-dimensional mappings of the original cloth mesh nodes, constructing mesh edges and mesh triangular faces based on adjacent nodes, calculating the topological relationships between mesh nodes, edges, and triangular faces, and forming a set of points, edges, and faces based on the nodes, specifically includes:

[0012] Based on the physical properties of different fabric materials, the attribute characteristics of the nodes are set on the basis of the original mesh, and material properties, mass, three-dimensional spatial coordinates, two-dimensional mapping, and velocity are added to form a point set;

[0013] Based on the original mesh, each pair of adjacent nodes forms an edge. The geometric properties of the edges and the topological relationship between the points and the edges are calculated to form an edge set.

[0014] Based on the set of points and the set of edges, construct triangular faces using adjacent points and adjacent edges, calculate the geometric properties of the faces and the topological relationships between the faces, edges, and points, and form a face set.

[0015] Furthermore, based on Newton's laws, an external force is applied to the cloth mesh, and a linear system is formed using the coordinate matrices of the mesh points and edges. The coordinate changes of the cloth mesh under the action of the external force are then solved using the conjugate gradient method. Specifically, this includes:

[0016] Calculate the number of matrix entries under different external forces based on the degree of freedom components required for the action of external forces.

[0017] According to Newton's laws, apply external forces to the mesh and calculate the external force matrix;

[0018] Based on the number of points, edges, and faces and the required number of entries, construct a coordinate matrix and combine it with the external force matrix to form a linear system about the external forces.

[0019] The linear system is solved using the conjugate gradient method to obtain the acceleration of each node under the action of external forces.

[0020] Calculate the changing coordinates of grid nodes using acceleration.

[0021] Furthermore, the graph coloring method is used to decouple the data dependencies of the mesh, and the position dynamics method is used to perform iterative parallel calculation of strain constraints based on the changing coordinates to obtain the coordinate correction amount after the fabric motion deformation, and to correct the coordinates of the fabric mesh.

[0022] Based on the topological relationships of the point, edge, and face sets, the graph coloring method is used to color and group the mesh, separating the points, edges, and faces that have data dependencies into different color groups;

[0023] Strain constraints are added to different color groups. Using a position dynamics-based method, the strain constraints are iteratively calculated in parallel according to the changing coordinates to obtain the coordinate correction of each node after the fabric motion deformation.

[0024] Change the node coordinates based on the coordinate correction amount.

[0025] Furthermore, the step of calculating the mesh tensor field based on the corrected coordinates, determining the degree of mesh deformation based on the tensor field, refining and coarsening the mesh, updating the mesh topology, and forming a non-uniform anisotropic mesh specifically includes:

[0026] The curvature matrix, deformation matrix, and compression matrix of each triangular element are calculated based on the corrected coordinates to form a tensor matrix. The maximum tensor field is then obtained through calculation.

[0027] The maximum tensor field is decomposed into eigenvalues ​​and adaptively adjusted based on the eigenvalues ​​to ensure that the adjusted matrix satisfies the maximum and minimum size constraints. The adjusted eigenvalues ​​and eigenvectors are then recombined to generate a triangular facet 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 fineness of the mesh;

[0029] Calculate the topological relationship of the dynamically adjusted mesh to generate a non-uniform anisotropic mesh.

[0030] A system based on the method, the system comprising:

[0031] The 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 based on 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 forces to the cloth mesh according to Newton's laws. It uses the coordinate matrix of the mesh points and edges to form a linear system and uses the conjugate gradient method to solve the coordinate changes of the cloth mesh under the action of external forces.

[0033] The deformation calculation module is used to decouple the data dependency of the mesh using graph coloring and to perform iterative parallel calculation of strain constraints based on the changing coordinates using position dynamics to obtain the coordinate correction amount after the fabric motion deformation and correct the coordinates of the fabric mesh.

[0034] The remeshing module is used to calculate the mesh tensor field based on the corrected coordinates, determine the degree of mesh deformation based on the tensor field, refine or coarsen the mesh, update the mesh topology, and form a non-uniform anisotropic fabric mesh.

[0035] An electronic device includes at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program that, when executed by the processing unit, causes the processing unit to perform the method described thereon.

[0036] A storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the method.

[0037] The advantages of this invention are as follows: it combines dynamic mesh remapping and parallelized positional dynamics methods, capturing subtle wrinkles and folds in the fabric by refining the mesh while maintaining a large mesh in smooth regions, thereby improving computational efficiency. Furthermore, the anisotropic behavior of the fabric is fully considered during the simulation, accurately reproducing the fabric's mechanical properties in different directions. This method allows for efficient computation while realistically simulating the complex dynamics and detailed features of the fabric.

[0038] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0039] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:

[0040] Figure 1 This is a flowchart illustrating the adaptive anisotropic fabric simulation method based on position dynamics in this invention.

[0041] Figure 2 The original fabric mesh structure;

[0042] Figure 3 This is a simulation image of one embodiment of the present invention. Detailed Implementation

[0043] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed 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 are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0044] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0045] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0046] This invention provides a method, system, electronic device, and storage medium for simulating adaptive anisotropic fabric based on position dynamics. The method includes:

[0047] The original cloth mesh is constructed using a constitutive model. Physical quantities are added to the mesh nodes to obtain the three-dimensional spatial coordinates and two-dimensional mapping of the original cloth mesh nodes. Mesh edges and mesh triangles are constructed based on adjacent nodes. The topological relationships between mesh nodes, edges and triangles are calculated. A set of points, edges and faces is formed based on the nodes.

[0048] According to Newton's laws, an external force is applied to the cloth mesh, and a linear system is formed using the coordinate matrix of the mesh points and edges. The coordinate changes of the cloth mesh under the action of the external force are solved using the conjugate gradient method.

[0049] Using graph coloring, data dependencies of the mesh are decoupled. Using position dynamics, iterative parallel calculations of strain constraints are performed based on changing coordinates to obtain the coordinate correction amount after the fabric motion deformation, and the fabric mesh coordinates are corrected.

[0050] The mesh tensor field is calculated based on the corrected coordinates. The degree of mesh deformation is determined based on the tensor field. The mesh is then refined or coarsened, and the mesh topology is updated to form a non-uniform anisotropic fabric mesh.

[0051] Figure 1 A flowchart illustrating an embodiment of this application is shown below. Figure 1 The flowchart shown provides a detailed explanation of each step:

[0052] In this embodiment, the original cloth mesh is constructed using a constitutive model, physical quantities are added to the mesh nodes, the three-dimensional spatial coordinates and two-dimensional mappings of the original cloth mesh nodes are obtained, mesh edges and mesh triangular faces are constructed based on adjacent nodes, the topological relationships between mesh nodes, edges, and triangular faces are calculated, and the steps of forming a set of points, edges, and faces based on nodes include:

[0053] like Figure 2 As shown, numbered vertices are treated as mesh nodes. Based on the original mesh, the node properties are set, including material properties, mass, three-dimensional spatial coordinates, two-dimensional mapping, and velocity, to form a point set.

[0054] Based on the original mesh, each pair of adjacent nodes is grouped together to form an edge, which contains information such as related nodes, vertices, and adjacent faces. At the same time, it is checked whether the edge is a free edge, a boundary edge, or a seam edge. The geometric calculation method includes calculating the boundary, total area, length, and included angle of the edge. The above information is statistically analyzed to form an edge set.

[0055] Based on the set of points and edges, construct triangular faces using adjacent points and edges, including information such as vertices, edges, and materials; calculate initial area, mass, and other attributes; determine whether vertices or edges are contained within face elements, and whether face elements are free or adjacent; perform geometric calculations including face boundary, position, gradient, curvature, and other attributes; and statistically analyze the above information to form a face set.

[0056] In this embodiment, according to Newton's laws, an external force is applied to the cloth mesh, and a linear system is formed using the coordinate matrices of the mesh points and edges. The steps for solving the coordinate changes of the cloth mesh under the action of the external force using the conjugate gradient method include:

[0057] First, the function initializes and obtains 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 via pointers. Based on Newton's law F = m·a, a linear system A·x = b can be constructed. The number of matrix entries under different external forces is then calculated, determining the degrees of freedom required for the application of external forces.

[0058] Size=c1×nNodes+c2×nEdges+c3×nFaces+c4×Others;

[0059] Where c1 is the degree of freedom with respect to node action, c2 is the degree of freedom with respect to edge action, c3 is the degree of freedom with respect to surface action, and c4 is the degree of freedom with respect to other forces.

[0060] After applying all external forces, the function establishes and solves the linear system A·x=b, where A is a sparse matrix, x is the velocity of the nodes, and b is the result of the external forces. The function uses the conjugate gradient method to solve the linear system, obtaining the acceleration x under the external forces, and finally calculates the positional changes of the mesh nodes. new =Position old +x·dt, where dt is the time step.

[0061] In this embodiment, graph coloring is used to decouple data dependencies in the mesh. A positional dynamics method is used to perform iterative parallel calculations of strain constraints based on changing coordinates to obtain the coordinate correction amount after fabric deformation. The steps for correcting the fabric mesh coordinates include:

[0062] Adjacent elements are determined by constructing an adjacency matrix. First, each element is assigned an initial color. Then, a greedy coloring algorithm is used to ensure that adjacent elements do not have the same color. This greedy coloring algorithm iterates through the elements, selects the smallest available color that is different from its neighbors, and updates the maximum color value.

[0063] Construct the adjacency matrix:

[0064]

[0065] Assign color: color(i) = min{color not used};

[0066] Update maximum color:

[0067] maxColor=max(maxColor,color(i));

[0068] Based on the coloring results, elements that meet the conditions are matched and processed in parallel; the mass and position coordinates of the vertices are obtained, and strain constraints are applied to the matching results using a position dynamics-based method. For each vertex k, the deformation gradient Sij is calculated.

[0069] Sij=r0·ci·invRestMat(k,i)+r1·cj·invRestMat(k,j);

[0070] Where 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; and invRestMat(k,i) and invRestMat(k,j) are elements of the inverse static matrix.

[0071] Based on the target deformation gradient and the inverse mass of the vertex, the Lagrange multiplier λ is calculated and applied to the correction amount, and then the correction amount is added to the node coordinates.

[0072] In this embodiment, the steps of calculating the mesh tensor field based on the corrected coordinates, determining the degree of mesh deformation based on the tensor field, refining and coarsening the mesh, updating the mesh topology, and forming a non-uniform anisotropic fabric mesh include:

[0073] The curvature matrix, deformation matrix, and compression matrix of each triangular element are calculated based on the corrected coordinates to form a tensor matrix. The maximum tensor field is then obtained through calculation.

[0074] Eigenvalue decomposition of the maximal tensor field S yields the orthogonal matrix Q and the 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 matrix Q.

[0077] And it adaptively adjusts based on eigenvalues ​​to ensure that the adjusted matrix satisfies 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 the preset mesh element size.

[0080] The adjusted eigenvalues ​​and eigenvectors are recombined to generate a triangular face size matrix that represents the degree of mesh deformation. This matrix is ​​then multiplied by the area of ​​the triangular face to obtain the size of the vertices of the triangular face elements.

[0081] Based on the size matrix of each vertex, determine whether the mesh needs to be refined or coarsened, dynamically adjust the local refinement of the mesh, calculate the topological relationship of the dynamically adjusted mesh, and generate a non-uniform anisotropic mesh, such as... Figure 3 As shown.

[0082] In this embodiment, the present invention also provides a system for implementing the method as described above, comprising:

[0083] The 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 based on 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 forces to the cloth mesh according to Newton's laws. It uses the coordinate matrix of the mesh points and edges to form a linear system and uses the conjugate gradient method to solve the coordinate changes of the cloth mesh under the action of external forces.

[0085] The deformation calculation module is used to decouple the data dependency of the mesh using graph coloring and to perform iterative parallel calculation of strain constraints based on the changing coordinates using position dynamics to obtain the coordinate correction amount after the fabric motion deformation and correct the coordinates of the fabric mesh.

[0086] The remeshing module is used to calculate the mesh tensor field based on the corrected coordinates, determine the degree of mesh deformation based on the tensor field, refine or coarsen the mesh, update the mesh topology, and form a non-uniform anisotropic fabric mesh.

[0087] In this embodiment, the present invention also provides an electronic device, including 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 performs the method described above.

[0088] In this embodiment, the present invention also provides a storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the method described above.

[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. An adaptive anisotropic fabric simulation method based on position dynamics, characterized in that: The method includes the following steps: The original cloth mesh is constructed using a constitutive model. Physical quantities are added to the mesh nodes to obtain the three-dimensional spatial coordinates and two-dimensional mapping of the original cloth mesh nodes. Mesh edges and mesh triangles are constructed based on adjacent nodes. The topological relationships between mesh nodes, edges and triangles are calculated. A set of points, edges and faces is formed based on the nodes. According to Newton's laws, an external force is applied to the cloth mesh, and a linear system is formed using the coordinate matrix of the mesh points and edges. The coordinate changes of the cloth mesh under the action of the external force are solved using the conjugate gradient method. Using graph coloring, data dependencies of the mesh are decoupled. Using position dynamics, iterative parallel calculations of strain constraints are performed based on changing coordinates to obtain the coordinate correction amount after the fabric motion deformation, and the fabric mesh coordinates are corrected. The mesh tensor field is calculated based on the corrected coordinates. The degree of mesh deformation is determined based on the tensor field. The mesh is then refined and coarsened, and the mesh topology is updated to form a non-uniform anisotropic fabric mesh. The process of calculating the mesh tensor field based on the corrected coordinates, determining the degree of mesh deformation based on the tensor field, refining and coarsening the mesh, updating the mesh topology, and forming a non-uniform anisotropic mesh specifically includes: The curvature matrix, deformation matrix, and compression matrix of each triangular element are calculated based on the corrected coordinates to form a tensor matrix. The maximum tensor field is then obtained through calculation. The maximum tensor field is decomposed into eigenvalues ​​and adaptively adjusted based on the eigenvalues ​​to ensure that the adjusted matrix satisfies the maximum and minimum size constraints. The adjusted eigenvalues ​​and eigenvectors are then recombined to generate a triangular facet 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 fineness of the mesh; Calculate the topological relationship of the dynamically adjusted mesh to generate a non-uniform anisotropic mesh.

2. The adaptive anisotropic fabric simulation method based on position dynamics according to claim 1, characterized in that: The process involves constructing an original cloth mesh using a constitutive model, adding physical quantities to the mesh nodes, obtaining the three-dimensional spatial coordinates and two-dimensional mappings of the original cloth mesh nodes, constructing mesh edges and mesh triangular faces based on adjacent nodes, calculating the topological relationships between mesh nodes, edges, and triangular faces, and forming a set of points, edges, and faces based on the nodes. Specifically, this includes: Based on the physical properties of different fabric materials, the attribute characteristics of the nodes are set on the basis of the original mesh, and material properties, mass, three-dimensional spatial coordinates, two-dimensional mapping, and velocity are added to form a point set; Based on the original mesh, each pair of adjacent nodes forms an edge. The geometric properties of the edges and the topological relationship between the points and the edges are calculated to form an edge set. Based on the set of points and the set of edges, construct triangular faces using adjacent points and adjacent edges, calculate the geometric properties of the faces and the topological relationships between the faces, edges, and points, and form a face set.

3. The adaptive anisotropic fabric simulation method based on position dynamics according to claim 1, characterized in that: According to Newton's laws, an external force is applied to the cloth mesh. A linear system is formed using the coordinate matrices of the mesh points and edges. The coordinate changes of the cloth mesh under the action of the external force are solved using the conjugate gradient method. Specifically, this includes: Calculate the number of matrix entries under different external forces based on the degree of freedom components required for the action of external forces. According to Newton's laws, apply external forces to the mesh and calculate the external force matrix; Based on the number of points, edges, and faces and the required number of entries, construct a coordinate matrix and combine it with the external force matrix to form a linear system about the external forces. The linear system is solved using the conjugate gradient method to obtain the acceleration of each node under the action of external forces. Calculate the changing coordinates of grid nodes using acceleration.

4. The adaptive anisotropic fabric simulation method based on position dynamics according to claim 1, characterized in that: The graph coloring method is used to decouple the data dependencies of the mesh. The position dynamics method is used to perform iterative parallel calculation of strain constraints based on the changing coordinates to obtain the coordinate correction amount after the fabric motion deformation, and then correct the coordinates of the fabric mesh. Based on the topological relationships of the point, edge, and face sets, the graph coloring method is used to color and group the mesh, separating the points, edges, and faces that have data dependencies into different color groups; Strain constraints are added to different color groups. Using a position dynamics-based method, the strain constraints are iteratively calculated in parallel according to the changing coordinates to obtain the coordinate correction of each node after the fabric motion deformation. Change the node coordinates based on the coordinate correction amount.

5. A system based on the method of any one of claims 1 to 4, characterized in that: The system includes: The 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 based on 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 forces to the cloth mesh according to Newton's laws. It uses the coordinate matrix of the mesh points and edges to form a linear system and uses the conjugate gradient method to solve the coordinate changes of the cloth mesh under the action of external forces. The deformation calculation module is used to decouple the data dependency of the mesh using graph coloring and to perform iterative parallel calculation of strain constraints based on the changing coordinates using position dynamics to obtain the coordinate correction amount after the fabric motion deformation and correct the coordinates of the fabric mesh. The remeshing module is used to calculate the mesh tensor field based on the corrected coordinates, determine the degree of mesh deformation based on the tensor field, refine or coarsen the mesh, update the mesh topology, and form a non-uniform anisotropic fabric mesh.

6. An electronic device, characterized in that: It includes at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program that, when executed by the processing unit, causes the processing unit to perform the method according to any one of claims 1 to 4.

7. A storage medium, characterized in that: It stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • 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

  • Extension position dynamic deformation simulation method and device

    CN118364679A