[Bf-blender-cvs] [e72ecaa3715] master: Fix T66529: Cycles motion blur render errors with fast rotating objects

Josh Belanich noreply at git.blender.org
Wed Jan 8 17:31:08 CET 2020


Commit: e72ecaa371579b2068491871f068e813d0696233
Author: Josh Belanich
Date:   Wed Jan 8 17:01:32 2020 +0100
Branches: master
https://developer.blender.org/rBe72ecaa371579b2068491871f068e813d0696233

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

===================================================================

M	intern/cycles/util/util_transform.cpp

===================================================================

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;
     }
   }
 }



More information about the Bf-blender-cvs mailing list