0

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?

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/

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.