PDA

View Full Version : Quaternion interpolation



HollanErno
07-31-2009, 07:47 AM
Hello,

I have a quaternion class that implements spherical linear interpolation, normalized linear interpolation and spherical cubic interpolation of two quaternions. What I would like to achieve now is a formula to interpolate a series of quaternions defining a sort of quaternion-spline so that the interpolated quaternions pass through the quaternion control points, a bit like catmull-rom splines but with quaternions as control points.

I could of course use normalized quaternion linear interpolation but this does not achieve constant velocity. I have read somewhere that this can be achieved using cubic interpolation but I miss the exact details. I guess that there is a clever formula to smoothly interpolate across a set of quaternions with constant velocity, probably every decent skeletal animation implementation does that... Can anyone point to to a working sample or explanation of how to achieve this?

Thanks!
Mic

DmitryM
07-31-2009, 12:01 PM
It's not OpenGL advanced, but directly Math question, so should be moved there.

Alfonse Reinheart
07-31-2009, 12:53 PM
probably every decent skeletal animation implementation does that...

No, they don't. Quaternion SLERP is as good as it gets. Many animation systems don't even bother with that, using a straight LERP + Normalize instead.

HollanErno
08-02-2009, 01:55 PM
Hi Alfonse, thank you for your reply, problem solved then! :)