Basically, I'm getting a bug where the rotations in the animations seem to be skewing the model even though I'm normalizing them. I suspect that the rotations are showing the error, but not causing it, if that makes sense. But that's based on the idea that a normalized quaternion can't skew a model.


1 Answer 1


Yes. There are two equivalent normalized quaternions for every orientation in 3D space (the unit quaternions form a double cover over the space of orientations), and every unit quaternion can be expressed as an angle-axis rotation.

If you're observing skewing, then it's not from your quaternions themselves, but could be due to non-uniform scales at parent levels of your hierarchy, or a math error somewhere. We'll need to see more of your implementation to advise, though.

Consider asking a question "How do I solve this unwanted skew in my skeletal animation?" instead.

  • \$\begingroup\$ Thank you! I suspect that the some of the data produced by the exporter has a floating point rounding error, which would explain why it doesn't happen with sample animation files made by khronos group; so mostly i just needed to narrow down where the error might be. \$\endgroup\$ Commented Oct 8, 2018 at 3:43
  • \$\begingroup\$ We give floating point a hard time, but used correctly, a single-precision float should have a relative error of only 2^-24 (or less than one part in ten million). This amount of error in an animation keyframe should not be perceptible. You might have an accumulation error somewhere that allows tiny errors to snowball frame over frame or through repeated calculations though. Updating a matrix from a previous matrix each frame is one common way to get this kind of drift if you don't correct dor it. \$\endgroup\$
    – DMGregory
    Commented Oct 8, 2018 at 15:03
  • \$\begingroup\$ @DMGregory How do you correct for that drift? \$\endgroup\$
    – trusktr
    Commented Mar 14, 2023 at 5:55
  • \$\begingroup\$ See my answer here. \$\endgroup\$
    – DMGregory
    Commented Mar 14, 2023 at 11:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .