|home||gallery||Kristinka||ICE and Houdini||Maya||about|
|Just a few node setups,
I've found interesting when I've played with Maya LT. Of course
nothing new here, while I think
these small tricks are still not so well known. Let's call them 'Maya
Node Editor stupid tricks'.
|First one is
sort of common reverse setup, but this one is 3d, let's say if someone
wants a reverse spine setup. Second chain is
driven by first one, rotations are just parallel multiply by -1,
last joint of first chain is driver of first (or second) joint in driven chain, so on.
I think anyone who tried 3d variance of this setup, already noticed that rotation does not match, due to additive nature Euler rotations.
So, there's simple trick to get them to work properly - rotation order of driven chain has to be 'reversed', too. Here, XYZ order on driver chain is ZYX on driven one, and that's it.
|Here is how
this is looking in Maya Node Editor - it won't display hierarchy, but
it is able to connect anything related to transforms, which makes it
ideal for making any sort of additional connections. Also, whatever you
do, using built in utilities, it seems to be blazing fast to evaluate.
|Second is 'hand-made'
point and orient constraint.
They are simplifications, no offsets or such things, while is still
possible to blend them with local transforms, Maya seems to create the
PairBlend node in same way, just by setting the key on driven
transform. However I believe they are always evaluating, making it
easier to keep the basic structure of rig always on predictable state,
even there is no any animation. Let's say in case of resetting the
transforms of driven objects, on scene load and so. Used these setups
frequently, whenever wanted to override translation or rotation. I
think the pattern is pretty much the same as with Maya built-in
constraints: transform of driver is firstly converted to local
transform space, then there is override or blend.
|This one is probably more interesting. I call it 'Half of Soft IK'. It tries to avoid a typical 'snap' at low angles when bones are driven by IK, by small change of bone length at low angles. It's not good for transition into plain bone stretch as Soft IK is. At maximum distance between first and last element of chain, it just stops with rotation, but, it is trying to provide as much linear change of angle between the bones, as it is noticeable from Graph Editor's snapshot.|
|How it works
- distance between first and last element in chain is used for
exponential blend between desired maximum and minimum bone length .
"Bone stretch fraction" is a maximum negative stretch of bone, here it
is 1/20 of bone length. For use in real world, perhaps is good idea to
keep the maximum bone length value, by something more resistant to
deleting than used AddDoubleLinear node, like custom attribute, of
transform value of some locator. To make it simple, bone lenght is
defined only by X distance, all 'joint orient' values are set to zero.
It was preferred angle to tell how bone is rotated.
|One not used here, but have plans
about it. It's smooth Blend Shape blending. While smooth interpolation
of relative Blend Shapes is added to latest Mayas, it seems it's
possible to create it only as 'internal' shape, buried somewhere in
BlendShape node, allowed to edit only through the new Shape Editor. Not
so nice in case the targets are imported. If I want to use Shrink Wrap
as editing operator, result is a sort of funny, but completely
|So that's just a classic, not
relative Blend Shape, where weights
are driven by nodes. Sort of effect that looks easy to do
manually with function curves, but in reality it is only machine who is
able to do it properly. This one works only with two targets, no more
or less. Blend will pass exactly through first target.
|Finally, Shear. In Maya, that's
easy to use transform
option, nicely understood by skin operator, too. When it comes to
skinning, I think everyone noticed that many deformations from reality
are looking more like shearing, not really as plain rotation. Hand -
arm, body - leg or head - neck interface and more. Caveat is, that not
everyone else is able to perform Maya style of shearing, and that
includes FBX. Shear is simply ignored FBX, and by a lot of game engines
or 3d apps. Anyway it was a so strong helper with skinning, enough
strong for me to take look, how to export a complete deformed mesh
instead of skinned skeleton. In Maya LT bounds, that's old school,
plain snapshot of all deformations, utilized as sequence of relative
|However, how to get angles between
bones to drive Maya
shear, properly. Usually it is Tangens trig function, but no one of
this kind that comes with Maya. So, 'workaround' is to build the function,
like in screenshot. We want to split transform between arm and hand,
here, that's reason for half of input angle. Rotation along Z axis,
driving the along Y aligned vector is completely arbitrary (axis just
needs to be orthogonal to vector), could be used anytime. Finally,
divide of two vector components is exactly what tangens function is
doing. On higher angles closer to 90 degree, thing can go into
something really undesired, forcing an infinite shearing. If so, there
should be some additional clamp (not added here). From my small
experience, it's good to clamp the thing before, somewhere around input