forked from bartvdbraak/blender
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
This commit is contained in:
parent
6bca11a847
commit
e72ecaa371
@ -271,7 +271,7 @@ void transform_motion_decompose(DecomposedTransform *decomp, const Transform *mo
|
|||||||
/* Ensure rotation around shortest angle, negated quaternions are the same
|
/* Ensure rotation around shortest angle, negated quaternions are the same
|
||||||
* but this means we don't have to do the check in quat_interpolate */
|
* 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)
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user