Expression for a smooth credit roll
Expression for a smooth Credit Roll.Even rate values should be used if you are rendering to an interlaced format
rate = 2; //value in pix/frame.
if (marker.numKeys > 0){
if (time > marker.key(1).time){
value - [0,rate*timeToFrames(time-marker.key(1).time)];
} else {
value;
}
}
without layer marker
rate = 2; //value in pix / frame. value - [0, rate*timeToFrames(time)];
How to make a squish and squash expression with layer markers
squish and squash expression with layer markers
Thanks, Didgi… I took the liberty of compacting the code a little, and adding thisLayer (not for compactness, but for clarity). I also added an option 2 that uses wiggle instead of sine to add a non-uniform noise-based squish/squash effect.
Use on position or scale (or other Array(2) property) What this expression does is make the layer move around each time it passes a layer marker. Or scale up and down if you put it on scale.
There’s a bit of a harsh jump at the markers. Maybe there’s a way to sort that out with an ease function too.
-felt.
amp=20; // max amplitude in pixels
freq=1; //oscillations / second
decay=10; //how fast it slows down
n = null;
if (marker.numKeys > 0){
n = thisLayer.marker.nearestKey(time).index;
if (thisLayer.marker.key(n).time > time) n--;
}
if (n){
t = time - thisLayer.marker.key(n).time;
//option 1
newVal = amp*Math.sin(freq*2*Math.PI*t)/Math.exp(decay*t); value+[newVal, newVal];
//option 2 (comment out to use option 1)
newVal = (wiggle(freq, amp)-value) / Math.exp(decay * t); value + newVal;
} else {
newVal = value;
}
Auto Fade Expression
Add to the Opacity property.
Edit: Just to add a little description of what it does: This fades a layer in and out. You can use two markers. If you do, then the layer will fade in from the in-point to the first marker and will fade out from the last marker to the out-point of the layer. If you don’t use markers, the fade in and out times will depend on the “transition” variable. The fade is linear. You could change this by changing the linear function to ease, easeIn or easeOut. -felt
var t = time, iPt = inPoint, oPt = outPoint; //shorthand to keep the code shorter
var transition = 20; // transition time in frames if no markers used
if (marker.numKeys >= 2){ //markers version
linear(t, iPt, marker.key(1).time,0,100)-linear(t, marker.key(2).time, oPt, 0, 100);
} else { //no markers version
tSecs = transition * thisComp.frameDuration; // convert to seconds
linear(t, iPt, iPt + tSecs, 0, 100) - linear(t, oPt-tSecs, oPt, 0, 100);
}
Also, there’s a slightly more robust version here
Jumpy Wiggle (makes wiggle skip and hold rather than move fluidly)
// Jumpy Wiggle (moves at a random FPS)
v=wiggle(5,50);
if(v < 50)v=0;
if(v > 50)v=100;
vMove at a constant speed without keyframes.(x-axis)
veloc = -10; //horizontal velocity (pixels per second) x = position[0] + (time - inPoint) *veloc; y = position[1]; [x,y]
for rotation.
// Spin (rotate at a constant speed without keyframes) veloc = 360; //rotational velocity (degrees per second) r = rotation + (time - inPoint) *veloc; [r] ;
I have a comp called ‘main’. With in the ‘main’ comp I have ‘ph1’ composition. It contains some Fx & Animations. In Project Panel I organize both comps in a folder called ‘Scene1’.
If I Duplicate the ‘Scene1’ folder I got new ‘Scene2’ folder. The new ‘main’ comp contains old ‘ph1’ comp. But When I duplicate like this the new ‘main’ comp must contain ‘ph1’ and it should contains all Fx & Animation. Is there any Script/Exp available for this??
I hope you Understand my problem
.
DarkLand said
I have a comp called ‘main’. With in the ‘main’ comp I have ‘ph1’ composition. It contains some Fx & Animations. In Project Panel I organize both comps in a folder called ‘Scene1’.
If I Duplicate the ‘Scene1’ folder I got new ‘Scene2’ folder. The new ‘main’ comp contains old ‘ph1’ comp. But When I duplicate like this the new ‘main’ comp must contain ‘ph1’ and it should contains all Fx & Animation. Is there any Script/Exp available for this??
I hope you Understand my problem.
not sure if I have understood you correctly. You want the new main2 comp to contain the new ph2 comp, right?
use this script: http://aescripts.com/true-comp-duplicator/
Creattive said
not sure if I have understood you correctly. You want the new main2 comp to contain the new ph2 comp, right? use this script: http://aescripts.com/true-comp-duplicator/
Yes.
Thank you very much 
@DarkLand: you’re welcome 
I have a question, too:
Is it possible to change only a specific keyframe in an animation?
I have a layer that’s color is animated from green to blue. For this I have 2 keyframes. I want that you can easily change one of these colors, without having to look for the keyframes, so for example:
animation from green > red.
or
animation from red > blue
So is it possible that I have a control-layer with 2 color pickers, one for each keyframe?
- Community Moderator
- Sold between 50 000 and 100 000 dollars
- Author was Featured
- Item was Featured
- Author had a File in an Envato Bundle
- Beta Tester
- Has been a member for 4-5 years
- United Kingdom
Is it possible to change only a specific keyframe in an animation?
Creattive said
Is it possible to change only a specific keyframe in an animation?I have a layer that’s color is animated from green to blue. For this I have 2 keyframes. I want that you can easily change one of these colors, without having to look for the keyframes, so for example: animation from green > red … or … animation from red > blue.
So is it possible that I have a control-layer with 2 color pickers, one for each keyframe?
Not really… well not simply, anyway. But there is a way to achieve what you want to do.
col1 = Comp("x").layer("y").effect("z")(1).value;//ref to color effect
col2 = Comp("x").layer("y").effect("z2")(1).value; //ref to other color effect
if(thisProperty.numKeys >= 2) {
key1time = thisProperty.key(1).time;
key2time = thisProperty.key(2).time;
if(time>=key1time && time<= key2time) {
elapsed = (time-key1time)/(key2time-key1time);
elapsed = ease(elapsed, 0, 1, 0, 1); //optional if you want it eased
tCol = elapsed*col2 + (1-elapsed)*col1;
} else if(time> key2time) {
tCol = col2;
} else {
tCol = col1;
}
} else {
value;
}
