Medical Animation: Working with Video & Audio

Free After Effects Tutorial

Immerse yourself in this comprehensive After Effects tutorial, covering topics such as working with video and audio, looping video and audio, creating a medical animation, and organizing your workspace for optimal efficiency.

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:

Working with Video, Working with Audio, Looping Video & Audio

Exercise Preview

preview medical ill setup

Exercise Overview

In this exercise you’ll create a medical animation of blood flowing through the body. The graphics were created in Adobe Photoshop, which shares a special working relationship with After Effects. PSD files can be imported into After Effects as compositions, preserving their layering, appearance, layout, and applied layer styles.

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.

Previewing the Final Video

  1. Let’s see a preview of what you’ll be making. If you’re in After Effects, keep it open but switch to your Desktop.
  2. On the Desktop, navigate to Class Files > After Effects Class > Medical Animation > Preview Movie and double–click medical animation.mp4.

  3. Notice the following:

    • The blood cells move along a curved path following the curve of the vein.
    • The cells are slightly blurry as they are moving.
    • There are multiple sizes of cells that all move at slightly different speeds.
  4. Replay the video if you need to, and close it when done.

Setting Up the Workspace

  1. In After Effects, go to Window > Workspace > Standard.

  2. Choose Window > Workspace > Reset “Standard” to Saved Layout.

  3. If the After Effects window does not fill the screen, maximize it:

    Mac: At the top left of the window, click the green button (the third button).
    Windows: At to the top right of the window, click the Maximize button (the middle button).

Getting Started

  1. In After Effects, if you have a project open, choose File > Save.

  2. Choose File > Open Project and:

    • Navigate to Desktop > Class Files > After Effects Class > Medical Animation.
    • Double–click on Medical Animation - Started.aep to open it.
  3. Choose File > Save As > Save As and:

    • Name the file Your Name - Medical Animation.aep and
    • Save it into Desktop > Class Files > After Effects Class > Medical Animation.
    • Click Save.

Creating a Dummy Comp & Importing

When importing Illustrator and Photoshop file as Compositions, the dimensions are taken from the AI or PSD file but most of the other comp settings (duration, framerate, etc.) must come from somewhere else. These other settings are based on the last After Effects composition you had open, so to set them we can create a dummy composition before importing the files.

  1. Choose Composition > New Composition, press Cmd–N (Mac) or Ctrl–N (Windows), or click on the New Composition button in the Composition panel.

  2. Do NOT click OK until we say so! Set the following:

    • From the Preset menu choose HD • 1920x1080 • 29.97 fps
    • Make sure Resolution is set to Full.
    • For Duration type in 3000 and hit Tab to set it 0;00;30;00 (30 seconds).
    • If the background color is not set to black: click on the Background Color box, set the hex code to #000000 and click OK.
    • Click OK to create the composition.
  3. In the Project panel, click on Comp 1 and hit Delete (Mac) or Backspace (Windows) to delete it.

  4. Click on the 01 - Images folder to highlight it (so the file we’re about to import will go into it).

  5. Choose File > Import > File or press Cmd–I (Mac) or Ctrl–I (Windows).

  6. Navigate to Desktop > Class Files > After Effects Class > Medical Animation > Media > images.

  7. Click once on the Circulation.psd to select it.

  8. Change the Import As menu to Composition - Retain Layer Sizes.

    NOTE: Importing an Photoshop or Illustrator document as a composition converts the PSD or AI file into a native After Effects comp. This preserves the layout, layer naming, and other features so all you have to focus on in After Effects is animating. The Retain Layer Sizes option sets each layer’s dimensions to the layer’s content rather than the dimensions of the document.

  9. Make sure Create Composition and Photoshop Sequence are unchecked.

  10. Click Open (Mac) or Import (Windows).

  11. In the next dialog that appears, confirm:

    • Import Kind: Composition - Retain Layer Sizes
    • Layer Option: Editable Layer Styles
  12. Click OK to finalize the import.

  13. In the Project panel, drag the Circulation comp out of the folder and into the main area of the panel.

  14. Double–click on the Circulation comp to open it.

Organizing the Timeline

Keeping an organized timeline makes it easier to work with your layers, especially if you have a lot of them.

  1. With the Circulation comp open, click on the Main Vein - Top layer to select it.

  2. Change the layer’s label label color it to Yellow.

  3. Select the BG Vein 01 layer.

  4. Hold Shift and click on the Gradient Fill 1 layer to select all the layers in between.

  5. Change the label color for any of the highlighted layers to Orange.

Looping Video & Audio

In this project we’ll use video and audio. Unlike image layers, video and audio files both have set durations. In this project both files are considerably shorter than the comp’s duration. To fix this we’ll set them to loop repeatedly.

  1. In the Project panel, expand right arrow menu the 02 - Audio folder.

  2. Click on the heartbeat-loop.wav file to highlight it.

    At the top of the Project panel you can see the 02:01 duration, indicating this is just over 2 seconds long.

  3. Ctrl–click (Mac) or Right–click (Windows) on heartbeat-loop.wav, choose Interpret Footage > Main and:

    • At the bottom of the window, set Loop to 15
    • Click OK.
  4. Drag heartbeat-loop.wav into the timeline (the left side where layers names are) so it’s the bottom layer.

    Notice that the audio layer extends to the end of the timeline.

  5. Use the Spacebar to hear the audio (a heart beat).

  6. In the Project panel, expand right arrow menu the 03 - Video folder.

  7. Select red blood cell.mov.

    At the top of the Project panel you can see the 01:01 duration, indicating this is just over 1 seconds long.

  8. Ctrl–click (Mac) or Right–click (Windows) on red blood cell.mov and choose Interpret Footage > Main.

    • At the bottom of the window, set Loop to 30
    • Click OK.
  9. Drag red blood cell.mov into the timeline (the left side where layers names are) and put it below the Main Vein - Top layer.

    Notice the red blood cell in the middle of the composition. This video has a transparent background so it’s only an animated blood cell.

  10. Use the Spacebar to see the red blood cell video (and hear the heart beat audio).

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

Animating Video Files

With the exception that they have a limited duration, video layers are treated the same as still image layers, so we can animate their scale, position, etc and even add the same effects to them.

  1. We’re going to have to change a preference so we can easily make curved motion paths.

    • Choose After Effects > Preferences > General (Mac) or Edit > Preferences > General (Windows).
    • If it is enabled, uncheck the switch next to Default Spatial Interpolation to Linear.
    • Press OK to close the dialog box.
  2. In the Timeline, select red blood cell.mov layer and:

    • Press Return (Mac) or Enter (Windows) to make the name editable.
    • Rename it blood cell 1 and press Return (Mac) or Enter (Windows) again to finalize the name change.
  3. Change the blood cell 1 layer’s label color to Blue.

  4. With the blood cell 1 layer selected, hit S to reveal Scale.

  5. Change Scale to 15

  6. Press P to reveal Position.

  7. In the Tools panel, choose the Selection selection tool tool (or hit the V key to choose it).

  8. In the Composition panel, drag blood cell 1 to the left and position it so it is hidden behind part of the vein.

    animateVideoFiles 01

    We used Position values of 20, 800

  9. Move the playhead to the beginning of the timeline.
  10. Click the Position stopwatch stopwatch.

  11. Move the playhead to 1;00

  12. In the Composition panel, drag blood cell 1 to the middle of the vein (we used Position values of 770, 470).

    animateVideoFiles 02

  13. Move the playhead to 2;00

  14. Drag blood cell 1 to the right of the vein until it is just off the screen. Try to keep it about level with the top of the vein. (We used Position values of 1970, 265).

    animateVideoFiles 03

  15. In the Timeline, scrub (drag) the playhead back and forth over the keyframes you just created to preview the animation.

    After Effects attempts to create a smooth sloping path of motion automatically, but we’ll adjust the path in the next exercise.

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

    In the next exercise you’ll finish this animation.

Editing Curved Motion Paths

The spatial interpolation preference we changed attempts to create a smooth curving path for any animation with more than 2 position keyframes, but it doesn’t always give you the path you want. Luckily, the motion path can be edited after you’ve made it.

  1. In the Tools panel, choose the Selection selection tool tool (or press the V key to choose it).

  2. In the Timeline, select the blood cell 1 layer.

    If the keyframes are not visible, press they U key to reveal them.

  3. Select the last keyframe.

    NOTE: Selecting a position keyframe in the the Timeline highlights the vertices and direction handles of the motion path in the Composition panel.

  4. In the Composition panel, drag the direction handle attached to the last vertex of the motion path so that it now follows the curve of the vein.

    animateVideoFiles 04

  5. In the Timeline, select the middle keyframe.

  6. In the Composition panel, adjust the handles of the middle vertex (anchor point) to refine the path.

    animateVideoFiles 05

  7. Adjust the direction handles until you’re happy with how the motion path matches the curvature of the vein. You can move the position of the vertices (anchor points) if needed.

  8. In the Timeline, scrub (drag) the playhead back and forth over the keyframes you just created to preview the animation.

    You want to make sure the blood cell stays inside the vein graphic as it moves.

Jerron Smith

Jerron Smith is an Editor, Animator, Educator and an Author. He has a MA in Communication Arts and expert level certifications in Adobe After Effects, Adobe Premiere Pro, Adobe Photoshop and Illustrator. He also has a good working knowledge of other animation programs like Cinema 4D, Adobe Animate, and 3DS Max from his decades of experience in and around the design industry. He has authored multiple books and video training series on computer graphics software such as: After Effects, Premiere Pro, Photoshop, Illustrator and Flash(back when it was a thing). Jerron has taught at the college level at schools such as The New York Institute of Technology, New York City College of Technology, and Fashion Institute of Technology.

More articles by Jerron Smith

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