1
$\begingroup$

I'm trying to get a bendy bone to match a 2 handled curve. The bendy bone setup is 3 bones: 1 bendy bone, and its head and tail bones. You can adjust the rotation of the head/tail in edit mode, and also adjust parameters like Ease In and Out to set the base pose of the bone. Here's a gif of manually adjusting a bone to match a bezier curve:

enter image description here

Here's the bezier curve. The left handle is 2 units from the control point on Y, and the right handle is 1 unit on X. enter image description here

If we knew the relationship between the control point distances and the Ease In/Out values, then a script could snap the head/tail of the bone to a control point, and then align it with the handles, and then set some amount of Ease In/Out based on the distance to the handles to match the shape. But its not clear what the relationship between the values is. I used 2.58 and 1.34 to approximate it, but that's not exact (the base value being 1 in edit mode, and 0 in pose mode as they are added together.)

Anyone know what the proper math would be to convert these? Or is there some other way to accomplish this? I have a complex hair setup that's already based on curves, and I want to generate a bone strand for each bit. So its not practical to do by hand.

$\endgroup$
  • 1
    $\begingroup$ have you tried using a spline ik modifier? there you can edit the curve and the bones will follow. orrr you can add drivers to the ease in/out values and control them with the bone's rotation $\endgroup$ – Zophiekat Apr 7 at 2:38
  • $\begingroup$ Spline IK will put a chain of multiple bones along a curve. I'm trying to have a single bendybone with multiple segments be along the curve. SplineIK won't do that. $\endgroup$ – Ascalon Apr 7 at 3:41
  • $\begingroup$ i cant really think of anything else but to have the ease in and out values controlled by another bone. or maybe have an empty parented to one of the vertices and give the bone a damped track constraint with that empty set as target? $\endgroup$ – Zophiekat Apr 7 at 19:14
1
$\begingroup$

Found the answer from a BA thread asking the same question. I've tested this, and it works.

The length of each handle (hlength1 and hlength2 respectively) is based on the “ Ease In/Out ” properties, the length of the bone, and a magic-number factor (“0.5f * sqrt(2) * kappa”, where kappa = the handle length – apparently this formula allows “for near-perfect circles”). i.e.,

hlength1 = ease_in * length * 0.390464f hlength2 = ease_out * length * 0.390464f

From https://blenderartists.org/t/bendy-bone-that-matches-a-curve/1218163/13?u=oscalon, referencing https://code.blender.org/2016/05/an-in-depth-look-at-how-b-bones-work-including-details-of-the-new-bendy-bones/

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.