Blender Git Loki

Git Commits -> Revision e91ea20

Revision e91ea20 by Alexander Gavrilov (master)
September 3, 2019, 16:35 (GMT)
Drivers: support decomposing rotation into swing followed by twist.

In order to correctly drive corrective shape keys from a freely
rotating organic joint it is very often found necessary to
decompose the rotation into separate bending and twisting
motions. This type of decomposition cannot be reproduced by
any Euler order or a single quaternion.

Instead this is done by using a helper bone with a Damped Track
constraint aimed at the tail of the control to pick up the bending,
and its helper child with Copy Transforms to separate the twist.

Requiring two additional bones to drive a shape key or a correction
bone seems inconvenient, so this implements the necessary math as new
options in the recently introduced Rotation Mode dropdown of the
Transform Channel driver variable type. The data is also accessible
as a Transformation constraint input.

The output is in the form of Quaternion-derived 'pseudo-angles',
which for `Swing and Y Twist` would represent the following:

* W: true bend angle, independent of bend direction.
* Y: true twist angle.
* X, Z: pseudo-angles representing the proportion of bending around X/Z.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5651

Commit Details:

Full Hash: e91ea20ebee800600ec073f9738b448778372453
Parent Commit: b3b59e3
Lines Changed: +85, -0

5 Modified Paths:

/source/blender/blenkernel/intern/fcurve.c (+19, -0) (Diff)
/source/blender/blenlib/BLI_math_rotation.h (+2, -0) (Diff)
/source/blender/blenlib/intern/math_rotation.c (+43, -0) (Diff)
/source/blender/makesdna/DNA_anim_types.h (+6, -0) (Diff)
/source/blender/makesrna/intern/rna_fcurve.c (+15, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021