Tweening nodes

Hi, Im learning more and more Armory and its great!
Just have a question, are there planned any tweening nodes (with easIn Out functions)? Or something similar like “Animate Number” in Animation Nodes plugin. This is really usefull way of procedural animating, especially when you dont want to rely on realistic physics simulation only but you want your own animation effects.

1 Like

I agree a tween/easing node would be cool. There was a bit of movement in that direction with this node, but there hasn’t been much work on it lately it seems. As another model, I know that Sverchok has easing built into its Mix Numbers node.

1 Like

Added Mix and Vector Mix nodes, so at least the basics should be doable now. We can later extend it with something for easy chaining etc.

Updated https://github.com/armory3d/armory_examples/tree/master/tween.

4 Likes

This is not bad at all, but can we also have something like this:

this node would have an internal timer.
the Default input takes a value between 0 and 1. by default the node outputs a value between value 1 and value 2 defined by this input. this is needed to set the initial state. e.g. if value 1 = 3, value 2 = 4, and default = 0.5, the output should be 3.5

an impulse to the Forward input tweens the value over the given time period to value 2
an impulse to the Back input tweens the value over the given time period to value 1
an impulse to the Toggle input checks its current state and tweens to the other value

if an impulse happens during a tween, and that impulse reverses the direction, the node tweens from its last output, over a period proportional to the difference in the values. e.g. If the node is tweening from 0 to 1 over 1000 ms, its last output is 0.6, and a Toggle impulse comes in, it tweens from 0.6 to 0 over 600ms.

The Out impulse is sent after the tween is over.

While the more atomic nodes you’ve implemented will be useful when users want a very particular behavior, my idea just streamlines common use cases. Think of buttons, highlights, doors, chests, light switches, levers etc.

Hehe yes, it’s in the works. :slight_smile: Can you please create a GitHub issue with this info to keep it at hand?

That’s awesome :smiley:

Sure, issue opened: https://github.com/armory3d/armory/issues/603

Caveat emptor: it was meant more as a discussion opener than a final design. I’m hoping other people will chime in with their suggestions and point out any horrible, horrible mistakes :smiley:

1 Like

I like Idea of extending tween node, than its kind of “Tween Player”. There is another proposal, just to consider. This one is more focused on looping action (0 times = endless) and thanks to Custom Curve you can act more like animator.

3 Likes

I don’t think a curve is a data type Blender supports. But you can always put the node in linear mode and apply a curve or other math afterwards.

There is this kind of “Curve” option in brush system. And similar is used in Animation Nodes plugin - in Curve Interpolation node
https://animation-nodes-manual.readthedocs.io/en/latest/release_notes/v2_0/interpolation.html

curve