System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 446.14
Blender Version
Broken: version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: rB0f45cab862b8
Worked: /
Short description of error
The matrix multiplication function is buggy, or the matrix > to_quat/to_euler conversion is buggy. This issue propagate in python addons that uses such functions, including the Fbx export where bones rotation are calculated in bone parent space:
https://developer.blender.org/T77811
It happens when a child bone has a nearly 180° angle or 0° with its parent bone, and possibly related to scale value being non equal to 1.
Exact steps for others to reproduce the error
- Open this blend file:
- It contains two bones on the right: the longest one, named "2" is the child of "1". "2" is animated, making a simple rotation.
- The bone on the left named "3" is used to testify the issue, as well as the mesh object on the left "Cube" to testify it doesn't happen with bones only
- Click "Run Script". The script does the following > get the matrix in local space (parent space) of bone "2" > apply this matrix either by extracting the quaternion rotation from the matrix and set this rotation to bone "3", or by setting directly the matrix_local of "Cube"
- Notice that rotations are incorrect, they jitter, while the rotation of bone "2" is pretty linear.
- Now select bone "1" in Edit Mode, scale it bigger and rotate it upside down > No more jitters