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多核架构。