Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Wiggle with ease

  • Dan Ebberts

    May 16, 2008 at 3:31 pm

    Aharon,

    What exactly are you trying to do? I mean wiggle() pretty much eases from one value to the next already, right? You must have something specific in mind.

    Dan

  • Filip Vandueren

    May 18, 2008 at 11:17 pm

    Hey Aharon,

    I guess you mean by ‘easing’ that as each wiggled value is reached, the velocity of change drops down to 0.
    You can’t do that via wiggle, but you can write your own wiggle-system, interpolating between random values.

    this is a hack of one of Dan’s old expressions that does that trick:


    tMin = .25; //minimum segment duration
    tMax = .5; //maximum segment duration
    minVal = [-50,-50];
    maxVal = [50,50];
    start=0;
    end = 0;
    j = 0;
    while (time >= end){
    j ++;
    seedRandom(j,true);
    start = end;
    end += random(tMin,tMax);
    }
    endVal = random(minVal,maxVal);
    seedRandom(j-1,true);
    dummy = random(); //this is a throw-away value
    startVal = random(minVal,maxVal);
    wig = ease(time,start,end,startVal,endVal);

    wig+value;

  • Aharon Rabinowitz

    July 6, 2008 at 4:08 am

    Wow – For some reason I never got a a notification for this.

    Thanks. I play around.

    Best,

    Aharon

    Aharon Rabinowitz
    Email: arabinowitz (AT) yahoo (DOT) com
    All Bets Are Off Productions, Inc.
    Creative Cow After Effect Podcast
    Internet Killed the Video Star: A Guide to Creating Video for the Web

  • Richard Jones

    December 23, 2008 at 4:20 pm

    There’s actually a much easier way to achieve this. I ended up searching for the answer myself, but realized there’s a SIMPLE way to do this. And like me, I’m sure you’ll feel really stupid when I tell you how to do it. 🙂

    Just create a null object, add a Slider Control Effect from the Expression Controls, and link the middle wiggle value to that slider. Then just keyframe the amount of movement you want with the Slider Control and adjust your keyframes from there. Depending on your naming of the layers, the wiggle code will looks something like this:

    wiggle(2,thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”),1)

  • Patrick Brady

    December 15, 2010 at 5:01 pm

    I know this thread hasn’t been touched in awhile, but it was the first one that came up when I searched for this very problem, so I thought I’d share my solution in case more people are looking for the same thing. I think this is along the lines of what Mr. Rabinowitz was looking for; an expression to make a simple wiggle hit 0 velocity between each move:

    freq=1; //frequency: fill in or tie to a slider
    amp=300; //amplitude: fill in or tie to a slider
    octaves=1; //default value
    amp_mult=0.5; //default value
    period=1/freq; //time taken for each wiggle move
    pCount=Math.floor(time/period); //number of wiggles performed so far
    sTime=pCount*period; //time when current wiggle begins
    eTime=pCount*period+period; //time when current wiggle ends
    p1=wiggle(freq, amp, octaves, amp_mult, sTime); //start position of current wiggle
    p2=wiggle(freq, amp, octaves, amp_mult, eTime); //end position of current wiggle
    ease(time, sTime, eTime, p1, p2); //ease the wiggle

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy