Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Randomize Items in a Grid

  • Randomize Items in a Grid

    Posted by Ross Wilcox on July 4, 2018 at 12:14 am

    I’m trying to create a grid of objects, where each object in the grid changes periodically at random. Currently, I have a precomp that contains my object source layers, and I’m using a slider control expression to randomly toggle the opacity of the layers in the precomp. I then have that precomp duplicated many times in the parent comp to create the grid. However, with this method, all of the objects in the grid change in unison. Now, I can sequence the precomp layers to offset the random changing, however this still produces the same sequence of change for each object in the grid, just offset a little in time. I’m hoping to find a solution that truly makes the object change sequence random for each object in the grid. Is there any way to automate this?

    Every source layer in the Layers Source pre-comp has an opacity expression: s=comp("Ross Attempt").layer("Layer Control").effect("Layer Selector")("Slider").value;
    (Math.round(s)==index) ? 100 : 0

    which links to the slider control in the parent comp, which has an expression on the slider: seedRandom(Math.floor(time*4), timeless=true);
    random(1,8); //8 because I have 8 source layers in my precomp

    Jacob Roth replied 8 years ago 3 Members · 2 Replies
  • 2 Replies

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