实时图形中的骨骼动画插值

Skeletal animation interpolation in real-time graphics

骨骼动画关键帧之间的插值有标准的插值方法吗?现在我正在使用 glm::slerp().

除了slerp和lerp之外还有插值方法吗?

根据glm docsglm::mix(quat1, quat2, a)对两个四元数进行球面线性插值,glm::slerp(quat1, quat2, a)对两个四元数进行"short path spherical linear interpolation"。有什么区别?

如有疑问,look at source code。唯一的区别是这部分(除了不同的 x/y/z 命名):

    // If cosTheta < 0, the interpolation will take the long way around the sphere. 
    // To fix this, one quat must be negated.
    if (cosTheta < T(0))
    {
        z        = -y;
        cosTheta = -cosTheta;
    }

基本上它们是相同的,除了 slerp 确保插值将在球体上采用较短的路径,而 mix 不关心并且可能采用相反的较长路径。

还有很多其他的插值方法;可能最先进的是贝塞尔曲线(我用得最多的动画软件),但它需要更多的内存和计算能力。