[Bf-committers] Quat interpolation and shortest distances problem
-- Fixed
Roland Hess
rolandh at reed-witting.com
Mon May 1 19:11:08 CEST 2006
Old problem, revisited and fixed...
From a bf-committers mail of two months ago:
> 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:
According to Ton, this was a key setting problem, not a quat calc
problem. So, I looked in the key setting function, and added a little
routine that checks the about-to-be-added quat key value against it's
predecessor. If it's a flipped value (absolute value close to it's
neighbor but opposite sign), it's righted. BTW, I tested with in
conjunction with Action Baking, which makes tons of quat keys, and it
solved all pose flipping problems!
Simple enough that I hope some intrepid soul commits it!
Bug and patch at:
http://projects.blender.org/tracker/index.php?
func=detail&aid=4160&group_id=9&atid=125
Roland Hess
harkyman
More information about the Bf-committers
mailing list