Wiggle function for expressions


Hello everyone.
Allow me to share brand new ‘wiggle’ function to use it in expressions. It works just as well known wiggle function in After Effects and allows you to create procedural wiggling animations for every numeric parameter in your nodes. All you need to do is just put function declaration in init.py in natron’s plugin folder. Here is a quick informative video on how to use it:

And here is a link to download my init.py


script slightly updated - same link


You should use the random and randomInt functions provided by Natron, which are reproducible pseudo-random functions rather than use the built-in random module.

http://natron.readthedocs.org/en/workshop/PythonReference/NatronEngine/Param.html http://natron.readthedocs.org/en/workshop/PythonReference/NatronEngine/Param.html

We are also going to integrate Noise function that can be used currently in SeExpr and SeGrain nodes to the Python API.


The problem is that Natron’s function return different number every evaluation despite given seed, while in order to make my script work correctly a have to get some predictable result frame after frame. Anyway, i can see no problem using random module, other than different number on project load, witch is in this case not a big deal, since we’re talking about wiggle effect


Oh, and i just checked - python’s random returns same old number on project load :slight_smile:


That’s EXACTLY what i needed dude !

Thank you VERY MUCH !

This script with the ShakeNode and i’m in haha

But one question, is it possible to set the time between 2 values (i would for example set time=Frame 133 to Frame 200) ?