diff options
author | Josh Belanich <jbelanich> | 2020-01-08 19:01:32 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-01-08 19:23:41 +0300 |
commit | e72ecaa371579b2068491871f068e813d0696233 (patch) | |
tree | 65cb45f78688227333e4d439155f094a0dfe7801 /intern | |
parent | 6bca11a84754ab2cd409e249ed00ec2269de89d1 (diff) |
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
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/util/util_transform.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; } } } |