3ds file: rot keyframes
26-Oct-95 13:05:19
Sb: #197048-3ds file: rot keyframes
Fm: Mark Hodges 75362,2555
To: Mark Hodges 75362,2555
AAAAAHHHHHH! I found the solution!!!
PROBLEM STATEMENT: 3DS file keyframes are incremental. Find absolute
rotations for each keyframe.
BAD SOLUTION: Convert each rot keyframe to a 4×4 matrix. Find the accumulated
rotation by concatenating the new matrix with previous keyframe rotation
matrices. Convert the resulting matrix back into a quaternion.
This caused my model to pivot by 180 degrees whenever the rotation angle was
reversed in the middle of the animation. My guess is this may have something
to do with the fact that a rotation may be represented by 2 quaternions.
(Negate angle and axis to get the other quaternion.) I really haven't
investigated why this happens, though I am currious to know what the true
reason is.
CORRECT SOLUTION: Scap the intermediate matrices. Accumulate the rotations
with quaternions.
quatAccum *= quat[i]
Thanks again for the support!
Mark Hodges
Gravity Inc.