Re: [Algorithms] Representing Animation Key Frame with Quaternion + Translation Vector
Brought to you by:
vexxed72
From: Jon W. <jw...@gm...> - 2008-06-23 17:59:18
|
Lim Sin Chian wrote: > > Just wondering if anyone has done this before and whether it is really > better in terms of performance and accuracy. I'm under the impression that everybody does that. Not only does it save space (assuming you don't need scale), but it also interpolates much better. Interpolating between two frames with a matrix looks pretty crufty. The only thing to watch out for is to make sure you go the "short way" around -- dot product the two quaternions, and if the outcome is negative, negate all the values of the destination. To compose quaternions, you just multiply them. Because it's a rotation-translation pair, if it's parent relative, then you apply the parent rotation to the child translation, and then apply your own rotation around that point. Sincerely, jw |