-
automating rotation across multiple layers
Imagine a bead curtain, except instead of beads there are windmills. Each windmill rotates at a different speed depending on height relative to the curtain. I want to be able to activate the rotation per thread in some easy and visually intuitive way. Check out the link for an example of what I mean.
https://www.dropbox.com/s/b6uzs1z0y6a3ybg/NEW%20COMP_2.mp4
I tried using Trapcode Form, windmills for particles, and then using the rotation layermap with a gradient layer. But the rotation parameter when sampling a layer does not provide constant rotation and will rotate the particle to a fixed angle.
I tried using Dan Ebberts’ code to control constant rotation with a slider, and then got the slider to sample a layer, but it also provided erratic results.
Does anyone have a better suggestion?
DAN EBBERTS EXPRESSION TO CONTROL CONSTANT ROTATION WITH A SLIDERspd = effect("Slider Control")("Slider");
n = spd.numKeys;
if (n > 0 && spd.key(1).time < time){
accum = spd.key(1).value*(spd.key(1).time - inPoint);
for (i = 2; i <= n; i++){
if (spd.key(i).time > time) break;
k1 = spd.key(i-1);
k2 = spd.key(i);
accum += (k1.value + k2.value)*(k2.time - k1.time)/2;
}
accum += (spd.value + spd.key(i-1).value)*(time - spd.key(i-1).time)/2;
}else{
accum = spd.value*(time - inPoint);
}
value + accum