Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Random reveal of different shapes that keeps changing

  • Random reveal of different shapes that keeps changing

    Posted by Sylvia Kratzer on September 1, 2022 at 1:41 pm

    Hi there

    I have been looking for an efficient solution since 3 days, but either I can’t understand it or I can’t find one. So I hope someone can help.

    What I am trying to achieve is to animate a bunch of slashes aligned on a fixed grid 21×8.

    <font face=”inherit”>On each Grid Intersection </font>I<font face=”inherit”> need the slash 1, slash 2, to fade on, off or form the X. At the same time the colour should randomly change (3 color values) </font><font face=”inherit”>This should happen in a subtle and totally random way.</font>

    Ive tried this way: https://www.youtube.com/watch?v=8MAo1T2rNK4 and changed the position individually. I’ve managed to slow down the reveal and to keep it going using this expression:

    on the comp:

    holdTime = 5; //time to hold each position (seconds)
    seed = Math.floor(time/holdTime);
    seedRandom(seed,true);
    t = random(0,50);
    framesToTime(t);

     

    on the layer inside the comp to change the colour:

    var color1 = thisComp.layer(“Colour Control”).effect(“Color Control 1”)(“Color”);

    var color2 = thisComp.layer(“Colour Control”).effect(“Color Control 2”)(“Color”);

    var color3 = thisComp.layer(“Colour Control”).effect(“Color Control 3”)(“Color”);

    colors = [color1,color2,color3];

    slider = thisComp.layer(“Colour Control”).effect(“Slider Control”)(“Slider”);

    engine = Math.floor(time/slider);

    seedRandom(engine,true);

    colorChoose = Math.floor(random(colors.length));

    colors[colorChoose];

     

     

    I want the change to happen individually at each intersection at a random time and I want it to fade to the other shape (shlash1, slash2, X, nothing).

    And Ideally I would love for the colour to randomly change on the individual elements.

    And all nice and subtle. Can anyone help me?

     

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Andrei Popa replied 3 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    September 5, 2022 at 4:08 pm

    Hi Sylvia.

    I am just trying to see if I understood this well. You have a grid of shapes. Each shape can be one of 4 states: left slash, right slash, both slash or no slash. They change (abruptly, without fading) each n number of seconds. A random value of the 4 I have mentioned. Meanwhile, they also have to change the color. Can a “both slash” state be different colors? I mean an X with each line different? Is there anything else more than this you want to achieve?

    If this is it, you can use this project. I made your comps 4 frames long, and moved the color with a fill, on the main comp.

  • Andrei Popa

    September 5, 2022 at 4:36 pm

    I saw your PNG image after I made the post. I have also made it that the X can have different colors for each / by using essential graphics on the “Slash Comp” and removing the fill.

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