Dynamic handle - Need to dynamically measure distance

I<m trying to do a dynamic bezier curve.
So far, i made the left and right opposite points track the middle one.
I want the yellow handles to behave like the red circles mockup.

What i wanted to do is using curve distance between Left point and Middle point, multiply by 0.3 and use the result to multiply the handle parent’s X position value.
Problem is i don’t find ways to measure the curve distance actively in Blender…

Then i wanted to measure the linear distance between the two points using Animation Nodes but the vector i get are in local position (0,0,0). I can’t find world coordinates position of the point objects.

So if someone could help it would be great.

You can multiply result by object parent inverse matrix to get world matrix, I think that’s exposed in animation nodes ? As for measuring curve arc length I don’t know… I thought there was a node for this but I could be mistaken…

1 Like

You could measure length of a curve by using a constant length mesh (a ruler), copied and deformed two different ways: once, by the curve with stretch+bounds clamp, once, with a regular curve. The former will get scaled to the length of the curve. Untested.

You can always get any space you want by using other objects, like empties, parented however you want or unparented, with copy location constraints. Parenting allows you to specify a particular local space. I prefer using bones for this kind of thing, because they don’t have hidden inverses, just tend to act how I want them to; never have been very comfortable with object transforms. No need for animation nodes, unless you need it for something else.

Thanks a lot man,

Object Matrix input and Decompose Matrix nodes are giving world coordinates and the distance thing works…
I used them before but forgot which one. Searched for object parent invert matrix and found it.

Bandage, that measure thing looks complicated. I wish there was a ruler but didn’t find such object. There is a tool to measure but not an active one which the output can be used as an input for other stuff.

I tried many constraint scenarios but didn’t think of a way of making it work.
I don’t get why nodes wouldn’t be good for that, other than they seem to be very slow performance wise.

I’ll post my final curve thing when finished, seems to work so far.

Edit: Wow… the scene went from 24fps to 13 with just a few nodes…
What makes these nodes so slow?

What makes it a ruler is just that you know how long it is:

The ruler is 10 units long. The distance between the ends is 8.6 units. Therefore, the length of the curve (a default bezier curve) is 1.4 units.

Except I don’t think it works. I don’t believe that is the actual length of that curve. So, good that I tested it. Now I have to figure out why…

Here’s the result, it works but i get slow fps:

Maybe there is a way to do this with drivers to get better performance?
It would also be great if i could use Bones instead of geometry but i don’t know yet how to connect them in animation nodes.
Another thing will be to find a way to make this into a 5 point for example.Splitting the aim 50/50 between points might create problems.