-
Using pixel data from a target layer to drive scale.
Is there a way to link a value (like scale) to pixel data from a target layer, say, underneath the former’s anchor-pointw?
I’m trying to use a ramp or blur of a solid layer sweeping across the frame to drive the scale of several smaller layers.
Here is the expression I’m using now.
/////
sampleSize = [10,10];
target = thisComp.layer(“DRIVER”);
samplePos = [target.width,target.height]/2;
rgb = target.sampleImage(samplePos, sampleSize, true, time);
hsl = rgbToHsl(rgb);
[hsl[2]*100,hsl[2]*100]
/////“DRIVER” is the ramped/blurred solid.
This expression sorta works but it doesn’t look very good. I actually ripped this from a thread on using pixel data to drive opacity.