Skip to main content
Inspiring
July 18, 2013
Question

wiggle expression with stepped (not smooth) interpolation?

  • July 18, 2013
  • 5 replies
  • 9402 views

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

5 replies

ericsten
Inspiring
August 3, 2017

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

Mathias Moehl
Community Expert
Community Expert
July 26, 2017

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

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Liran Tabib
Inspiring
July 26, 2017

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

Participant
December 11, 2024

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

Participant
July 14, 2017

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)

Inspiring
July 18, 2013

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

Community Expert
July 18, 2013

That is probably the easiest.

Inspiring
July 18, 2013

thanks Rick

ML