# Bendy Bone that matches a curve?

I’m looking for a way to make a bendy bone match the shape of a 2 handle bezier curve. It seems that this ought to be possible because, as the documentation says, a bendy bone is essentially a 2 handled bezier curve. However, with the curve, we control it through the control points and handles. But on the bbone, we control it by adjusting the Ease In and Out (in pose or edit mode), and adjusting the Roll.

Does anyone have idea idea how this could be done? I assume there is some relation between the scale of a bezier curves’s handles, and the Ease In and Out values? It should be possible to snap the head or tail of a bone to a control point, get the size or scale of the handles, and convert it to Ease In or out? (And perhaps also set Roll based on Tilt?)

The use for this would be to setup a hair rig, as I’ve already got the hair based on lots of curves. Manually matching the bones to the curves would be a huge amount of fiddling.

UPDATE:
Here’s a picture of a bone that I have positioned to match a curve. The bone’s start and end handles are set to Tanget, and are aligned with the bezier curve’s handles. The left side handle is 2 units away from the control point on Y, and the right side handle is 1 unit away on X. To get my bone to match this, I have the Ease In (left side) at 1.56, and the Ease Out at .3

Chaintools

1 Like

This creates a chain of multiple bones along a curve. I’m trying to create a single bbone with multiple segments, and adjust its bend to match a curve.

You can just make it a bendy bone

But then I’ll have a chain of bendy bones, no? I need one bone with 30 segments, not 5 bones with 6 segments. Unless there’s a way to convert a chain to a single bone?

If you follow the video, you only need a curve with 3 vertices. Each one becomes a bone.

I already have a bbone with a head and tail. I’m trying to adjust the big bbone to match a curve. Here’s a gif of me doing it manually. But its imprecise. I’m trying to figure out how to automate this by understanding the relationship between the bezier curve handles and the bbone Ease in and out settinigs.

Making multiple bones along a curve is a different issue.

It looks to me like if a curve segment corresponds to a bendy bone segment (start and end segment included) then the shape should be the same as the curve.

It depends on the control points of the curve. If you scale or move the handles, the curve becomes more extreme. In the case of the bendybones, the start/end are defining the rotation of the handle, but scaling them doesn’t do anything. Instead you adjust the Ease In/Out. So i’m trying to figure out what the relationship is between handle position and Ease In/Out is.

Can’t you reduce the number of bones according to ChainTools and then increase it again in bendy bone. Maybe the curve data will be retained.

It doesn’t retain it

I’m sorry about that. Then I guess we’ll have to find another addon.

1 Like
• 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

1 Like

Wonderful, that seems to work in my tests!

So I’ve got a script working where it adjusts the Ease In/Out based on the curve’s handle length:

But now there’s a new issue. I’ve set it up to also follow rotation (via the handle pointing at another bone that follows the curve handle position), but i’m getting some offset.

This offset is caused by the effective length of the bbone changing, but not the actual length value. The bbone is currently 2 units long, and if you apply this pose, it is still 2 units long. So the extra length that comes from Ease In/Out stretching it is not reflected in the length value, and so continuing to use the base length gives the wrong results.

There doesn’t seem to be any part of the data api that tells me the true length of a bbone. So I need to figure out some amount to adjust the base length by based on the Ease In and Out amounts. Any ideas?

EDIT: On further inspection, I’m not sure that the problem is caused by Ease changing the length. It may be some other discrepancy between the bones and curve. You can see here that the bone and curve lines up just right when the handle is at 90 deg to the original path of the bone, but then the length starts being wrong in one direction or the other as its rotated. But moving the ctrl point handle further away stretches the bone and curve, but does not cause additional problems in their alignment.

Did you set it up with drivers? Can you share that scene on gifs?

Its Animation Nodes.

bendy bone match curve_share.blend (894.2 KB)

1 Like

This setup looks promising, I’ll try to reproduce it as it is now but please keep this updated if you find a way to match the curve 100%!

1 Like

I’ve only spent a little more time on it and have not figured out how to deal with the offset when rotating it. Let me know if you’ve got any insight!

1 Like

Any news on this ?

1 Like