Medical Animation: Creating Reusable Animations

Free After Effects Tutorial

Dive into this comprehensive After Effects tutorial and learn how to loop an animation with expressions, work with essential properties, and add motion blur to a nested composition for a more dynamic and fluid animation.

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.

Note: These materials are provided to give prospective students a sense of how we structure our class exercises and supplementary materials. During the course, you will get access to the accompanying class files, live instructor demonstrations, and hands-on instruction.

Topics covered in this After Effects tutorial:

Looping an Animation with Expressions, Working with Essential Properties, Adding Motion Blur to a Nested Comp

Exercise Preview

preview medical anim

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.

Exercise Overview

In this exercise you’ll finish animating the medical illustration as you learn about motion paths, and using an expression to loop an animation.

Getting Started

  1. You should still have Your Name - Medical Animation.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 > Medical Animation. We recommend you finish the previous exercise (5C) before starting this one. If you haven’t finished it, do the following sidebar.

    If You Did Not Do the Previous Exercise (5C)

    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 > Medical Animation > Finished Projects.
    3. Double–click on Medical Animation - Ready for Expressions.aep.
    4. Go to File > Save As > Save As. Name the file Your Name - Medical Animation.aep and save it to Desktop > Class Files > After Effects Class > Medical Animation (replacing the file if it’s already there).

Looping an Animation with Expressions

After Effects has a scripting language named Expressions. Scripting can be used on the Timeline to enhance your animation and optimize some repetitive tasks. In this section, we will add an expression to the Position property to loop the keyframes.

  1. In the Timeline, select the blood cell 1 layer.
  2. Hold Option (Mac) or Alt (Windows) and click on the Position stopwatch stopwatch to add an expression.

  3. In the expression text field that appears below the keyframes, replace the default text (transform.position) with the following:

    loopOut("cycle");

    NOTE: Expressions are case–sensitive so type it exactly as shown above!

  4. Click anywhere outside of the text field to finalize the expression.

  5. Move the playhead to 6;00

  6. Press the N key to move the end of the work area bar to the current playhead position.

  7. Use the Spacebar to preview the animation. Notice that the animation now repeats every 2 seconds.

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

Duplicating & Offsetting Layers

To create more blood cells, we’ll pre–comp the animated layer to turn it into a nested composition.

  1. In the Timeline, Ctrl–click (Mac) or Right–click (Windows) on the blood cell 1 layer and choose Pre–compose.

  2. Set the following:

    • Name it blood cell - animated
    • Check on Move all attributes into the new composition.
    • Make sure the other options are NOT checked.
    • Click OK.
  3. Select the blood cell - animation layer
  4. Hit Return (Mac) or Enter (Windows) to make the name editable.
  5. Rename it cell 1 and hit Return (Mac) or Enter (Windows) to finalize.

  6. Ctrl–click (Mac) or Right–click (Windows) on the cell 1 layer and choose Effect > Time > Echo.

  7. In the Effect Controls panel (at the top left of the window):

    • Echo Time (seconds): -0.273
    • Number of Echoes: 5
    • Echo Operator: Maximum

    NOTE: Starting Intensity and Decay should already be set to 1.0 by default.

  8. Use the Spacebar to preview the animation.

    It may be slow to render the first time playing. Once rendered, it will play at normal speed. If you want to speed up the preview, at the bottom left of the Composition panel is a Resolution/Down Sample Factor Popup that should say (Full). Try changing that to Half or lower.

  9. In the Timeline, select the cell 1 layer.
  10. Hit Cmd–D (Mac) or Ctrl–D (Windows) to duplicate the layer.

  11. Move the playhead to 0;10

  12. Press [ to move the In point of the cell 2 layer to the playhead.

  13. In the Effect Controls panel, change the cell 2 layer’s Echo Time to -0.133

  14. Wit the cell 2 layer selected, hit Cmd–D (Mac) or Ctrl–D (Windows) to duplicate it.

  15. In the Effect Controls panel, change the cell 3 layer’s Echo Time to -0.243

  16. Ctrl–click (Mac) or Right–click (Windows) on any of the column labels and choose Columns > In.

  17. Click on the In point value for the cell 3 layer and:

    • Change it to -100
    • Click OK.
  18. Ctrl–click (Mac) or Right–click (Windows) on the In column header and choose Hide This.

  19. Use the Spacebar to preview the animation.

    Pretty good, but some size variation on the cells would make it better.

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

Adding Motion Blur to a Nested Comp

Motion blur is an effect built into every layer. Normally all you have to do is turn on a layer’s Motion Blur switch and you are good to go. However, when working with nested comps there are a few more steps involved.

  1. In the Timeline, double–click on the any of the cell (cell 1, cell 2, or cell 3) nested comp layers.

  2. If you don’t see the switches timeline switches to the right of the blood cell 1 layer:

    • Click the Toggle Switches / Modes button at the bottom of the Timeline.
  3. Click on the layer’s Motion Blur motion blur column switch.

  4. Choose Composition > Composition Settings or hit Cmd–K (Mac) or Ctrl–K (Windows) and:

    • Click on the Advanced tab.

    • Change Shutter Angle to 90 (This controls the strength of the motion blur effect.)

    • Click OK.

  5. In the Timeline, click on the Circulation tab to return to the parent comp.

  6. Near the top of the Timeline, click the Motion Blur button motion blur column to enable motion blur for the composition.

    enable motion blur all layers

  7. Use the Spacebar to preview the animation.

    Motion blur is a RAM intensive effect, so your preview may take noticeably longer than before.

    When you don’t need to see the motion blur, you can speed up previews by turning it off with the Motion Blur button motion blur column at the top of the timeline.

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

  9. You’re done, so choose File > Close Project.

Optional Bonus: Working with Essential Properties

Essential properties allow you to vary the properties of layers inside of nested compositions. We’ll use this feature to vary the size of the blood cells.

  1. In the Timeline, double–click on the cell 1 comp layer to open it.

    NOTE: You could double–click any cell layer (they’re instances of the same comp).

  2. In the blood cell - animation timeline, select the blood cell 1 layer.

  3. Press S to reveal Scale.

  4. Choose Window > Essential Graphics.

  5. In the Essential Graphics panel, change the Primary menu to blood cell - animated

  6. Drag the Scale property from the Timeline into the Essential Graphics panel.

    essential graphics

    NOTE: Adding any property in a comp to the Essential Graphics panel makes it an essential property, which can be controlled layer-by-layer when this comp is nested.

  7. In the Timeline, click on the Circulation tab to return to the parent comp.

    The 3 cell comp layers should now have a new Essential Properties category.

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

    NOTE: You can also double click the workspace name at the top of the application and then approve the reset.

  9. In the Timeline, click the arrow for next to Essential Properties for cell 1.

  10. Change the Essential Property Scale to 10

  11. Click on the arrow for next to Essential Properties for cell 3.

  12. Change the Essential Property Scale to 18

  13. Ctrl–click (Mac) or Right–click (Windows) on the cell 3 layer and choose Time > Time Stretch.

    • Change the Stretch Factor to 150
    • Click OK.
  14. Repeat this operation for the other two cell layers using the values here:

    • cell 2: 200
    • cell 1: 250
  15. Select the cell 3 layer.
  16. Hold Shift and click on cell 1 to select all 3 cell layers.

  17. Cmd ~ (Mac) or Ctrl ~ (Windows) to hide their visible properties.

  18. Use the Spacebar to preview the animation.

    The moving cells would look better with a little motion blur applied to them. We will do this in the next section.

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