Spreading bones

i am working on a spread of 2d bones with parent-id.
positioning is ok, problem is with relative rotation (compensation) of children when parent-bones rotate.
i succeeded in making the first generation of children rotate along, possibly i could make the same for n generations but i just realized that even if i did so, theres still a problem when bones in more than one generation actually rotate at the same time.

spreadable bones rotation question.v4p (28.7 kB)

hi ggml!

did you have a look at the bone modules and the
girlpower+ Bones

maybe this could work for you (?)

yes i had a look at bones from girlpower, but what i am after is a Bonespread so to say, so i can draw any bone structure out of values, not nodes. this values would be for each bone:
bone id, parent id, rotation, lenght.

my problem is when i rotate a parent bone (active rotation), i have to rotate its children along, so that angles stay the same (compensational rotation).

i have tryed to implement something like “every child watch out for parent’s rotation and add it to your own”, wich gets a bit complicated when the children are also parents to other bones.

also, i dont understand how this model could handle more than one (active) rotation.

i was hoping that there is an easyer way with transforms, similar to the way i feed back the position of each parent to its children, with Multiply (3d).

hi ggml,

the trick is to think in transform hierarchies, even when it seems to be impossible…

in that example the transforms are fed back by retreiving their inner value components, delaying them for a frame, and recreating them in the next frame…

spreadable bones rotation question.v4p (30.2 kB)

wow thanks a lot gregsn !

hi again. i have uploaded the module with some extras around it here

impressive stuff ggml!

indeed!.. no text …