Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects random wiggle, toggle hold

  • random wiggle, toggle hold

    Posted by Accountclosedduetonorealnameused on September 29, 2007 at 5:46 pm

    I am trying to create an expression for position, a random wiggle, but with toggle hold.

    So the layer jumps from one spot to the next, not traveling from one spot to the next. With some sort of control on distance moved and frequency.

    I can get the wiggle, just not the toggle hold part of it.

    any ideas?

    Dan Ebberts replied 18 years, 11 months ago 3 Members · 2 Replies
  • 2 Replies
  • Mike Clasby

    September 29, 2007 at 6:20 pm

    Ok, a real expression guy should be able to do this, not me, but here’s an easy solution. Put this expression on a New Null layer’s Position:

    holdTime = 1.0; //time to hold each position (seconds)
    minVal = [0.1*thisComp.width, 0.1*thisComp.height];
    maxVal = [0.9*thisComp.width, 0.9*thisComp.height];

    seed = Math.floor(time/holdTime);
    seedRandom(seed,true);
    random(minVal,maxVal)

    That will make the Null randomly assume a position within the screen, holding for 1 sec. Change holdTime, minVal, maxVal as needed.

    Now add your real layer, and parent it to the Null (Null is Parent). Add your wiggle expression to the real layer.

    The Random Hold part is from Dan, here:

    https://www.motionscript.com/mastering-expressions/random-1.html

    When I tried to add wiggle into Dan’s expression, it jumped down and right, offscreen, so the Null was the solution for me.

  • Dan Ebberts

    September 30, 2007 at 3:07 am

    Depending on what you’re after, it might be as simple as something like this:

    posterizeTime(3);
    wiggle(5,200)

    Dan

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