Fade in/Fade Out - Scale
Posted: May 28th, 2004, 4:01 am
Problem : Is anyone able to give me an expression that I can add to the Transform effect's "scale" and "opacity" parameters (so that it can be saved as a favorite effect). The expression needs to fade in the layer (Transform effect's opacity parameter) from 0 to 100 percent in one second, starting at the beginning of the layer, then fade to 0 percent in one second at the end of the layer; Also the layer's scale (Transform
effect's scale parameter) would change from 20 percent to 100 over the
life of the layer.
So what I want to end up with is an effect that I can paste onto a
layer that fades it up at the start and fades it out at the end and
scales it the whole time, but it reacts to the layers length (short
layers move faster, if I trim the layer all the parameters move to the
new in or out point)
I have a lot of layers and a lot of comps that are all going to do this
same move and I don't want to get in to changing key frames for each
layer.
Solution 1 (posted by Dan Ebberts)
Try this for opacity:
rampTime = 1;
if (time < in_point + rampTime){
linear(time,in_point,in_point + rampTime,0,100)
}else if (time < out_point - rampTime){
100
}else{
linear(time,out_point - rampTime,out_point,100,0)
}
And this for scale:
startScale = [20,20];
endScale = [100,100];
linear(time,in_point,out_point,startScale,endScale)
Solution 2 (posted by Stu Maschwitz)
Adobe After Effects 6.5 Keyframe Data
Opacity
Expression Data
fadeFrames = 24;
fadeTime = fadeFrames*thisComp.frameDuration;
Math.min(
linear(time, inPoint, inPoint + fadeTime, 0, 100),
linear(time, outPoint - fadeTime, outPoint, 100, 0)
)
End of Expression Data
End of Keyframe Data
effect's scale parameter) would change from 20 percent to 100 over the
life of the layer.
So what I want to end up with is an effect that I can paste onto a
layer that fades it up at the start and fades it out at the end and
scales it the whole time, but it reacts to the layers length (short
layers move faster, if I trim the layer all the parameters move to the
new in or out point)
I have a lot of layers and a lot of comps that are all going to do this
same move and I don't want to get in to changing key frames for each
layer.
Solution 1 (posted by Dan Ebberts)
Try this for opacity:
rampTime = 1;
if (time < in_point + rampTime){
linear(time,in_point,in_point + rampTime,0,100)
}else if (time < out_point - rampTime){
100
}else{
linear(time,out_point - rampTime,out_point,100,0)
}
And this for scale:
startScale = [20,20];
endScale = [100,100];
linear(time,in_point,out_point,startScale,endScale)
Solution 2 (posted by Stu Maschwitz)
Adobe After Effects 6.5 Keyframe Data
Opacity
Expression Data
fadeFrames = 24;
fadeTime = fadeFrames*thisComp.frameDuration;
Math.min(
linear(time, inPoint, inPoint + fadeTime, 0, 100),
linear(time, outPoint - fadeTime, outPoint, 100, 0)
)
End of Expression Data
End of Keyframe Data