[Bf-committers] Quat interpolation and shortest distances problem

Mats Holmberg mats.holmberg at elisanet.fi
Wed Mar 22 20:06:59 CET 2006


Roland Hess wrote:

> While working with Action Baking (translating object-level motion  
> into a bone-level Action), I've run across a small deficiency in the  
> way that Blender handles moving between some quat positions.
>
> The problem is that under certain conditions what should be a 10  
> degree rotation along an axis in the course of a few frames turns  
> into a 350 rotation, generating a "flipping" effect. It seems that  
> when smoothly interpolating between two quat positions, Blender on  
> occasion does not choose the shortest route. This problem was noted  
> already in OGRE, and a search turned up this page in their Wiki that  
> references the problem:
>
> http://www.ogre3d.org/wiki/index.php/Quaternion_and_Rotation_Primer
>
> It is noted in the question "Why do I occasionally get a flickering  
> of my object while it is rotating?"
>
> The answer (from the OGRE wiki) is:
>
> "A. Quaternion::Slerp(), Quaternion::nlerp() etc. have a  
> "shortestPath" parameter that defaults to false. Ensure it is true,  
> otherwise the interpolation occasionally goes the longer path, which  
> might result in a few frames of completely discontinuous orientations."
>
> And while the technical aspects are lacking there, it seems this  
> problem has been identified and solved elsewhere. I've been informed  
> that fixing this deficiency is on someone's To Do List, and I thought  
> it would be a good idea to post for the record that a fix already  
> exists (albeit in a different software package), and that the OGRE  
> sources might be a good place to start.
>
> Roland Hess
> harkyman
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
 From a users point of view this behaviour is especially problematic, 
because you never seem to notice it in time. Very often it becomes 
difficult to correct afterwards - even virtually impossible, so one 
tends to try and hide the flip somehow.

I became aware of the problem during my last project, but thought I had 
only made some mistakes while animating. Reassuring to know this isn't 
the case.

Cheers,
Mats


More information about the Bf-committers mailing list