<p>You don't need to use Illustrator to do this - three cheap or free scripts will do it:</p>
<p>Gridder (free) will arrange all the images the way you want:</p>
<p><a href="https://github.com/dokluch/gridder-aftereffects" rel="nofollow noreferrer">https://github.com/dokluch/gridder-aftereffects</a></p>
<p>When you've gridded them as you like, select all the images, and apply a couple of Opacity keyframes on all the layers (to make them go from 0 to 100 opacity at the same time).  You'll randomise and stagger them all in the next steps.</p>
<p>KindaSorta (free) will sort the layers randomly:</p>
<p><a href="https://aescripts.com/rd-kinda-sorta/" rel="nofollow noreferrer">https://aescripts.com/rd-kinda-sorta/</a></p>
<p>ptShiftLayers (pay what you want) will stagger them over time:</p>
<p><a href="https://aescripts.com/pt_shiftlayers/" rel="nofollow noreferrer">https://aescripts.com/pt_shiftlayers/</a></p>

CC BY-SA 4.0
2021-07-26T17:39:28.847Z
2021-07-26T17:39:28.847Z
tomh
<p>If you're sure you want to use After Effects, you could try the following expression into the opacity field:</p>
<p>Each image will need to be it's own layer.  For each image layer, alt + click the stopwatch for the opacity to open the expressions editor, then paste in this code:</p>
<pre><code>visible = 2; // how long the layer is visible for in seconds
transition = 0.05; // how long it takes for the layer to appear and disappear

appear = (index-1) * visible;
disappear = index * visible;

fxin = linear(time, appear, (appear+transition), 0,100);
fxout = linear(time, disappear-transition, disappear, 0, -100);

opacity = fxin +fxout;

opacity
</code></pre>
<p>This will make the photos appear in the order the layers are in.  If you are looking for a random order, I found a script that lets you randomize layer order:</p>
<pre><code>{
var myComp = app.project.activeItem;
var n = myComp.numLayers;
var myLayers = [];
var myIdx = [];
for (var i = 1; i&lt;= n; i++){ myIdx[i-1] = i; myLayers[i-1] = myComp.layer(i); } var idx; var temp; for (var i = 0; i &lt; myIdx.length; i++){ idx = i + Math.floor(Math.random()*(myIdx.length - i)); temp = myIdx[i]; myIdx[i] = myIdx[idx]; myIdx[idx] = temp; } for (var i = 0; i &lt; myIdx.length; i++){ myLayers[myIdx[i]-1].moveToBeginning(); } }
</code></pre>
<p>Sourced from: <a href="https://creativecow.net/forums/thread/randomize-layer-order/" rel="nofollow noreferrer">https://creativecow.net/forums/thread/randomize-layer-order/</a></p>
<p>Hope that helps.</p>

CC BY-SA 4.0
2021-08-03T08:43:13.283Z
2021-08-03T08:43:13.283Z
AutoBaker
<p>Basically, I want to make a collage of my artworks. All are square images. Let's consider there are 48 photos. So I will make a grid in Illustrator of 8x6. Each photo in a separate layer.</p>
<p>Now I'll import it into After Effects. Then I'll turn opacities of all of them to 0.</p>
<p>Now I want to make them appear (0 to 100 opacity) one by one in a random order. Just like stars appear in evening sky.</p>
<p>So one way to do so is manually. But I guess it will be time consuming and won't be that much random. So is there any effect or plugin for this?</p>

<video><after-effects>
Is there any plugin or effect in After Effects where each of many photo layers turn visible in a random order?
Vikas
# Is there any plugin or effect in After Effects where each of many photo layers turn visible in a random order?

(Asked by: username_0 on 2021-07-25)

Basically, I want to make a collage of my artworks. All are square images. Let's consider there are 48 photos. So I will make a grid in Illustrator of 8x6. Each photo in a separate layer.

Now I'll import it into After Effects. Then I'll turn opacities of all of them to 0.

Now I want to make them appear (0 to 100 opacity) one by one in a random order. Just like stars appear in evening sky.

So one way to do so is manually. But I guess it will be time consuming and won't be that much random. So is there any effect or plugin for this?

**Tags:** video, after-effects


---

## 2 answers

### Answer by username_1 on 2021-07-26. Score: 2

You don't need to use Illustrator to do this - three cheap or free scripts will do it:

Gridder (free) will arrange all the images the way you want:

<https://github.com/dokluch/gridder-aftereffects>

When you've gridded them as you like, select all the images, and apply a couple of Opacity keyframes on all the layers (to make them go from 0 to 100 opacity at the same time). You'll randomise and stagger them all in the next steps.

KindaSorta (free) will sort the layers randomly:

<https://aescripts.com/rd-kinda-sorta/>

ptShiftLayers (pay what you want) will stagger them over time:

<https://aescripts.com/pt_shiftlayers/>


---

### Answer by username_2 on 2021-08-03. Score: 1

If you're sure you want to use After Effects, you could try the following expression into the opacity field:
Each image will need to be it's own layer.  For each image layer, alt + click the stopwatch for the opacity to open the expressions editor, then paste in this code:
visible = 2; // how long the layer is visible for in seconds
transition = 0.05; // how long it takes for the layer to appear and disappear

appear = (index-1) * visible;
disappear = index * visible;

fxin = linear(time, appear, (appear+transition), 0,100);
fxout = linear(time, disappear-transition, disappear, 0, -100);

opacity = fxin +fxout;

opacity

This will make the photos appear in the order the layers are in.  If you are looking for a random order, I found a script that lets you randomize layer order:
{
var myComp = app.project.activeItem;
var n = myComp.numLayers;
var myLayers = [];
var myIdx = [];
for (var i = 1; i<= n; i++){ myIdx[i-1] = i; myLayers[i-1] = myComp.layer(i); } var idx; var temp; for (var i = 0; i < myIdx.length; i++){ idx = i + Math.floor(Math.random()*(myIdx.length - i)); temp = myIdx[i]; myIdx[i] = myIdx[idx]; myIdx[idx] = temp; } for (var i = 0; i < myIdx.length; i++){ myLayers[myIdx[i]-1].moveToBeginning(); } }

Sourced from: https://creativecow.net/forums/thread/randomize-layer-order/
Hope that helps.


---

