Fine-grained Differentiable Physics: A Yarn-level Model for Fabrics

Deshan Gong, Zhanxing Zhu, Andrew J. Bulpitt, He Wang

Introduction

Most current differentiable physics models (DPMs) are "coarse-grained." When simulating cloth, they typically treat it as a single, homogeneous sheet. While this approach suffices for simple animations of curtains or flags, it fails to capture the true mechanical nature of real-world fabrics. Real fabrics are composite materials made of interlaced yarns—warps and wefts—woven in specific patterns like plain, satin, or twill.

This paper introduces the first yarn-level differentiable physics model for fabrics. By modeling individual yarns and their complex physical interactions, the authors enable high-fidelity cloth simulation that can learn physical parameters from just a few frames of video. This fine-grained approach allows for solving complex control tasks significantly faster than traditional reinforcement learning methods.

The Challenge of Yarn-Level Physics

The primary challenge in modeling fabric at the yarn level is that the underlying physics is mathematically messy. Interactions such as friction and the way yarns "lock" together when sheared are traditionally modeled using non-differentiable, piece-wise functions (e.g., the standard Coulomb friction model). This lack of differentiability makes it impossible to use gradient-based learning to optimize or infer a fabric's dynamics. Without a fine-grained, differentiable approach, accurately estimating a fabric's specific material properties from observation—or precisely controlling it for robotic manipulation—remains out of reach.

Methods: Fine-grained Differentiable Physics (FDP)

To overcome these limitations, the authors propose a Fine-grained Differentiable Physics (FDP) model that operates directly at the level of individual yarns.

1. Representation The model employs an Eulerian-on-Lagrangian discretization. Instead of tracking a continuous sheet, the state is defined by "crossing nodes" where warp and weft yarns intersect.

Yarn crossing nodes representation

2. Differentiable Force Models The core innovation of the FDP model is the replacement of "broken" (indifferentiable) empirical physics models with smooth, differentiable counterparts:

  • Contact: A ReLU-based formulation ensures yarns push against each other without sticking or passing through one another.
  • Friction: Instead of the discontinuous Coulomb model, the authors utilize a continuous function inspired by the Stribeck effect. This captures the smooth transition from static to kinetic friction and simulates the subtle "stick-slip" vibrations characteristic of yarns.
  • Shear: Real fabrics exhibit a "shear lock" effect, where yarns can rotate relative to each other until they hit a critical angle and lock in place. The authors introduce a differentiable shear lock model using a tanh-based smoothing function, making this sudden transition gradient-friendly.
Differentiable shear lock model

3. Optimization The system uses implicit Euler integration. To propagate gradients through the simulation, the authors employ implicit differentiation, allowing the model to learn efficiently by backpropagating through time.

Datasets and Key Insights

Because no yarn-level differentiable benchmark existed, the authors created a comprehensive synthetic dataset using a high-fidelity (but non-differentiable) yarn-level simulator. This dataset includes 9 types of hybrid fabrics, combining 3 woven patterns (plain, satin, twill) with 3 different yarn materials varying in density, elasticity, and bending stiffness.

Several key insights emerged from their experiments:

  • Explicability over Black-Boxes: Unlike neural networks that merely mimic cloth visually, the FDP model learns actual physical constants (like yarn density or friction coefficients). This yields interpretable results valuable for textile engineering.
  • The Power of Inductive Bias: By embedding the laws of physics directly into the learning loop, the model requires drastically less data. It can learn the properties of a complex fabric from just the first 5 frames of a simulation.
  • Small to Large Generalization: Parameters learned on a tiny 5x5 patch of cloth generalize perfectly to a 25x25 sheet. This suggests that physics can be learned on small, computationally cheap simulations and seamlessly applied to massive, complex ones.

Results and Limitations

The FDP model demonstrated significant improvements over existing methods:

  • Inverse Problems: When tasked with estimating material properties from video, the FDP model reduced error by up to 96% compared to state-of-the-art sheet-level models, significantly outperforming Bayesian Optimization.
  • Control Learning: In a robotic manipulation task requiring a cloth to be "thrown" into a box, the FDP model (using direct gradients) found a solution in a fraction of the time required by Proximal Policy Optimization (PPO).

Limitations and Future Work Despite its successes, the model has constraints. As a physics-based model, it requires domain knowledge to set up (e.g., knowing the material is a woven fabric). Furthermore, simulating every single yarn incurs a higher computational overhead than treating cloth as a single mesh, though the accuracy gains and gradient efficiency often justify the cost. Future directions include extending this framework to other "mesh-like" materials, such as metal or plastic nets, and incorporating complex phenomena like permanent material damage (plasticity) and buckling.

Summary updated

BibTeX
@inproceedings{gong2022fine,
  author = {Deshan Gong and Zhanxing Zhu and Andrew J. Bulpitt and He Wang},
  title = {{Fine-grained Differentiable Physics: A Yarn-level Model for Fabrics}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=KPEFXR1HdIo},
}
Figure