Limb: Generic and Limb: Biped Leg breaks when B-Bone density is set to 0 #174

Closed
opened 2024-10-28 19:30:33 +01:00 by Gray Olson · 2 comments

When B-Bone Density is set to 0 for the Limb: Generic type, the twist of the final bone (i.e. the "wrist") does not get properly set up, so when rotating the wrist IK handle around local Y, the finger bones rotate as they are parented but the hand/wrist bone itself does not twist around its Y axis. Similar things happen for Limb: Biped Leg.

When B-Bone Density is > 0, the b-bone handles are set to track the IK-STR-TGT-Wrist.SIDE bones to drive this, but since that doesn't exist with only 1 bbone segment, it is not setup for the b-bone density 0 case.

To solve this I've set up a Copy Rotation constraint on the DEF-Wrist.SIDE bone which targets the IK-STR-TGT-Wrist.SIDE bone with Order: YXZ Euler, selecting only Y axis, and with both src and dst as Pose Space. This seems to work well.

In the case where we have B-Bone Density: 0 but Stretch Segments: 2, it is nice to get some better twist deformations by taking advantage of the extra forearm deformation bone to sort of emulate the b-bone behavior. I did this by adding the same Copy Rotation constraints to the DEF-Forearm_2.SIDE bones but with weight at 0.5 instead of 1.0.

I think at least the first solution should get added automatically in this case, and perhaps the second as well (not sure if there's an even better way to achieve the same result).

The use case here is I'm exporting to a game engine where I've implemented the same deformation algorithm as Blender's Preserve Volume armature modifier, so I can have "real" stretch DEF bones, but not BBones.

When B-Bone Density is set to 0 for the `Limb: Generic` type, the twist of the final bone (i.e. the "wrist") does not get properly set up, so when rotating the wrist IK handle around local Y, the finger bones rotate as they are parented but the hand/wrist bone itself does not twist around its Y axis. Similar things happen for `Limb: Biped Leg`. When B-Bone Density is > 0, the b-bone handles are set to track the `IK-STR-TGT-Wrist.SIDE` bones to drive this, but since that doesn't exist with only 1 bbone segment, it is not setup for the b-bone density 0 case. ~~To solve this I've set up a `Copy Rotation` constraint on the `DEF-Wrist.SIDE` bone which targets the `IK-STR-TGT-Wrist.SIDE` bone with `Order: YXZ Euler`, selecting only Y axis, and with both src and dst as `Pose Space`. This seems to work well.~~ ~~In the case where we have `B-Bone Density: 0` but `Stretch Segments: 2`, it is nice to get some better twist deformations by taking advantage of the extra forearm deformation bone to sort of emulate the b-bone behavior. I did this by adding the same `Copy Rotation` constraints to the `DEF-Forearm_2.SIDE` bones but with weight at 0.5 instead of 1.0.~~ ~~I think at least the first solution should get added automatically in this case, and perhaps the second as well (not sure if there's an even better way to achieve the same result).~~ The use case here is I'm exporting to a game engine where I've implemented the same deformation algorithm as Blender's `Preserve Volume` armature modifier, so I can have "real" stretch DEF bones, but not BBones.
Gray Olson added the
bug
label 2024-10-28 19:30:33 +01:00
Gray Olson changed title from Limb: Generic breaks when B-Bone density is set to 0 to Limb: Generic and Limb: Biped Leg breaks when B-Bone density is set to 0 2024-10-29 15:37:22 +01:00
Author

This also affects Limb: Biped Leg.

My original solution was not correct, since it did not work with FK.

The new solution is:

For joint, the "root" deformation bone gets a Copy Rotation constraint before its Stretch To constraint, with the target being the corresponding "original" bone. For example, DEF-Wrist.L gets Copy Rotation from Wrist.L. DEF-Thigh_1.L get Copy Rotation from Thigh.L.

In addition, each subsequent stretch segment deformation bone gets a Copy Rotation constraint before its Stretch To constraint, but with the target being the corresponding STR-M-Blah bone. For example, DEF-Forearm_2.L gets Copy Rotation from STR-H-Forearm_2.L.

Lastly, I needed to add the Copy Transforms IK constraint that is usually added by cloudrig automatically to each of the original Toe bones, as they only had a Copy Transforms FK constraint set up by default. Unless that is intentional...

This also affects `Limb: Biped Leg`. My original solution was not correct, since it did not work with FK. The new solution is: For joint, the "root" deformation bone gets a `Copy Rotation` constraint *before* its `Stretch To` constraint, with the target being the corresponding "original" bone. For example, `DEF-Wrist.L` gets `Copy Rotation` from `Wrist.L`. `DEF-Thigh_1.L` get `Copy Rotation` from `Thigh.L`. In addition, each subsequent stretch segment deformation bone gets a `Copy Rotation` constraint *before* its `Stretch To` constraint, but with the target being the corresponding `STR-M-Blah` bone. For example, `DEF-Forearm_2.L` gets `Copy Rotation` from `STR-H-Forearm_2.L`. Lastly, I needed to add the `Copy Transforms IK` constraint that is usually added by cloudrig automatically to each of the original Toe bones, as they only had a `Copy Transforms FK` constraint set up by default. Unless that is intentional...
Author

cc @Mets, didn't realize I needed to leave it :)

cc @Mets, didn't realize I needed to leave it :)
Sign in to join this conversation.
No description provided.