ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# How do you randomly affect a large number of objects' opacities

FAQ   •   VIEW ALL
 How do you randomly affect a large number of objects' opacities on Jun 30, 2016 at 8:20:15 pm

I'm working on a project where I need to have, due to the size of the composition, thousands of small squares vary in opacity over time. I have been attempting to use expressions to map the value of a fractal noise control layer to the opacity value of the squares using point sampling, which after struggling with for a while i got to vaguely work. The computer I have to use is not very powerful at all so I have yet to see the opacity change dynamically. I know that I can make lots of copies of a square using repeat, but I'm afraid that the squares will only vary according to the value behind the original square, making all the squares change at the same rate, not vary individually, making rolling patches of opaque squares.

Below is the expression I'm using to control the opacity

sourceLayer=thisComp.Layer("Control Layer");
sampleSize=[1,1];
samplePoint=transform.position;
color=sourceLayer.sampleImage(sampleSize,SamplePoint);
x=color[0]*100
[x]

I suppose wiggle could achieve a similar look but i really am going for those roving bands of squares.

Any suggestions?

 Re: How do you randomly affect a large number of objects' opacitieson Jul 1, 2016 at 1:47:48 pm

Roving bands of squares? That doesn't sound exactly random to me! I'd post about this in the COW's. AE expressions forum, and I would be prepared to get very specific about the look I was REALLY after.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA

 Re: How do you randomly affect a large number of objects' opacitieson Jul 1, 2016 at 2:34:20 pm

Couldn't you just create your fractal pattern and add a mosaic effect to it like this: 10250_mosiac.aep.zip

Johnny Cuevas, Editor
ThinkCK

"I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work."
---THOMAS EDISON on inventing the light bulb.