Cloth simulation method and system for improving realism and efficiency, device and medium
By combining the hybrid coupling output of a cloth motion trajectory prediction model and a neural network enhancement model, the trade-off between realism and computational efficiency in traditional cloth simulation methods is resolved, achieving highly realistic and efficient cloth simulation, which is suitable for fields such as film and television animation and virtual try-on.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN HUAQIANG DIGITAL ANIMATION
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-19
AI Technical Summary
Traditional cloth simulation methods struggle to balance realism and computational efficiency when dealing with highly complex cloths, and they also lack automation and generalization capabilities.
A pre-trained fabric motion trajectory prediction model is used to extract multiple types of feature parameters. The model is then combined with a neural network enhancement model and a traditional physical model for hybrid coupling output to achieve fabric simulation.
It improves the realism and computational efficiency of fabric simulation, enhances the automation of modeling, and supports universal adaptability across styles and materials, making it suitable for fields such as film and animation, virtual try-on.
Smart Images

Figure CN122242238A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer graphics technology, and in particular to a method and system for simulating cloth in film, animation, games and virtual reality. Background Technology
[0002] Traditional computer graphics simulation of cloth primarily relies on frameworks such as physics-based mass-spring models, finite element methods (FEM), or position-based dynamics (PBD). These methods trade off realism from computational efficiency, especially when dealing with highly complex cloths (such as silk, lace, and pleats), making it difficult to balance high performance and high detail. Existing technologies largely depend on manual parameter tuning for modeling cloth material properties and restoring details, lacking automation and generalization capabilities.
[0003] In view of this, the present invention is hereby proposed. Summary of the Invention
[0004] The purpose of this invention is to provide a method, system, device, and medium for fabric simulation that improves realism and efficiency, thereby enhancing the simulation realism and computational efficiency of fabric simulation and solving the aforementioned technical problems existing in the prior art.
[0005] The objective of this invention is achieved through the following technical solution: A method for improving the realism and efficiency of cloth simulation includes: Step 1: Input the geometric model parameters of the fabric to be simulated into the pre-trained fabric motion trajectory prediction model, extract the multi-type feature parameters of the fabric to be simulated, and encode the obtained multi-type features into a feature parameter vector. Step 2: Input the feature parameter vector obtained in Step 1 into the neural network enhancement model to predict local parameters, and input it into the traditional physical model to obtain fabric simulation data; Step 3: The local parameters predicted by the neural network enhancement model in Step 2 are coupled with the fabric simulation data obtained by the traditional physical model in a hybrid manner to obtain the simulation results of the fabric to be simulated.
[0006] A fabric simulation system for improving realism and efficiency in the method described in this invention includes: The system comprises an input module, a cloth motion trajectory prediction model, a neural network enhancement model, a traditional physical model, and a hybrid output module; among which, The input module is connected to the fabric motion trajectory prediction model, and can obtain the geometric model parameters that need to be simulated for the fabric, and send them to the fabric motion trajectory prediction model. The fabric motion trajectory prediction model is connected to the neural network enhancement model and the traditional physical model respectively. It can extract multiple types of feature parameters of the fabric to be simulated, encode the obtained multiple types of features into feature parameter vectors, and output them to the neural network enhancement model and the traditional physical model respectively. The neural network enhancement model, connected to the hybrid output module, can predict local parameters based on the input feature parameter vector and output them to the hybrid output module. The traditional physical model, connected to the hybrid output module, can obtain fabric simulation data based on the input feature parameter vector. The hybrid output module can couple and output the local parameters predicted by the neural network enhancement model with the fabric simulation data obtained by the traditional physical model in a hybrid manner to obtain the simulation results of the fabric to be simulated.
[0007] A processing apparatus, comprising: At least one memory for storing one or more programs; At least one processor is capable of executing one or more programs stored in the memory, such that when the processor executes one or more programs, the processor can implement the method of the present invention.
[0008] A readable storage medium storing a computer program that, when executed by a processor, enables the implementation of the methods described in this invention.
[0009] Compared with existing technologies, the fabric simulation method, system, equipment, and medium provided by this invention, which improves realism and efficiency, have the following beneficial effects: By employing a pre-trained fabric motion trajectory prediction model, multiple types of feature parameters can be extracted from the geometric model parameters of the fabric to be simulated. Then, a neural network enhancement model is used to predict local parameters from the feature parameter vectors. Combined with the fabric simulation data obtained from the feature parameter vectors by the traditional physical model, the simulation results of the fabric to be simulated are obtained. This method can extract explicit and implicit features from the geometric shape, texture pattern, and motion trajectory of the fabric to be simulated, which are used to drive the dynamic adjustment of the fabric simulation model, thereby improving the high realism and computational efficiency of fabric simulation, especially in wrinkles, edges, and high-frequency change areas. By reducing the dependence on physical simulation parameters, the degree of modeling automation is improved. While ensuring visual fidelity, the computational efficiency of simulation is improved (supporting real-time preview and GPU acceleration). This method has universal adaptability across styles and materials and can be applied to fabric preprocessing, real-time simulation, offline rendering and other scenarios. It can be widely used in film and animation, virtual try-on, digital human clothing modeling and other fields. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart illustrating a fabric simulation method for improving realism and efficiency, provided in an embodiment of the present invention.
[0012] Figure 2 A flowchart illustrating the feature extraction process for a fabric simulation method that improves realism and efficiency, as provided in this embodiment of the invention.
[0013] Figure 3 The flowchart illustrates the coupling of analytical feature modeling and physical simulation in the cloth simulation method for improving realism and efficiency provided in this embodiment of the invention.
[0014] Figure 4 A block diagram of a fabric simulation system for improving realism and efficiency, provided in an embodiment of the present invention. Detailed Implementation
[0015] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the specific content of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments, which do not constitute a limitation of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0016] First, the following explanations are provided for the terms that may be used in this article: The term "and / or" means that either or both can be achieved simultaneously. For example, X and / or Y means that it includes both "X" or "Y" as well as the three cases of "X and Y".
[0017] The terms "comprising," "including," "containing," "having," or other similar semantic descriptions should be interpreted as non-exclusive inclusion. For example, including a technical feature element (such as raw material, component, ingredient, carrier, dosage form, material, size, part, component, mechanism, device, step, process, method, reaction conditions, processing conditions, parameter, algorithm, signal, data, product or article of manufacture, etc.) should be interpreted as including not only the expressly listed technical feature element, but also other technical feature elements that are not expressly listed and are well-known in the art.
[0018] The term "composed of" excludes any technical features not expressly listed. When used in a claim, it closes the claim to exclude all technical features other than those expressly listed, except for associated conventional impurities. If the term appears only in a clause of a claim, it limits the claim to the elements expressly listed in that clause; elements recited in other clauses are not excluded from the overall claim.
[0019] Unless otherwise explicitly specified or limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this document according to the specific circumstances.
[0020] The terms “center,” “longitudinal,” “lateral,” “length,” “width,” “thickness,” “upper,” “lower,” “front,” “back,” “left,” “right,” “vertical,” “horizontal,” “top,” “bottom,” “inner,” “outer,” “clockwise,” and “counterclockwise” indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience and simplification of description and do not imply that the device or component referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this document.
[0021] The solution provided by this invention will be described in detail below. Contents not described in detail in the embodiments of this invention are prior art known to those skilled in the art. Where specific conditions are not specified in the embodiments of this invention, they shall be performed according to conventional conditions in the art or conditions recommended by the manufacturer. Reagents or instruments used in the embodiments of this invention whose manufacturers are not specified are all conventional products that can be purchased commercially.
[0022] like Figure 1 , Figure 2 and Figure 3 As shown, this invention provides a fabric simulation method that improves realism and efficiency, comprising: Step 1: Input the geometric model parameters of the fabric to be simulated into the pre-trained fabric motion trajectory prediction model, extract the multi-type feature parameters of the fabric to be simulated, and encode the obtained multi-type features into a feature parameter vector. Step 2: Input the feature parameter vector obtained in Step 1 into the neural network enhancement model to predict local parameters, and input it into the traditional physical model to obtain fabric simulation data; Step 3: The local parameters predicted by the neural network enhancement model in Step 2 are coupled with the fabric simulation data obtained by the traditional physical model in a hybrid manner to obtain the simulation results of the fabric to be simulated.
[0023] In the above method, through hybrid coupling output, the traditional physical model of the simulation is made aware of where and how to calculate the key points by using features in cloth simulation. The physical features guide the results to ensure that no useless calculations are performed.
[0024] Preferably, in the above method, the fabric motion trajectory prediction model in step 1 includes: Input layer, feature extraction layer, and output layer; among which, The input layer can receive the cloth geometry, material properties, and initial state as inputs from the geometric model parameters of the cloth simulation. The feature extraction layer, connected to the input layer, can automatically extract key region features based on the fabric geometry, material properties, and initial state input from the input layer, and determine the geometric features, material features, and dynamic features of the fabric to be simulated as the extracted multi-type feature parameters of the fabric to be simulated. The output layer, connected to the feature extraction layer, encodes the multi-type feature parameters of the fabric to be simulated extracted by the feature extraction layer into a feature parameter vector and outputs it.
[0025] The fabric geometry input to the input layer includes: mesh topology, side length, and curvature parameters; material properties include thickness, stiffness, elasticity, and anisotropy parameters; and the initial state includes creases, suspension method, and stress environment parameters.
[0026] After extracting each feature, the above feature extraction layer can determine the wrinkle-prone areas, high bending and / or high stretching areas, and gravity-dominated and constraint-dominated areas of the fabric to be simulated.
[0027] This fabric motion trajectory prediction model achieves the goal of reducing the amount of calculation required for mechanical parameters by first extracting features and understanding how the fabric to be simulated will deform during fabric simulation, instead of directly calculating the mechanical parameters.
[0028] Preferably, in the above method, the fabric motion trajectory prediction model is trained in the following manner: Step 11, Model the fabric to be simulated: Based on the data obtained from the geometric model parameters of the fabric to be simulated, model the geometric model of the fabric to be simulated as an elastic element, and determine the stress energy function of the elastic element. Step 12, perform differentiable simulation on the elastic element obtained from the modeling in Step 11: Construct a physical simulator that supports automatic differentiation, and use the physical simulator to iteratively solve the motion state of the fabric by combining the elastic element and the material parameters of the fabric to be simulated, and predict the motion trajectory of the fabric. Step 13: Compare the predicted trajectory of the fabric movement from Step 11 with the observed trajectory of the corresponding real fabric to obtain the comparison result; Step 14: Based on the comparison results obtained in Step 13, determine whether the loss function value between the predicted result of the cloth movement trajectory and the observed trajectory of the real cloth to be simulated reaches the preset minimum value. If yes, end the training; otherwise, proceed to Step 15. Step 15: Optimize the fabric material parameters and return to step 12.
[0029] Preferably, in the above method, in step 11, the geometric model of the fabric to be simulated is modeled as an elastic element in the following manner, and the stress energy function of the elastic element is determined, including: The geometric model of the fabric to be simulated is modeled as a mesh, and each geometric model of the fabric to be simulated is constructed as an elastic element in the form of a triangle; the corresponding stress energy function is determined according to the specific model of the elastic element. In step 12, the physical simulator used is a physical simulator that supports automatic differentiation built with PyTorch+Taichi+ChainQueen. In step 12, the discrete dynamic equation (semi-implicit Euler) used to iteratively solve the motion state of the fabric by combining the elastic element and the material parameters of the fabric to be simulated with a physical simulator is as follows: ; in, This indicates the frame rate (Velocity) for frame t+1. This represents the frame rate (Velocity). This means that with a time step of 24fps, Δt = 1 / 24 ≈ 0.0417. This represents the acceleration in frame t. Indicates the position of frame t+1. Indicates the position of frame t; Among them Calculate as follows: ; in, Represents the mass matrix; This represents external forces (wind, gravity, collision reaction, damping); This represents the negative gradient of the geometry model of the cloth to be simulated with respect to energy. The formula is automatically derived by the automatic differentiation engine (i.e., the autodiff engine) as follows: ; in, It represents strain energy (the elastic potential energy stored in the fabric during its current deformation). This represents the positions of all vertices of the geometric model of the cloth to be simulated; In step 14, the loss function The definition of is: ; in, This represents the fabric material parameters of the fabric to be simulated; Indicates a time frame; Indicates the total duration of time; Represents the simulated predicted trajectory; This represents the actual trajectory data corresponding to the real fabric. In step 15, optimizing the fabric material parameters involves updating the fabric material parameters of the fabric to be simulated using backpropagation, which is performed by any one of Adam, SGD, or LBFGS.
[0030] Preferably, in the above method, the neural network enhancement model in step 2 adopts a hybrid dynamic model that performs residual compensation and parameter inversion on the traditional fabric physical model. It can enhance parameter recognition ability, nonlinear expression ability, high-frequency detail expression ability, stability and speed through existing technologies such as residual learning, graph neural network, differentiable simulation and order reduction reconstruction.
[0031] Preferably, in the above method, the multi-type feature parameters of the fabric to be simulated extracted in step 1 include: The geometric, material, and dynamic characteristics of the fabric to be simulated.
[0032] Preferably, in the above method, the geometric features include: fabric folds and edges; The material characteristics include: the texture and fibers of the fabric to be simulated; The dynamic characteristics include the motion trajectory and acceleration of the fabric to be simulated.
[0033] See Figure 4 The present invention also provides a fabric simulation system for improving the realism and efficiency of the above-described method, comprising: The system comprises an input module, a cloth motion trajectory prediction model, a neural network enhancement model, a traditional physical model, and a hybrid output module; among which, The input module is connected to the fabric motion trajectory prediction model, and can obtain the geometric model parameters that need to be simulated for the fabric, and send them to the fabric motion trajectory prediction model. The fabric motion trajectory prediction model is connected to the neural network enhancement model and the traditional physical model respectively. It can extract multiple types of feature parameters of the fabric to be simulated, encode the obtained multiple types of features into feature parameter vectors, and output them to the neural network enhancement model and the traditional physical model respectively. The neural network enhancement model, connected to the hybrid output module, can predict local parameters based on the input feature parameter vector and output them to the hybrid output module. The traditional physical model, connected to the hybrid output module, can obtain fabric simulation data based on the input feature parameter vector. The hybrid output module can couple and output the local parameters predicted by the neural network enhancement model with the fabric simulation data obtained by the traditional physical model in a hybrid manner to obtain the simulation results of the fabric to be simulated.
[0034] The present invention further provides a processing apparatus, comprising: At least one memory for storing one or more programs; At least one processor is capable of executing one or more programs stored in the memory, such that when the one or more programs are executed by the processor, the processor can implement the methods described above.
[0035] The present invention also provides a readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.
[0036] In summary, the method and system of this invention can extract explicit and implicit features from the geometric shape, texture pattern, and motion trajectory of the fabric to be simulated, which are used to drive the dynamic adjustment of the fabric simulation model, thereby improving the realism and efficiency of fabric simulation, especially in wrinkles, edges, and high-frequency change areas. By reducing the dependence on physical simulation parameters, the automation of modeling is improved. While ensuring visual fidelity, the computational efficiency of simulation is improved (supporting real-time preview and GPU acceleration). This method has universal adaptability across styles and materials and can be applied to fabric preprocessing, real-time simulation, offline rendering and other scenarios. It can be widely used in film and animation, virtual try-on, digital human clothing modeling and other fields.
[0037] To more clearly demonstrate the technical solution and its effects provided by the present invention, the following detailed description of the solution provided by the embodiments of the present invention is provided with reference to specific examples.
[0038] Example 1 like Figure 1 , Figure 2 and Figure 3 As shown, this embodiment provides a fabric simulation method that improves realism and efficiency. Taking a dress made of a high-bending, low-damping fabric as an example, the method includes the following steps: Step 1: Obtain the geometric model parameters of the dress to be simulated. These parameters include the initial state of the fabric and the material parameters of the fabric. Input the obtained parameters into the pre-trained fabric motion trajectory prediction model and extract the multi-type feature parameters of the fabric to be simulated. The multi-type feature parameters include the geometric features of the fabric to be simulated (including wrinkles and edges), material features (including texture and fibers), and dynamic features (including motion trajectory and acceleration). Encode the obtained multi-type features into a feature parameter vector. Step 2: Input the feature parameter vector obtained in Step 1 into the neural network enhancement model to predict local parameters, and input it into the traditional physical model to obtain fabric simulation data; Step 3: The local parameters predicted by the neural network enhancement model in Step 2 are coupled with the fabric simulation data obtained by the traditional physical model in a hybrid manner to obtain the simulation results of the fabric to be simulated.
[0039] The method in this embodiment is based on a differentiable physics engine and establishes the following data flow: Initial state of the fabric to be simulated + material parameters (θ) → (differentiable simulator) → fabric motion trajectory prediction → X t (θ) and the actual observed trajectory Comparison → Optimization θ makes L(X) t (θ), () Minimum.
[0040] The mechanical modeling basis of the above method is as follows: The geometric model of the fabric to be simulated is modeled using a mesh. Each triangle in the geometric model constitutes an elastic triangle. Taking the Neo-Hookean model as an example, the stress energy function of this elastic triangle is... (Strain Energy Function) is: ; in: The superscript T indicates the transformation gradient; the superscript T indicates the transpose of the matrix. , represents Lamé constant (related to Young's modulus E and Poisson's ratio ν); detF represents the volume deformation of the surface element; Lamé constant , The conversion methods are as follows: ; ; The differentiable simulation process of the above method is as follows: Build a physical simulator that supports automatic differentiation, such as using PyTorch + Taichi + ChainQueen. Iterate the motion state of the cloth according to the following discrete dynamic equations (semi-implicit Euler): ; in, Indicates the frame rate of t+1; Indicates frame rate t; This means that with a time step of 24fps, Δt = 1 / 24 ≈ 0.0417. Represents the acceleration in frame t; Indicates the position of frame t+1; Indicates the position of frame t; Among them Calculate as follows: ; in, Represents the mass matrix; This represents external forces (wind, gravity, collision reaction, damping); This represents the negative gradient of the geometry model of the cloth to be simulated with respect to energy; ; Since the autodiff engine, an automatic differentiation framework, is used, the gradients above are automatically calculated by the autodiff engine. In the above method, the loss function used for training is defined as: ; Where θ represents the fabric material parameters of the fabric to be simulated, such as E, ν, or network parameters; Indicates a time frame; Indicates the total duration of time; Represents the simulated predicted trajectory; This represents the actual trajectory data corresponding to the real fabric, which can be obtained from scanning or video reconstruction. Optimization method: Use Adam, SGD, LBFGS, etc. to backpropagate and update the material parameters of the fabric to be simulated. The above method uses a neural network-based Elasticity model to replace or enhance the traditional elasticity function: ; Input: Local node coordinates, velocity, and topology connectivity information; Output: Predict the elastic force or residual force at the current moment; It can be used to enhance the detail of simulated cloth or simulate the behavior of complex materials.
[0041] The cloth simulation process of this invention can be summarized as follows: first understand the cloth to be simulated → then calculate → fewer adjustments. Compared with the traditional cloth simulation process of calculating → adjusting → calculating again, this method first understands what the cloth looks like, then calculates how it should move, and finally uses less calculation to make it move more realistically. This improves the realism of the cloth simulation while reducing the amount of computation and increasing simulation efficiency. This method does not require globally unified calculations during the simulation process, but instead uses dynamic region-specific solutions, significantly reducing the amount of computation while maintaining visual effects. It solves the problem of traditional cloth simulations easily breaking down or excessively consuming computational resources under high-dynamic movements. It can connect the cloth simulation layer and the rendering layer, making the appearance consistent with physics through feature-driven methods. Physical-semantic joint modeling improves generalization ability. By extracting highly expressive feature vectors from physical foundations and geometric semantic features such as the initial state of the cloth, topology, contact area, and relative motion speed, feature parsing offers greater interpretability and transferability compared to image data or fully connected layer encoding.
[0042] Example 2 See Figure 4 This embodiment provides a fabric simulation system that improves realism and efficiency, used to implement the method of Embodiment 1, including: The system comprises an input module, a cloth motion trajectory prediction model, a neural network enhancement model, a traditional physical model, and a hybrid output module; among which, The input module is connected to the fabric motion trajectory prediction model, and can obtain the geometric model parameters that need to be simulated for the fabric, and send them to the fabric motion trajectory prediction model. The fabric motion trajectory prediction model is connected to the neural network enhancement model and the traditional physical model respectively. It can extract multiple types of feature parameters of the fabric to be simulated, encode the obtained multiple types of features into feature parameter vectors, and output them to the neural network enhancement model and the traditional physical model respectively. The neural network enhancement model, connected to the hybrid output module, can predict local parameters based on the input feature parameter vector and output them to the hybrid output module. The traditional physical model, connected to the hybrid output module, can obtain fabric simulation data based on the input feature parameter vector. The hybrid output module can couple and output the local parameters predicted by the neural network enhancement model with the fabric simulation data obtained by the traditional physical model in a hybrid manner to obtain the simulation results of the fabric to be simulated.
[0043] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0044] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims. The information disclosed in the background section is intended only to enhance the understanding of the overall background technology of the present invention and should not be construed as an admission or implication in any way that such information constitutes prior art known to those skilled in the art.
Claims
1. A method for fabric simulation that improves realism and efficiency, characterized in that, include: Step 1: Input the geometric model parameters of the fabric to be simulated into the pre-trained fabric motion trajectory prediction model, extract the multi-type feature parameters of the fabric to be simulated, and encode the obtained multi-type features into a feature parameter vector. Step 2: Input the feature parameter vector obtained in Step 1 into the neural network enhancement model to predict local parameters, and input it into the traditional physical model to obtain fabric simulation data; Step 3: The local parameters predicted by the neural network enhancement model in Step 2 are coupled with the fabric simulation data obtained by the traditional physical model in a hybrid manner to obtain the simulation results of the fabric to be simulated.
2. The fabric simulation method for improving realism and efficiency according to claim 1, characterized in that, The fabric motion trajectory prediction model in step 1 includes: Input layer, feature extraction layer, and output layer; among which, The input layer can receive the cloth geometry, material properties, and initial state as inputs from the geometric model parameters of the cloth simulation. The feature extraction layer, connected to the input layer, can automatically extract key region features based on the fabric geometry, material properties, and initial state input from the input layer, and determine the geometric features, material features, and dynamic features of the fabric to be simulated as the extracted multi-type feature parameters of the fabric to be simulated. The output layer, connected to the feature extraction layer, encodes the multi-type feature parameters of the fabric to be simulated extracted by the feature extraction layer into a feature parameter vector and outputs it.
3. The fabric simulation method for improving realism and efficiency according to claim 1 or 2, characterized in that, The fabric motion trajectory prediction model is trained in the following manner, including: Step 11, Model the fabric to be simulated: Based on the data obtained from the geometric model parameters of the fabric to be simulated, model the geometric model of the fabric to be simulated as an elastic element, and determine the stress energy function of the elastic element. Step 12, perform differentiable simulation on the elastic element obtained from the modeling in Step 11: Construct a physical simulator that supports automatic differentiation, and use the physical simulator to iteratively solve the motion state of the fabric by combining the elastic element and the material parameters of the fabric to be simulated, and predict the motion trajectory of the fabric. Step 13: Compare the predicted trajectory of the fabric movement from Step 11 with the observed trajectory of the corresponding real fabric to obtain the comparison result; Step 14: Based on the comparison results obtained in Step 13, determine whether the loss function value between the predicted result of the cloth movement trajectory and the observed trajectory of the real cloth to be simulated reaches the preset minimum value. If yes, end the training; otherwise, proceed to Step 15. Step 15: Optimize the fabric material parameters and return to step 12.
4. The fabric simulation method for improving realism and efficiency according to claim 3, characterized in that, In step 11, the geometric model of the fabric to be simulated is modeled as an elastic element in the following manner, and the stress energy function of the elastic element is determined, including: The geometric model of the fabric to be simulated is modeled as a mesh, and each geometric model of the fabric to be simulated is constructed as an elastic element in the form of a triangle; the corresponding stress energy function is determined according to the specific model of the elastic element. In step 12, the physical simulator used is a physical simulator that supports automatic differentiation built with PyTorch+Taichi+ChainQueen. In step 12, the discrete dynamic equations used to iteratively solve the motion state of the fabric by combining the elastic element and the material parameters of the fabric to be simulated with a physical simulator are as follows: ; in, Indicates the frame rate of t+1; Indicates frame rate t; This means that with a time step of 24fps, Δt = 1 / 24 ≈ 0.0417. Represents the acceleration in frame t; Indicates the position of frame t+1; Indicates the position of frame t; Among them Calculate as follows: ; in, Represents the mass matrix; Indicates external force; This represents the negative gradient of the geometry model of the cloth to be simulated with respect to energy. The automatic differentiation engine automatically calculates the formula as follows: ; in, It represents strain energy, which is the elastic potential energy stored in the fabric during its current deformation; This represents the positions of all vertices of the geometric model of the cloth to be simulated; In step 14, the loss function The definition of is: ; in, This represents the fabric material parameters of the fabric to be simulated; Indicates a time frame; Indicates the total duration of time; Represents the simulated predicted trajectory; This represents the actual trajectory data corresponding to the real fabric. In step 15, optimizing the fabric material parameters involves updating the fabric material parameters of the fabric to be simulated using backpropagation, which is performed by any one of Adam, SGD, or LBFGS.
5. The fabric simulation method for improving realism and efficiency according to claim 1 or 2, characterized in that, The neural network enhancement model in step 2 adopts a hybrid dynamic model that performs residual compensation and parameter inversion on the traditional cloth physical model.
6. The fabric simulation method for improving realism and efficiency according to claim 1 or 2, characterized in that, In step 1, the extracted multi-type feature parameters of the fabric to be simulated include: The geometric, material, and dynamic characteristics of the fabric to be simulated.
7. The fabric simulation method for improving realism and efficiency according to claim 6, characterized in that, The geometric features include: the wrinkles and edges of the fabric to be simulated; The material characteristics include: the texture and fibers of the fabric to be simulated; The dynamic characteristics include the motion trajectory and acceleration of the fabric to be simulated.
8. A fabric simulation system for improving realism and efficiency in implementing the method according to any one of claims 1-7, characterized in that, include: The system comprises an input module, a cloth motion trajectory prediction model, a neural network enhancement model, a traditional physical model, and a hybrid output module; among which, The input module is connected to the fabric motion trajectory prediction model, and can obtain the geometric model parameters that need to be simulated for the fabric, and send them to the fabric motion trajectory prediction model. The fabric motion trajectory prediction model is connected to the neural network enhancement model and the traditional physical model respectively. It can extract multiple types of feature parameters of the fabric to be simulated, encode the obtained multiple types of features into feature parameter vectors, and output them to the neural network enhancement model and the traditional physical model respectively. The neural network enhancement model, connected to the hybrid output module, can predict local parameters based on the input feature parameter vector and output them to the hybrid output module. The traditional physical model, connected to the hybrid output module, can obtain fabric simulation data based on the input feature parameter vector. The hybrid output module can couple and output the local parameters predicted by the neural network enhancement model with the fabric simulation data obtained by the traditional physical model in a hybrid manner to obtain the simulation results of the fabric to be simulated.
9. A processing device, characterized in that, include: At least one memory for storing one or more programs; At least one processor is capable of executing one or more programs stored in the memory, such that when the one or more programs are executed by the processor, the processor can perform the method according to any one of claims 1-7.
10. A readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it can implement the method described in any one of claims 1-7.