Social Media Ad: Animating Opacity & Audio/Video Fades

Free After Effects Tutorial

In this After Effects tutorial, you'll learn to animate opacity, work with audio and video fades, modify work area and composition duration, copy and paste keyframes, and create a vignette effect using masks.

This exercise is excerpted from Noble Desktop’s Adobe After Effects training materials and is compatible with After Effects updates through 2023. To learn current skills in After Effects with hands-on training, check out our After Effects Bootcamp, Motion Graphics Certificate, and motion graphics design classes in-person and live online.

Topics covered in this After Effects tutorial:

Animating Opacity, Adding Audio & Video Fades, Changing Work Area & Composition Duration, Copying & Pasting Keyframes, Creating a Vignette Effect with a Mask

Exercise Preview

preview animating opacity

Exercise Overview

In this exercise you’ll animate opacity to animate a logo, as well as fade in video and audio for smoother transitions.

After Effects Bootcamp: Live & Hands-on, In NYC or Online, Learn From Experts, Free Retake, Small Class Sizes,  1-on-1 Bonus Training. Named a Top Bootcamp by Forbes, Fortune, & Time Out. Noble Desktop. Learn More.

Getting Started

  1. You should still have Your Name - Guitar Picks.aep open in After Effects. If you closed it, re-open it now by going to File > Open Project then Desktop > Class Files > After Effects Class > Guitar Picks. We recommend you finish the previous exercises (1B–2A) before starting this one. If you haven’t finished them, do the following sidebar.

    If You Did Not Do the Previous Exercises (1B–2A)

    1. If a project is open in After Effects, go to File > Save, then File > Close Project.
    2. Go to File > Open Project and navigate to Desktop > Class Files > After Effects Class > Guitar Picks > Finished Projects.
    3. Double–click on Guitar Picks - Ready For Fades.aep.
    4. Go to File > Save As > Save As. Name the file Your Name - Guitar Picks.aep and save it to Desktop > Class Files > After Effects Class > Guitar Picks (replacing the file if it’s already there).

Darkening the Background Where the Logo Will Go

  1. Use the Spacebar to preview the timeline:

    • After the photo drop down, we want to add a logo and text.
    • The logo will start black and then change to white.
    • We want the black logo to blend into a black background, so let’s darken the background image (on the right side, over which we’ll be placing the logo).
  2. Move the timeline playhead to 6;14
  3. Select the background layer.
  4. If you don’t see the Effects & Presets panel on the right of the window, choose Window > Effects & Presets.
  5. In the Effects & Presets panel’s search field type linear
  6. Double–click on the Linear Wipe effect to add it to the selected layer.
  7. In the Effect Controls panel (on the left of the window), set the following:

    • Transition Completion: If the stopwatch stopwatch is blue, click it to turn it white (we do not want to change this over time).
    • Transition Completion: 50%
    • Wipe Angle: 0x-90° (notice it’s a negative 90!)
    • Feather: 800
  8. Move the playhead to 7;00

Adding the Logo

Let’s add the company logo and animate it, changing it from a black silhouette into the normal logo.

  1. Find the Project panel. You can click on the Project tab in the same group as Effect Controls, or choose Window > Project (near the bottom).
  2. In the Project panel, from the 01 - Images folder drag logo.png into the Timeline above the smoke 2 layer.
  3. Hold Shift and press the Up Arrow key 3 times (to move the logo up, so there’s space below for some type).
  4. With the [logo.png] layer selected, hit Cmd–D (Mac) or Ctrl–D (Windows) to duplicate it.

  5. Select the top [logo.png] layer.

    • Hit Return (Mac) or Enter (Windows) and rename the layer logo - white
    • Press Return (Mac) or Enter (Windows) again to finalize the name.
  6. Rename the bottom [logo.png] layer to logo - black

  7. Use the Spacebar to preview the timeline.

    Notice how the logo does not move.

  8. Move the playhead to 7;00
  9. Select both logo layers (click on one, then hold Shift and click on the other).
  10. Set the Parent menu (to the right far of the layer name) for the logo layers to 1.controller

  11. Use the Spacebar to preview the timeline.

    Notice how the logo now moves with the other elements (because it follows the parent null object controller).

  12. Move the playhead to 7;00
  13. Press Cmd–Shift–A (Mac) or Ctrl–Shift–A (Windows) to deselect all layers.
  14. Click the eye eye icon for the logo - white layer to hide it.
  15. Select the logo - black layer.
  16. In the Effects & Presets panel’s search field type fill
  17. Double–click the Fill effect.
  18. In the Effect Controls panel, to the right of Color, click on the color swatch to open the color picker.
  19. Change the hex code to #000000 and click OK.
  20. Click the eye eye icon for the logo - white layer back to show it.

Animating Transform Properties: Opacity

  1. Move the playhead to 7;04
  2. Select the logo - white layer.
  3. Press T to show Opacity.
  4. Change Opacity to 0
  5. Click the stopwatch stopwatch by Opacity to create a keyframe.
  6. Move the playhead to 7;24
  7. Change Opacity to 100
  8. Use the Spacebar to preview the timeline.

    You should first see the black logo silhouette, and then the white logo fades in. Nice!

Adding the Website Text

  1. Move the playhead to 7;24
  2. In the Timeline select the Rockin’ Guitar Picks layer.
  3. Press Cmd–D (Mac) or Ctrl–D (Windows) to duplicate it.
  4. Choose Window > Align.

  5. In the Align panel:

    • Confirm that Align Layers to is set to Composition
    • Click the Align Center button horizontal center align.
  6. Hit P to show Position in the Timeline.
  7. Set the second Position value to 380

    This should move the text below the logo.

  8. In the Timeline, double-click on the name of the new Rockin’ Guitar Picks 2 layer to highlight the text and:

    • Type guitarpicks.com
    • Hit Cmd–Return (Mac) or Ctrl–Enter (Windows) to finalize the text change.
  9. In the Tools panel at the top left of the window, choose the Selection tool selection tool.

Reusing Animations By Copying & Pasting Keyframes

We want the guitarpicks.com text to fade it at exactly the same time as the logo. We’ve already made Opacity keyframes with the correct timing on the logo, so let’s see how to copy and paste keyframes to reuse animations!

  1. Press J to jump the playhead to the previous keyframe, which should be the Opacity keyframe for logo - white at 7;04
  2. Click on the logo - white layer’s Opacity property name. You want to click on the actual name of the property to highlight all of the Opacity keyframes (they’ll all become blue diamonds).

  3. Hit Cmd–C (Mac) or Ctrl–C (Windows) or choose Edit > Copy.

    NOTE: The Keyframes will be pasted at the position of the playhead, which is why we’re going to the first keyframe.

  4. Click on the guitarpicks.com text layer.
  5. Hit Cmd–V (Mac) or Ctrl–V (Windows) or Edit > Paste to paste the keyframes!

    NOTE: The pasted keyframes will start at your playhead position.

  6. Press U to see the keyframes on the guitarpicks.com layer.
  7. Use the Spacebar to preview the timeline.

    Now the text should fade in at the same time as the white logo.

  8. Press Cmd–A (Mac) or Ctrl–A (Windows) to select all of the layers on the Timeline.
  9. Press Cmd ~ (Mac) or Ctrl ~ (Windows) once or twice to hide all visible properties.
  10. Press Cmd–Shift–A (Mac) or Ctrl–Shift–A (Windows) to deselect all layers.

Changing Work Area & Composition Duration

Our composition is 15 seconds long. We started with plenty of time, because it’s much easier to trim off extra time, than to add time. Now that we have enough of our animation done, let’s remove the extra time we don’t need at the end. We could go into Composition Settings and change Duration, but let’s see another way.

  1. If you can’t see the entire width of the timelime (from start to finish), keep hitting the – (minus) key to zoom out until you see the entire timelime.
  2. Move the playhead to 10;29
  3. As shown below, at the top right of the Timeline, drag the blue line for Work Area End over to the playhead while holding Shift (so it snaps to the playhead).

    resize work area

    NOTE: The work area is used to define the following:

    • The area that will be exported when creating the final video file.
    • The area you preview. So if you want to loop over a specific area of an animation, you can use the work area to watch only that part.
  4. We could stop here and let the work area define the length for exporting, but then we wouldn’t be able to use change the work area in the future if we wanted to change the preview area.

    Here’s a somewhat hidden trick. Ctrl–click (Mac) or Right–click on the gray work area bar and choose Trim Comp to Work Area.

  5. The unwanted end of the timeline has been removed!

    NOTE: The benefit of using Trim Comp to Work Area is you can trim off the beginning and/or end. When you go into Composition > Composition Settings and change the Duration, it will only trim off the end.

  6. Choose File > Save or hit Cmd–S (Mac) or Ctrl–S (Windows).

Adding a Video Fade

For our entire animation, instead of starting and ending the abruptly, let’s add fade in and out the video and audio. A beneficial side effect of doing this will be the start and end will be the same, creating a seamless loop!

  1. In the Timeline, select the photo2 layer (so the new layer will go on top of it).

  2. Choose Layer > New > Solid, or press Cmd–Y (Mac) or Ctrl–Y (Windows).

  3. Click the Make Comp Size button to ensure this layer’s dimensions match the composition.

  4. Click on the color swatch to choose a color and:

    • Set the hex code to #000000
    • Click OK to close the color picker.
  5. Click OK again to create the solid layer.

  6. With the [Black Solid 1] layer selected in the Timeline:

    • Hit Return (Mac) or Enter (Windows) to edit the layer name.
    • Type in fade - in/out
    • Hit Return (Mac) or Enter (Windows) to finalize the name change.
  7. Move the playhead to the beginning of the Timeline.
  8. Press T to show the fade - in/out layer’s Opacity.
  9. Click the stopwatch stopwatch for Opacity.
  10. Move the playhead to 0;15
  11. Change Opacity to 0
  12. Use the Spacebar to preview and see this gives us a quick 15 frame (half second) fade in from black at the beginning.
  13. Move the playhead to 10;14
  14. On the far left of the Timeline, in the keyframe controls keyframe navigation gray click the Add or Remove Keyframe diamond diamond icon to the left of the Opacity property.

    This creates a new keyframe with the same value as the previous keyframe.

  15. Move the playhead to the end of the Timeline 10;29
  16. Change Opacity to 100
  17. Use the Spacebar to preview. Notice the fade out to black at the end, and how the loop is now visually seamless (but the audio loop is not seamless).
  18. Hit T to hide Opacity.

Adding an Audio Fade

  1. Move the timeline playhead to 0;15
  2. Select the bg audio layer at the bottom of the Timeline.
  3. Hit the L key twice (LL) to reveal its waveform.
  4. Hold Shift and hit the L key to also show the Audio Levels.
  5. Click the stopwatch stopwatch for Audio Levels to set the a keyframe.
  6. Move the playhead to the beginning of the Timeline.
  7. Change Audio Levels to -24 dB.
  8. With the first Audio Level keyframe selected (it should be blue), hit Cmd–C (Mac) or Ctrl–C (Windows) or choose Edit > Copy to copy the keyframe.

    We’ll use it again later and don’t want to have to memorize the value.

  9. Move the playhead to 10;14

  10. On the far left of the Timeline, in the keyframe controls keyframe navigation gray click the Add or Remove Keyframe diamond diamond icon to the left of the Audio Levels property.
  11. Move the playhead to 10;29
  12. Press Cmd–V (Mac) or Ctrl–V (Windows) or choose Edit > Paste to paste the keyframe.

  13. Use the Spacebar to preview.

    We now have an audio fade that matches the video fade, making a seamless loop.

  14. Hit U to hide the keyframes.

  15. Choose File > Save or hit Cmd–S (Mac) or Ctrl–S (Windows).

Optional Bonus: Finishing the Smoke

  1. Move the playhead to 9;00
  2. Notice there’s a light area of orange smoke on the left side. Let’s move that off to the left so it’s outside of the composition.
  3. Select the smoke layer.
  4. Hold Shift and click on the smoke 2 layer.
  5. Hit P to show Position for both layers.
  6. Change the first Position value (for either layer) to 775
  7. Hit P to hide Position for both layers.
  8. Use the Spacebar to preview.

    That looks better, but when the logo appears we want it to feel like smoke is blowing over it. Let’s add one more smoke layer.

  9. Select only the smoke 2 layer (you’ll have to select another layer to deselect both smoke layers and click back onto smoke 2).
  10. Press Cmd–D (Mac) or Ctrl–D (Windows) to duplicate it.
  11. Move the playhead to 6;18
  12. Press the [ key to move the In point of the new smoke 3 layer to the playhead.
  13. In the Effect Controls panel, under Tritone click on the color swatch next to Midtones.

  14. Change the hex code to #23bcb8 and click OK.

  15. Use the Spacebar to preview.

    The mix of 2 colors of smoke, and the timing of it blowing on to reveal the logo is much better!

Optional Bonus: Creating a Vignette Effect with a Mask

A vignette is a darkening of the edges around a photo/video. We can create this using a color layer and a mask.

  1. Move the playhead to 1;00
  2. In the Project panel, expand the Solids folder.
  3. Drag Black Solid 1 into the Timeline below the fade - in/out layer.
  4. With the [Black Solid 1] layer selected in the Timeline:

    • Hit Return (Mac) or Enter (Windows) to edit the layer name.
    • Type in vignette
    • Hit Return (Mac) or Enter (Windows) to finalize the name change.
  5. In the Tools panel, click and hold on the Rectangle tool rectangle tool and choose the Ellipse tool ellipse tool.
  6. Now that the Ellipse tool ellipse tool is visible in the Tools panel, double–click on it.

    This creates a mask on the selected layer that matches the dimensions of the composition.

  7. In the Timeline, the vignette layer should now have a Masks option (with a Mask 1 in it).
  8. In the menu to the right of Mask 1 change Add to Subtract.
  9. Hit the F key to reveal the Mask Feather property.
  10. Change the Mask Feather property’s first value to 400
  11. Hit the T key to reveal the layer’s Opacity.
  12. Change Opacity to 85
  13. Hit the T key again to hide Opacity.
  14. Use the Spacebar to preview to finished animation.
  15. Choose File > Save or hit Cmd–S (Mac) or Ctrl–S (Windows).

Mask Property Keystrokes

Press M to reveal all masks (for a selected layer) and the Mask Path property.

Press MM to reveal all masks (for a selected layer) and all the properties.

Press F to reveal all masks (for a selected layer) and the Mask Feather property.

Press TT to reveal all masks (for a selected layer) and the Mask Opacity property.

How to Learn After Effects

Master After Effects with hands-on training. After Effects is the industry-standard application for motion graphics, animation, and visual effects.

Yelp Facebook LinkedIn YouTube Twitter Instagram