From e72ecaa371579b2068491871f068e813d0696233 Mon Sep 17 00:00:00 2001 From: Josh Belanich Date: Wed, 8 Jan 2020 17:01:32 +0100 Subject: Fix T66529: Cycles motion blur render errors with fast rotating objects In transform_motion_decompose, successive quaternion pairs are checked to be aligned such that their interpolation is rotation through the shortest angle between them. If not, the first in the pair was flipped. This can cause problems for sequences of more than 2 quarternions, since flipping the first in a pair might misalign the previously pair, if unlucky. Instead, this change flips the second in the pair, which is safe when iterating forwards. Differential Revision: https://developer.blender.org/D6537 --- intern/cycles/util/util_transform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern') diff --git a/intern/cycles/util/util_transform.cpp b/intern/cycles/util/util_transform.cpp index 6a9bfbea4ca..5d64e08b022 100644 --- a/intern/cycles/util/util_transform.cpp +++ b/intern/cycles/util/util_transform.cpp @@ -271,7 +271,7 @@ void transform_motion_decompose(DecomposedTransform *decomp, const Transform *mo /* Ensure rotation around shortest angle, negated quaternions are the same * but this means we don't have to do the check in quat_interpolate */ if (dot(decomp[i - 1].x, decomp[i].x) < 0.0f) - decomp[i - 1].x = -decomp[i - 1].x; + decomp[i].x = -decomp[i].x; } } } -- cgit v1.2.3