Driving mask stroke with gradient
I have a bunch of masks created with auto-trace. I've applied a few effects to these: stroke, turbulant displace and roughen edges.
I was looking at this tutorial in regards to controlling the stroke with a gradient, so as my gradient expands radially from the centre of the comp the masks will get traced in order, following the motion of the gradient.
https://www.youtube.com/watch?v=4OQN2mHQuD0&t=406s
here's the expression he uses:
sourceLayer = thisComp.layer("Transition Control 2");
sampleSize = [1,1];
samplePoint = transform.position;
colour= sourceLayer.sampleImage(samplePoint,sampleSize);
x=colour[0]*100;
[x,x]
In the tutorial he samples the transform position of an individual shape, but can I sample the anchorpoint of each individual mask within my layer in order to drive the stroke effect? What would the command be in the expresion to sample the mask position? The end result I'm hoping to achieve is a radial reveal of linework (my masks) from the centre out.
TIA for any help. I'm a real hack with AE but this workflow has the potential to be really useful to me if I can get it working.
