Song title fades in AfterEffects
I’ve been working on a video of our live performance in Winston Kingdom using Adobe AfterEffects. To show the title of a song at the start and end of the song, I used a script to automate the fading. Assign it as an expression to the opacity of the text layer and it’ll automatically show for a few seconds at the in-point and out-point of the layer, including nice fades:
fade_time = 1
show_time = 5
if (time < inPoint + fade_time) {
linear(time, inPoint, inPoint + fade_time, 0, 100)
} else if (time < inPoint + fade_time + show_time) {
100
} else if (time < inPoint + fade_time + show_time + fade_time) {
linear(time, inPoint + fade_time + show_time, inPoint + fade_time + show_time + fade_time, 100, 0)
} else if (time < outPoint - fade_time - show_time - fade_time) {
0
} else if (time < outPoint - fade_time - show_time) {
linear(time, outPoint - fade_time - show_time - fade_time, outPoint - fade_time - show_time, 0, 100)
} else if (time < outPoint - fade_time) {
100
} else if (time < outPoint) {
linear(time, outPoint - fade_time, outPoint, 100, 0)
} else {
0
}
fade_time
is the duration of fade-in and fade-out, show_time
determines how
long the text layer is shown at 100% opacity, both are in seconds. You can make
an animation preset by adding a “Solid Composite” effect, setting opacity=0% and
assigning the expression to the “source opacity” property.