Blender Git Loki

Git Commits -> Revision 16eafda

Revision 16eafda by Alexander Gavrilov (master)
October 20, 2021, 09:58 (GMT)
Fix precision issues and a bug in vec_roll_to_mat3_normalized.

When the input vector gets close to -Y, y and theta becomes totally
unreliable. It is thus necessary to compute the result in a different
way based on x and z. The code already had a special case, but:

- The threshold for using the special case was way too low.
- The special case was not precise enough to extend the threshold.
- The special case math had a sign error, resulting in a jump.

This adds tests for the computation precision and fixes the issues
by adjusting the threshold, and replacing the special case with one
based on a quadratic Taylor expansion of sqrt instead of linear.

Replacing the special case fixes the bug and results in a compatibility
break, requiring versioning for the roll of affected bones.

Differential Revision: https://developer.blender.org/D9551

Commit Details:

Full Hash: 16eafdadf6040fb84bacf657ac0bf16a78e1057e
Parent Commit: df445cc
Lines Changed: +216, -38

4 Modified Paths:

/source/blender/blenkernel/BKE_blender_version.h (+2, -2) (Diff)
/source/blender/blenkernel/intern/armature.c (+25, -20) (Diff)
/source/blender/blenkernel/intern/armature_test.cc (+63, -4) (Diff)
/source/blender/blenloader/intern/versioning_300.c (+126, -12) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021