Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expression. Random start-position to final-position

  • Expression. Random start-position to final-position

    Posted by Kasper Nyman on January 5, 2014 at 10:52 am

    Hi, I’m having this issue with expression in After Effects, and hope someone can help me.

    I have 40-50 circle set up so they make a certain shape. I would like to add an expression that tells each circle to start out in a Random position and then animate into the final position, and hold/stay there so they do not move anymore.

    Any suggetions?

    Nyman

    Kasper Nyman replied 12 years, 4 months ago 2 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    January 5, 2014 at 7:01 pm

    You haven’t said much about the timing or nature of the movement, but play around with this:

    moveDur = 1;
    seedRandom(index,true);
    startPos = random([thisComp.width,thisComp.height]);
    ease(time,inPoint,inPoint+moveDur,startPos,value)

    Dan

  • Kasper Nyman

    January 5, 2014 at 7:23 pm

    Hi Dan,
    Basically what you just made it what I’m looking for. Great job.

    You are right, should have written somthing about timing or nature of the movement. But how do I control Duration and Ease?

    And last one, can I add a wiggle to that expression, so the movement is more wiggly, if not, no worries.

    And thank you so much. I’ve tried to read up on expression but need more practice.

    Nyman

  • Dan Ebberts

    January 5, 2014 at 8:20 pm

    This will add some wiggle:

    moveDur = 2;
    wiggleAmp = 100;
    wiggleFreq = 3;

    seedRandom(index,true);
    w = wiggle(wiggleFreq,wiggleAmp)-value;
    startPos = random([thisComp.width,thisComp.height]);
    ease(time,inPoint,inPoint+moveDur,startPos + w,value)

    You can control the duration by adjust moveDur. With ease, your choices are ease() and linear(), unless you want to add your own easing calculation.

    Dan

  • Dan Ebberts

    January 5, 2014 at 8:25 pm

    Actually, there are also easeIn() and easeOut().

    Dan

  • Kasper Nyman

    January 5, 2014 at 8:47 pm

    Thank, thank you much, this is really cool and helpful.

    Have a great day!

    Nyman

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