• Editor
  • Key Transform Constraint Constrained Bones

Related Discussions
...

Lately I've found myself creating duplicate transform constraints with the only difference between the two being which bones are constrained.

Say you have a weapon bone with two hand-holds: hilt-hold and pommel-hold. The weapon bone has two zero-length child bones to represent these hold positions, and transform constraints to make a character's hands stay on the hand-holds.

If I want the flexibility of having the character hold the pommel-hold with either their left-hand or right-hand, I have to have two transform constraints: one constraining the left-hand targeting the pommel-hold, one on the right-hand targeting the pommel-hold.

I think there could be a lot of applications where a transform constraint is being used to simulate re-parenting and the spine user could want to be able to change which bone(s) are 're-parented'

The ability to key which bones are constrained would make it so I only ever need one transform constraint for each bone I want to 're-parent' to.

Hmm so you would like to be able to reparent the target during an animation, I wonder if it's actually doable?
fwiw I can share with you a similar setup where you can decide if a hand stays on the weapon or not: How to make both hands stay on the weapon?
Although I guess you probably did it already like this/in a similar manner XD

Perhaps, but I'm not familiar with the terminology of parenting when it comes to constraints. If you mean actually re-parenting from one bone to another, no, I'm only talking about pseudo-re-parenting via transform constraints.

Yeah, that's where I started for my animation. Now I want to be able to make each hold-bones+constraint on the weapon be usable for either (or both) hand(s) by changing which hand(s) is(are) constrained by the transform constraints that target the hold-bones.

Just to clarify, I'm not talking about actual re-parenting, I'm just talking about transform-constraining bone-c to bone-p with no offsets and 100% mix to simulate re-parenting

So, in the second project in the linked thread you can choose if a hand follows the weapon, or not, by keying the influence of the constraint during the animation.

But you can also have multiple constraints for the same bone that you can turn on and off during an animation.

And this sounds to me like what you were trying to achieve, did you already try this?

Yes, but I'm trying to avoid having more constraints than I have holds. With the method linked, I would need one constraint for every combination of hands and holds.

This isn't too bad for a humanoid, you only need 4, 2 for each of the two hands to each of the two holds. But say you have and octopus with 8 arms holding a spear at 8 different holds. This would require 8 * 8 = 64 constraints if I wanted to be able to attach any hand to any hold.

I would need more constraints if I wanted a hold to be able to have more than one hand attached to it at the same time. This would lead to 8 * 17 * 8 = 1088 constraints!!

An octopus would need one constraint per "hand" to hold a spear in any number of positions. But it would look funny for it to use all hands to hold the spear. :p

Really? How would you change which hold the hand was bound to in the animation?

It does. After she switches to animate mode, the hands can move. The IK constraint targets are parented to the large bone. Did you look at the project?

I am.
I've tried downloading both versions of the project uploaded by Erikari that I see, is there another one?

I see that the hands go from not being attached to the weapon to being attached to the weapon, but I don't see where one hand switches from holding the weapon at one position to holding the weapon at the other position.

I want something like the hand-l bone go from being constrained to bone hand-l5 to being constrained to bone hand-l3.

supersaiyansubtlety wrote

I don't see where one hand switches from holding the weapon at one position to holding the weapon at the other position.

You can move the IK targets weapon/hand-l and weapon/hand-l2 to hold the weapon at a different position. You could also do it by adding more bones and constraints, but it's simpler to just translate those bones.

I know I can move the hold bones or make more constraints, but I'm suggesting a feature that would make that unnecessary.

The octopus example would be extremely cumbersome to make with methods you suggested. I know it's a silly example, but I think the issue of wanting to change which bones are constrained by a transform constraint is not uncommon.

Perhaps this will be a better example:
I'm making a dodgeball animation, in which my character has different kinds of balls flying towards them and they need to catch each ball and throw it back. There's a basketball, a baseball, a softball, a tennisball, a golfball, and a bowling ball (6 different balls).

With the way Spine works now, I would have to have one transform constraint for each ball. If I had a second character, I would have to have another constraint for each ball. If I wanted each character to be able to catch each ball with either their left or right hand, I'd have to have another constraint for each player for each ball. This would mean 6balls * 2characters * 2hands = 24constraints just to make each ball be able to attach to any hand.

If I were able to key which ball(s) was(were) constrained to each hand, I would only need one transform constrain per hand, 4constraints. I would then just key the constrained bone to the bone that corresponded to the ball the character needed to catch at that time. It would also be easy to make the character catch more than one ball at a time by constraining more than one ball at a time. It would even be easy to make the character catch a ball with both hands by making one hand constrained to the other hand.

A similar example is characters that are trying on different hats.

Note that all balls (and all hats) must be visible at one time, so skinning different balls (and hats) is not a solution.

In a simple case where a single attachment needs to appear reparented, it is easiest to hide one attachment and show a duplicate attachment on a different bone. A transform constraint is only needed when simulating reparenting of a bone hierarchy. Eg, a gun made out of multiple bones rather than a single attachment.

I do see the usefulness of being able to key the constrained bones for a transform constraint. I don't mean to come off defensive, there are just many ways to achieve the goals for most use cases and people often make their rigging more complex than necessary. Has anyone else encountered use cases where keying the constrained bones would be useful and other workarounds cannot or are too clunky to be applied?

Ok, great, I'm glad I was able to communicate why this could be useful. I'd also be interested to hear about other cases where this feature could significantly simplify a rig.

Anyone reading this have an example?