Define smoothness in squad quaternion interpolation

This topic is 5402 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi there, is there a way to define the smoothness in a cubic slerp (squad) interpolation of quaternions. As a concrete example, I'm using squad to interpolate camera orientations. The animation is smoother than using a standard slerp approach, but not as smooth as I would have expected. So I like to tweak the creation of the in-between quaternions, but I'm not exactly sure how...

Share on other sites
A couple of things you could try:

Calcuate the second derivative of the quaternion over time and see how it varies. In smooth motion even if the first derivative is large (i.e. speed/velocity is high) the second derivative should be small or bounded. Conversely, sudden accelations and changes of speed/direction are associated with large second derivatives. For discrete data, e.g. the orientation at t, 2t, 3t, etc., work out the second differences.

Another sort of smoothness, or lack of it, is measured by curvature. E.g. when a spline loops back on itself in a tight loop it has a high curvature. See e.g.
http://mathworld.wolfram.com/Curvature.html
for a definition and how to calculate it. It's not as straightforward as the second derivative/difference but may be more more appropriate.

Share on other sites

Thanks alot, I figured out what was wrong. I made an error when calculating the logarithm of a quaternion, which resulted in slightly bad in-between quats.

• 21
• 13
• 9
• 17
• 13