diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-04-05 18:40:59 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-04-13 16:27:42 +0300 |
commit | 51c8a6f491d3b21a6c91af6267f58d4f0add58af (patch) | |
tree | d254efa3f8eee0efc31da345a726db971610ee42 /source/blender/physics | |
parent | f7e35d61f826c8e3581b34eea36b8fc39c572bee (diff) |
Fix T37500: implement Bendy bone segment deformation interpolation.
Previously B-Bone deformation mapped every vertex to just one
B-Bone segment. This results in abrupt transformation differences
between the sides of each threshold plane, reducing the quality
of B-Bone deformation and making the use of shape keys impractical.
This commit replaces this approach with a linear blend between
the two closest segment transformations, effectively representing
the B-Bone as two weight-blended plain bones for each vertex.
In order to distribute the interpolation more evenly along the
bone, segment matrices for deformation are now computed at points
between the segments and at the ends of the B-Bone. The computation
also uses the true tangents of the Bezier curve for the orientation.
The nodes at the end of the bone require some special handling to
deal with zero-length Bezier handles caused by a zero ease value.
The Copy Transforms constraint now also smoothly interpolates
rotation and scaling along the bone shape when enabled.
The initial version of the patch was submitted by @Sam200.
Differential Revision: https://developer.blender.org/D4635
Diffstat (limited to 'source/blender/physics')
-rw-r--r-- | source/blender/physics/intern/implicit_blender.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/source/blender/physics/intern/implicit_blender.c b/source/blender/physics/intern/implicit_blender.c index cc8caca9588..83f586c4078 100644 --- a/source/blender/physics/intern/implicit_blender.c +++ b/source/blender/physics/intern/implicit_blender.c @@ -493,18 +493,6 @@ BLI_INLINE void madd_m3_m3fl(float r[3][3], float m[3][3], float f) r[2][2] += m[2][2] * f; } -BLI_INLINE void madd_m3_m3m3fl(float r[3][3], float a[3][3], float b[3][3], float f) -{ - r[0][0] = a[0][0] + b[0][0] * f; - r[0][1] = a[0][1] + b[0][1] * f; - r[0][2] = a[0][2] + b[0][2] * f; - r[1][0] = a[1][0] + b[1][0] * f; - r[1][1] = a[1][1] + b[1][1] * f; - r[1][2] = a[1][2] + b[1][2] * f; - r[2][0] = a[2][0] + b[2][0] * f; - r[2][1] = a[2][1] + b[2][1] * f; - r[2][2] = a[2][2] + b[2][2] * f; -} ///////////////////////////////////////////////////////////////// /////////////////////////// |