Skip to main content
Inspiring
Jul 18, 2013 3:55 PM UTC
Question

wiggle expression with stepped (not smooth) interpolation?

hi

not sure if it's even a wiggle expression I'm after,

but I'm wondering how to go about getting a series of random values that an object or parameter will jump to (rather than smoothly transition to, as in the basic wiggle expression).

thanks

ML

8 replies

ericsten
Inspiring
Aug 3, 2017 2:57 PM UTC

Check out this awesome page by MotionScript

Random Motion

Here's a quick breakdown of what's likely useful to you.

pause=1;                                                                 // How long to hold in each position

seed = Math.floor(time/pause);                               // Generates seed random values

seedRandom(seed,true);                                         // Gives random seed over time

random([thisComp.width, thisComp.height])          // Gives random X, Y values based on Comp width & height

Translate
Mathias Moehl
Community Expert
Community Expert
Jul 26, 2017 6:21 PM UTC

iExpressions also contains a "snapping Wiggle" which is like first applying a normal wiggle and then snapping it to a grid such that if effectively jumps from one grid line to the next one.

As any iExpression, it comes with an intuitive user interface:

snapping_wiggle_2d.png

iExpressions is a commercial extension for After Effects that I develop and that is available here:

iExpressions 2 - aescripts + aeplugins - aescripts.com

Translate
Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Liran Tabib
Inspiring
Jul 26, 2017 9:57 AM UTC

Hi

You can use the extended wiggle parameters like this to create the required jumps:

wiggle(2,200, 1, .5, time-time%.5)

just change the numeric value of the "time-time%.5" parameter

for example:

wiggle(2,200, 1, .5, time-time%.5) jump every 0.5 seconds

wiggle(2,200, 1, .5, time-time%1) jump every 1 second

wiggle(2,200, 1, .5, time-time%2) jump every 2 seconds

wiggle(2,200, 1, .5, time-time%.3) jump every 0.3 seconds

the first and the second parameters (2,200) determine the frequency and amplitude as usual.

I hope this will shorten up things for you

Liran Tabib

www.vdodna.com

Translate
Participant
Dec 11, 2024 9:58 PM UTC

This was super helpful--thank you. Where do I go to learn more about extended parameters?

Translate
Participant
Jul 14, 2017 3:58 PM UTC

you could actually just add a posterizeTime expression before your wiggle — like so:

posterizeTime(12); // number in parentheses is the frame rate you want to wiggle at — lower number = more "stepped //

wiggle(5, 50)

Translate
Inspiring
Jul 18, 2013 4:01 PM UTC

just messing with it a bit...it looks like one option is to pre-comp a wiggled layer, then use the posterize time effect on the precomp....

any other methods out there?

ML

Translate
Community Expert
Jul 18, 2013 4:44 PM UTC

That is probably the easiest.

Translate
Inspiring
Jul 18, 2013 5:19 PM UTC

thanks Rick

ML

Translate