Iaian7
Motion Design Lead
I'm delving into some vector/rotational math with the Nodal Motion editor, and it's getting a little out of hand. 
I'm working on a solution that will allow a string of bones to behave like a free standing spring. Reacting to parental motion with delay, decay, and counter-motion, but not following an actual motion path (they should retain basic skeleton shape, not act like a scarf) and not simply delayed in time (which relies on existing bone animation, not the inertia of the parental motion).
Probably the easiest practical example would be a bunny ear: it should bounce and sway with every twitch of the head and jump of the body, without having to hand animate what should otherwise be a very simple pseudo-physics simulation. The ears wouldn't even need to twist in this case, just bend left/right/up/down in reaction to their own physical inertia. Using nodes that add back any existing bone animation, you could even hand animate the ears and let the nodes add procedural bounce on top of the existing keyframe animation. Best of both procedural and directed worlds.
Using the DPkit Item Info node, I've derived the relative motion of the bone (subtracting world position -0.05 seconds in the past from the current world position) to give the inertia strength and direction (strength would be distance from zero, direction would be calculated from that as a vector, right?), and used that to...maybe...sorta...get some rotational values. Of course, because the bone orientation could be completely changed, the position offset or inertia direction has to be rotated into the world orientation of the bone itself (I think?). This can then be modified and added back into the existing keyframed data (the beauty of the Nodal Motion editor is that this is incredibly easy, unlike the other modifier effects available in the motion panel which are completely inflexible and overwrite the data instead of adding to it).


Anyway...I actually got pretty far! My bone setup reacts in realtime (start playing through the timeline and drag the whole object around to check it out!) with a sort of faked bounce animation (using three node trees with time delay and decay manually added to each - and yes, values were chosen for artistic reasons, not physical accuracy :hey
. I've attached a couple screenshots of my results, along with the Lightwave scene file and sample object. It appears to be 90% of the way there - it bounces, the child bones are delayed more than the parent bones, and it works in any parental orientation. However, I arrived at this point, quite literally, by just randomly trying stuff till it seemed to work. I have no idea what I'm doing here, and there are a few oddities in how it works from time to time. :devil:
View attachment BouncyBones.zip
My questions:
Thanks for any/all feedback!
(except for "your math is ludicrously wrong" - I'm already fairly sure of that :thumbsup
I'm working on a solution that will allow a string of bones to behave like a free standing spring. Reacting to parental motion with delay, decay, and counter-motion, but not following an actual motion path (they should retain basic skeleton shape, not act like a scarf) and not simply delayed in time (which relies on existing bone animation, not the inertia of the parental motion).
Probably the easiest practical example would be a bunny ear: it should bounce and sway with every twitch of the head and jump of the body, without having to hand animate what should otherwise be a very simple pseudo-physics simulation. The ears wouldn't even need to twist in this case, just bend left/right/up/down in reaction to their own physical inertia. Using nodes that add back any existing bone animation, you could even hand animate the ears and let the nodes add procedural bounce on top of the existing keyframe animation. Best of both procedural and directed worlds.
Using the DPkit Item Info node, I've derived the relative motion of the bone (subtracting world position -0.05 seconds in the past from the current world position) to give the inertia strength and direction (strength would be distance from zero, direction would be calculated from that as a vector, right?), and used that to...maybe...sorta...get some rotational values. Of course, because the bone orientation could be completely changed, the position offset or inertia direction has to be rotated into the world orientation of the bone itself (I think?). This can then be modified and added back into the existing keyframed data (the beauty of the Nodal Motion editor is that this is incredibly easy, unlike the other modifier effects available in the motion panel which are completely inflexible and overwrite the data instead of adding to it).


Anyway...I actually got pretty far! My bone setup reacts in realtime (start playing through the timeline and drag the whole object around to check it out!) with a sort of faked bounce animation (using three node trees with time delay and decay manually added to each - and yes, values were chosen for artistic reasons, not physical accuracy :hey
View attachment BouncyBones.zip
My questions:
- Have I overlooked a better, simpler, easier solution? (motion modifiers like Follower obviously won't work, and effects like LazyPoints are uselessly awful and/or completely uncontrollable - ultimately whatever solution
I find will be used to add secondary motion to a character with motion capture data driving all the primary motion)
[*]What is the correct method for calculating local-based bone rotation using world-based inertia direction and strength?
[*]Is there any way to actually/automatically calculate dampened spring-like motion without resorting to manually creating iterations in the node tree?
[*]Could this all be done in Python? (I'm completely unfamiliar with it and unable to hack it together myself, but seems like a possible ideal solution)
Thanks for any/all feedback!
(except for "your math is ludicrously wrong" - I'm already fairly sure of that :thumbsup
Last edited: