mandag den 12. oktober 2009

Start rotating when approaching a MARKER

//continue rotaning each MARKER
//lloydalvarez - aenhancers.com

f=5; //duration in frames of rotation, set to zero if you want it to click
d=20; //degrees to rotate


f=framesToTime(f, fps = 1.0 / thisComp.frameDuration);
n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (time > marker.key(n).time && n < marker.numKeys){
n++;
}
r=(d*(n-1)) + value;
linear (time,marker.key(n).time-f,marker.key(n).time,r,r+d);
}


//oscillate rotation back and forth at MARKERS
//lloydalvarez on AE ENHANCERS.COM

f=5; //duration in frames of rotation, set to zero if you want it to click
d=20; //degrees to rotate

r=value;
f=framesToTime(f, fps = 1.0 / thisComp.frameDuration);
n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (n%2) {d=d*-1; r=r-d;}
linear (time,marker.key(n).time-f,marker.key(n).time,r,r+d);
}



//And now with a wiggle

freq=24; //wiggle frequency in frames per second
s=0; //wiggle start amount
d=20; //amount to increase wiggle at each marker
f=15; //duration in frames of transition to next amount, set to zero if you want it to click

f=framesToTime(f, fps = 1.0 / thisComp.frameDuration);
n = value;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (time > marker.key(n).time && n < marker.numKeys){
n++;
}
r=(d*(n-1))+s;
a=linear (time,marker.key(n).time-f,marker.key(n).time,r,r+d);
wiggle(freq,a);

}
AE POSTWORK blog is virtually just a notepad, where I put all the AE expressions up I finde and use, its so I can easily get to them wherever I am and no matter what computer I sit at. I do not write my own expressions, so all expressions on the page is downloaded from the web,or modify versions i found. and tutorials etc.. I will try to credit those who have made expressions if I can.

Now, with tips and tricks for AE & C4D.
No more forgetting the little tricks and tips I found on my road with After Effects, etc.

Sebabba