Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Mutiple Random Masks

  • Mutiple Random Masks

    Posted by Thomas Mcmurry on June 4, 2007 at 7:17 am

    I have a premade image of colored squares and circles that make up a large grid (circles and squares are all the same size) and I need to animate them ON and OFF so they look as if they’re growing and then shrinking back to nothing. Similar to a wall of lights turning on and off randomly. I’ve tried a few options with hand doing masks, but the image has too MANY “squares” and doing masks for each would take forever! Anyone have a good trick to reveal a grid and make it feel random?

    Thanks!

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

    June 4, 2007 at 2:13 pm

    You could try a scale expression like this:

    rampTime = .1;
    holdTime = .1;
    minDelay = .5;
    maxDelay = 1.5;

    seedRandom(index,true);
    preRun = random(maxDelay);
    accum = 0;
    temp = 0;

    while (time + preRun > accum){
    temp = random(minDelay,maxDelay);
    accum += temp;
    }
    accum -= temp;
    t = time – accum + preRun;

    if (t < rampTime){ linear(t,0,rampTime,[0,0],[100,100]); }else if (t < rampTime + holdTime){ [100,100]; }else if (t < 2*rampTime + holdTime){ linear(t, rampTime + holdTime, 2*rampTime + holdTime,[100,100],[0,0]); }else{ [0,0]; } Adjust the first four parameters to get the look you want. Dan

  • Thomas Mcmurry

    June 4, 2007 at 5:57 pm

    dang! I should have mentioned I’m expression-illiterate. I’ve done a few in the past with the great help from this board. Maybe again.

    if you have a tip on how to add this to this example below, I may be able to experiment. If I get one section to work, I’m sure I can duplicate or repeat to work on a larger document:

    Lets say If I have a 300×300 doc that is divided into 9 masks/section (100×100). and I wanted to animate each mask randomly. how would I use these expressions you gave me? one each mask?

    any additional help is greatly appriciated!

  • Dan Ebberts

    June 4, 2007 at 7:07 pm

    Sorry, I misunderstood. I assumed each section was a seperate layer, in which case you’d just apply the expression to each layer’s scale property. It won’t work that way for masked sections of the same layer.

    Dan

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