We present DiffXPBD, a novel and efficient analytical formulation for the differentiable position-based simulation of compliant constrained dynamics (XPBD). Our proposed method allows computation of gradients of numerous parameters with respect to a goal function simultaneously leveraging a performant simulation model. The method is efficient, thus enabling differentiable simulations of high resolution geometries and degrees of freedom (DoFs). Collisions are naturally included in the framework. Our differentiable model allows a user to easily add additional optimization variables. Every control variable gradient requires the computation of only a few partial derivatives which can be computed using automatic differentiation code. We demonstrate the efficacy of the method with examples such as elastic material parameter estimation, initial value optimization, optimizing for underlying body shape and pose by only observing the clothing, and optimizing a time-varying external force sequence to match sparse keyframe shapes at specific times. Our approach demonstrates excellent efficiency and we demonstrate this on high resolution meshes with optimizations involving over 26 million degrees of freedom. Making an existing solver differentiable requires only a few modifications and the model is compatible with both modern CPU and GPU multi-core hardware.
翻译:我们提出了DiffXPBD,一种新颖且高效的解析公式,用于柔顺约束动力学(XPBD)的可微分位置仿真。所提出的方法允许利用高性能仿真模型同时计算多个参数相对于目标函数的梯度。该方法高效,从而能够对高分辨率几何体及自由度进行可微分仿真。碰撞自然包含在该框架中。我们的可微分模型使用户能够轻松添加额外的优化变量。每个控制变量的梯度只需计算少量偏导数,这些偏导数可通过自动微分代码计算。我们通过弹性材料参数估计、初始值优化、仅通过观测服装来优化底层身体形状与姿态,以及优化时变外力序列以匹配特定时刻的稀疏关键帧形状等示例展示了该方法的有效性。我们的方法展现出卓越的效率,并在涉及超过2600万个自由度的高分辨率网格上进行了优化验证。使现有求解器具有可微分性仅需少量修改,且该模型兼容现代CPU和GPU多核硬件。