ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

After Effects layer opacity controlled by layer opacity beneath.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Michael Frogley
After Effects layer opacity controlled by layer opacity beneath.
on Jul 18, 2018 at 10:03:10 pm

Continuing from a previous post. I have a screen full of dots in a comp called Dot Matrix. I'd like to animate shapes in a seperate composition which control the opacity of these dots.

Imagine looking at an outdoor LED screen looking at the LEDs close up.

Applying this expression to the opacity of each of the dots will turn on if the shape in the composition beneath appears underneath that dot.

Thanks to Dan Ebberts for writing the expression.





sampleSize = [10,10];
target = thisComp.layer("MATT");
samplePos = transform.position;
rgb = target.sampleImage(samplePos, sampleSize, true, time);
hsl = rgbToHsl(rgb);
hsl[2]*100


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]