Jump to content
  • Advertisement
Sign in to follow this  
Pokemonster

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!