Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions unsynch a ‘loopout’ on multiple layers … possible?

  • unsynch a ‘loopout’ on multiple layers … possible?

    Posted by Jerry Fines on March 18, 2008 at 12:51 am

    hi,

    I made a very simple position animation and looped it. The exact code is:

    loopOut(“cycle”, 3)

    I applied it to a many layer, but realize I don’t want the cycle uniform on every layer (ie: I don’t want them to all animate in sync – I would like the sync to be ‘off’ a little). I was wondering if there was something I could add to the expression to do that? Right now my only option is to move each later a little on the time line however that would prove very time consuming. Thanks in advance for any help.

    -Jay

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

    March 18, 2008 at 3:32 pm

    You could “roll your own” loop out expression and vary the timing, like this:

    loopKeys = 3;
    seedRandom(index,true);
    variance = random(-0.2, 0.2); // time variance (seconds)
    t = time + variance
    t2 = key(numKeys).time;
    t1 = key(numKeys – loopKeys).time;

    if (t > t2){
    valueAtTime( (t-t2)%(t2-t1) + t1)
    }else{
    valueAtTime(t)
    }

    Dan

  • Jerry Fines

    March 18, 2008 at 6:19 pm

    Wow Dan, thanks that really worked! It’s true you guys definitely know what you’re doing here!

    I was wondering, just out of curiosity, would it be possible to also change the ‘speed’ of the aforementioned loopOut? In other words, now that I have them all slightly unsynced, would it be further possible to make some loops go faster/slower then other loops using an expression code?

  • Dan Ebberts

    March 18, 2008 at 6:36 pm

    Somethingk like this, maybe:

    loopKeys = 3;
    seedRandom(index,true);
    variance = random(-0.2, 0.2); // time variance (seconds)
    rateMult = random(0.75,1.25); // rate multiplier
    t = (time + variance)*rateMult;
    t2 = key(numKeys).time;
    t1 = key(numKeys – loopKeys).time;

    if (t > t2){
    valueAtTime( (t-t2)%(t2-t1) + t1)
    }else{
    valueAtTime(t)
    }

    Dan

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