Skip to main content
April 1, 2026Kalika Kharkar Sharma/11 min read

Superman: Simple Character Animation Using Masks

Master Character Animation with After Effects Masks

Key Animation Techniques You'll Master

Expression to Keyframe Conversion

Transform code-based animations into editable keyframes for realistic hair movement with natural delays and sequencing.

Custom Mask Creation

Use the Pen tool to create complex shapes with both straight lines and curves for precise layer control.

Pre-Composition Animation

Group multiple layers together to animate complex elements like heads with multiple parts as single units.

Topics Covered in This After Effects Tutorial:

Master the art of character animation with these essential techniques: Converting expressions to keyframes for lifelike hair movement, utilizing the Pen tool for precision custom-shaped masks, pre-composing workflows to efficiently animate multiple layers simultaneously, and creating natural eye blink effects using opacity hold keyframes. These foundational skills form the backbone of professional character animation workflows used in studios worldwide.

Exercise Preview

preview hero character animation

Exercise Overview

In this comprehensive exercise, you'll bring a cartoon superhero to life through sophisticated animation techniques that mirror industry-standard character animation workflows. You'll orchestrate multiple elements—head movement, realistic hair physics, natural eye blinks, and dynamic cape movement—to create a cohesive, believable character performance. This project will demonstrate how to leverage After Effects' powerful Pen tool for creating complex mask shapes combining curves and straight lines, while mastering the crucial skill of converting procedural expressions into editable keyframes for precise animation control.

Previewing What You'll Make in This Exercise

  1. Navigate to your exercise files: Class Files > After Effects Level 2 Class > Superman > Finished Clips and launch Cartoon-Hero.mov by double-clicking.

  2. Study the animation carefully, noting these key performance elements:

    • The character's body remains stationary while secondary animation brings life to the scene—subtle eye blinks, four individual hair spikes that respond to wind, and a cape that billows majestically. The head tilts naturally during the opening sequence.
    • Observe the naturalistic hair animation: when the leftmost spike moves down and left, the remaining spikes follow in sequence, creating the realistic physics of hair responding to air currents rather than moving in unnatural unison.
  3. Review this reference multiple times to understand the timing and flow—you'll be recreating this exact performance. Keep the video accessible for reference throughout the exercise.

Getting Started

  1. To streamline your workflow, we've prepared the initial project setup. In After Effects, navigate to File > Open Project. If another project is currently open, save it first to access the Open dialog.

  2. Locate and open the starter file: Desktop > Class Files > After Effects Level 2 Class > Superman > Cartoon Hero Started.aep.

  3. Immediately save your working version: File > Save As > Save As.

  4. Navigate to the Superman folder and name your project yourname-Cartoon Hero.aep, then click Save. This prevents any accidental overwrites of the original starter file.

  5. Open the composition timeline by double-clicking cartoonHero in the Project panel if it's not already visible at the bottom of your screen.

    All assets originate from the vector file finalLockup.ai (located in Superman > Assets), imported using "Composition – Retain Layer Sizes" to maintain optimal layer organization. This filename reflects its intended use as the concluding scene in a larger animated sequence we'll develop later in the course.

    For comprehensive guidance on Illustrator import options and when to deviate from the standard "Composition – Retain Layer Sizes" setting, reference: tinyurl.com/prep-ai-for-ae. Understanding these import decisions is crucial for efficient Illustrator to After Effects workflows.

  6. Activate the transparency grid by clicking the Toggle Transparency Grid button transparency grid icon at the bottom center of the Composition panel until it highlights in blue. This reveals the composition's transparent background—essential for compositing this character into various scenes later.

Project Setup Process

1

Open Project File

Navigate to the Superman folder and open Cartoon Hero Started.aep from the class files directory.

2

Save Your Version

Use Save As to create your personal copy with the naming convention yourname-Cartoon Hero.aep.

3

Enable Transparency

Click the Toggle Transparency Grid button to reveal the transparent background of your composition.

Converting an Expression to Keyframes for Realistic Hair Animation

Now we'll create the foundation of naturalistic hair movement by using After Effects' procedural animation capabilities, then converting them to editable keyframes for precise timing control.

  1. Set your magnification to 400% using the dropdown menu at the bottom left of the Composition panel for detailed work on the hair elements.

  2. Focus on the hair region by pressing Spacebar to temporarily activate the Hand tool hand tool, then drag the composition view to center the hair spikes.

  3. Select the hair4 layer in the Timeline to begin with the rightmost hair spike.

  4. Isolate this element by clicking the Solo switch solo switch next to hair4, allowing you to work without visual distractions.

  5. Relocate the anchor point for natural rotation. Select the Pan Behind (Anchor Point) tool pan behind anchor point tool from the Tools panel. The anchor point determines the pivot point for all transformations—positioning it at the hair's base creates realistic movement.

  6. Precisely move the anchor point anchor point to the bottom center of the hair spike, as shown:

    hair anchor point

  7. Repeat this anchor point adjustment for hair3, hair2, and hair1. For each layer: select it, enable Solo for clear visibility, then reposition the anchor point to the base. This methodical approach ensures consistent rotation behavior across all hair elements. When complete, disable Solo on all layers.

  8. With hair4 selected, press R to reveal the Rotation property—this will be our primary animation parameter.

  9. Ensure your playhead is at 0;00, then Option-click (Mac) or Alt-click (Windows) the stopwatch stopwatch beside Rotation. This creates an expression—a powerful code-based animation system that generates movement algorithmically.

    add expression

    Anchor Point Positioning

    Moving the anchor point to the base of each hair spike ensures natural rotation from the root, creating more realistic animation movement.

    Hair Animation Setup Process

    1

    Position Anchor Points

    Use the Pan Behind tool to move each hair layer's anchor point to the base for natural rotation.

    2

    Add Wiggle Expression

    Apply wiggle(3,20) expression for 3 wiggles per second with 20 degree maximum movement.

    3

    Convert to Keyframes

    Use Keyframe Assistant to convert the expression into physical keyframes for manual control.

    4

    Create Sequential Timing

    Paste keyframes at offset timecodes to create natural hair movement delays.

Expressions: Code-Based Animation

Expressions represent one of After Effects' most powerful features for creating sophisticated animation without manual keyframing. They excel in two primary scenarios: generating complex motion that would be prohibitively time-consuming to keyframe manually, and creating dynamic relationships between properties where changes to one element automatically influence others. While expressions may seem intimidating initially, After Effects provides extensive tools and presets to help you harness their power, and mastering even basic expressions dramatically expands your animation capabilities.

  • Replace the default expression text with wiggle(3,20) in the expression field.

    This expression instructs the hair to wiggle randomly 3 times per second with a maximum deviation of 20° in either direction. The wiggle expression is fundamental for creating organic, wind-blown effects that would be nearly impossible to achieve convincingly through manual keyframing.

  • Click in any gray area of the Timeline to confirm the expression and see it take effect.

  • Press Spacebar to preview the animation. Notice how the hair moves with convincing randomness, simulating natural wind interaction.

    While effective for individual elements, wiggle expressions present a challenge for multiple related objects. Simply copying this expression to other hair layers would generate independent random values for each, creating unrealistic movement where hair spikes move without any relationship to each other. Conversely, parenting all layers to hair4 would make them rotate in perfect unison around hair4's anchor point—equally unnatural for hair physics.

  • To achieve realistic sequential hair movement, we'll convert the expression to discrete keyframes that can be offset in time. Execute this conversion:

    • Click on the word Rotation in the Timeline to select the property.
    • Navigate to Animation > Keyframe Assistant > Convert Expression to Keyframes. This powerful command translates the procedural animation into editable keyframes keyframe round.

    After Effects generates one circular keyframe per frame (appearing as a continuous bar in the Timeline). The circular shape indicates smooth interpolation between keyframes, maintaining the fluid motion of the original expression.

  • Copy the complete keyframe set by ensuring Rotation is selected and pressing Cmd-C (Mac) or Ctrl-C (Windows).

    Our goal is to create a natural cascade effect where the leftmost hair spike initiates movement, with each subsequent spike following with a subtle delay—mimicking how wind affects hair in reality.

  • Navigate to -0;02 by clicking the timecode display and entering -2, then pressing Return/Enter. This positions the playhead 2 frames before the composition start, which is why the Composition panel appears black.

  • Select hair3 and paste the keyframes with Cmd-V (Mac) or Ctrl-V (Windows).

  • Verify the keyframe transfer by pressing U to show all modified properties. The keyframes should now appear on hair3.

  • Continue pasting keyframes to the remaining hair layers at these specific timecodes (navigate backward using Cmd-Left Arrow twice on Mac or Page Up twice on Windows):

    hair2: -0;04
    hair1: -0;06
  • Return to a full composition view by setting the magnification to Fit.

  • Preview the complete hair animation by pressing Spacebar. You should observe hair1 (leftmost) initiating the movement, followed by each subsequent spike in natural succession—creating convincing hair physics that responds to environmental wind patterns.

  • Expressions really shine when you either want to add a complex animation that would be too tedious to keyframe, or want to dynamically link two or more properties so they influence each other in some way.
    Understanding when to use expressions versus traditional keyframes in After Effects animation workflow.

    Using the Pen Tool to Create Custom-Shaped Masks

    With the hair animation complete, we'll now tackle the cape animation. To achieve realistic cape billowing while maintaining the connection to the character's jumpsuit, we'll use precise masking techniques to isolate different sections for independent animation.

    1. Disable the Continuously Rasterize switch continuously rasterize switch on the cape layer. This vector scaling option must be turned off to enable Layer panel editing—a requirement for mask creation on imported Illustrator artwork.

    2. Double-click the cape layer to open it in the dedicated Layer panel, which appears in the center workspace.

    3. Analyze the cape's geometry in the Layer panel. Notice the combination of straight edges and curved sections—this complex shape requires the versatility of the Pen tool rather than simple geometric shape tools like rectangles or ellipses.

    4. Select the Pen tool pen tool from the Tools panel. This industry-standard vector drawing tool enables precise path creation with both straight segments and smooth curves.

    5. Begin creating your first mask path by establishing the initial vertices. Each point in the path is called a vertex, and the complete connected series forms the path:

      • Place your first vertex with a single click on the left red edge of the cape, approximately where it begins to widen.
      • Create a curved segment for the second vertex using a click-and-drag motion: click and hold on the cape's center stripe, then drag rightward while holding down the mouse. Release when the curve matches the reference image.
      • If you make an error, use Edit > Undo repeatedly and restart—precision in initial vertex placement saves time in later adjustments.

      cape top mask start

    6. Complete the upper mask with straight line segments by clicking additional vertices. Since this cape section will be obscured by the character's torso, perfect precision isn't critical:

      • Click on the cape's right red edge, roughly aligned with your first vertex.
      • Add vertices at the upper right and upper left corners of the cape.
      • Close the path by clicking your starting vertex—a small circle icon pen close path confirms path completion.

      cape top mask path

      Continuously Rasterize Setting

      Turn off Continuously Rasterize on the cape layer before creating masks, or you won't be able to open it in the Layer panel for mask editing.

      Pen Tool Techniques

      Straight Lines

      Single clicks create vertices connected by straight line segments for sharp edges and geometric shapes.

      Curved Lines

      Click and drag in one motion creates curved segments with adjustable handlebars for smooth, organic shapes.

    Repositioning Vertices & Adjusting Curves

    The Pen tool offers immediate editing capabilities: click any vertex to activate the selection cursor adjust cursor, enabling repositioning through dragging or arrow key nudging. For multiple vertex selection, Shift-click additional points after selecting the first. Curved segments can be refined by dragging the curve handlebars (small dots extending from curved vertices) to adjust the arc's intensity and direction. These real-time editing capabilities make the Pen tool invaluable for achieving precise mask shapes that conform perfectly to your animated elements.

  • If your mask completely obscures the cape, disable Render in the bottom right of the Layer panel (expand the panel rightward if this option isn't visible). This allows you to see both the mask and the underlying artwork simultaneously.

  • Create the second mask for the cape's lower section. Begin with a curved vertex by clicking and holding in the center of your first mask, then dragging rightward to establish the curve handle:

    cape bottom mask start

  • Complete the lower cape mask following the reference image. Note that the third vertex requires a click-and-drag motion to create the curved segment. Focus on including the entire lower cape section rather than achieving pixel-perfect accuracy:

    cape bottom mask path

    Fine-tune any vertices now using the Pen tool techniques described in the earlier sidebar.

  • Return to the Composition view by closing the Layer panel tab (click the X next to the layer name).

  • Separate the overlapping masks onto individual layers for independent animation control. Select the cape layer in the Timeline.

  • Duplicate the layer using Cmd-D (Mac) or Ctrl-D (Windows), creating two identical cape layers.

  • Select both cape layers by clicking cape 2, then Shift-clicking the original cape layer.

  • Press M to reveal all Mask properties for both selected layers simultaneously.

  • Configure the upper cape layer:

    • Select the cape 2 layer and press Return/Enter to enable renaming.
    • Rename to top cape and confirm with Return/Enter.
    • Delete the unwanted lower mask by selecting Mask 2 and pressing Delete.
  • Configure the lower cape layer:

    • Select the cape layer and rename it to bottom cape using the same Return/Enter process.
    • Remove Mask 1 by selecting it and pressing Delete, leaving only the lower mask active.
  • Mask Editing Checklist

    0/4

    Warping the Bottom Part of the Cape Using an Effect

    Now we'll apply dynamic wave distortion to the bottom cape section, creating the illusion of fabric responding to wind currents while the upper section remains anchored to the character.

    1. Select the bottom cape layer in the Timeline to prepare it for effect application.

    2. Apply the wave distortion: Effect > Distort > Wave Warp. This effect simulates natural fabric movement by creating sine wave-based distortions.

    3. In the Effect Controls panel (appearing on the left), configure these specific settings for realistic cape movement:

      Wave Width: 100 (creates longer, more realistic wave patterns)
      Direction: 0x+177°
      Pinning: Top Edge (prevents the upper edge from moving, maintaining connection to the jumpsuit)

    Wave Warp Settings for Realistic Cape Motion

    Wave Width: 100

    Creates longer, more realistic wave patterns that mimic natural fabric movement in wind.

    Direction: 0x +177°

    Sets the wave direction to create natural horizontal billowing motion for the cape.

    Pinning: Top Edge

    Keeps the top of the cape stationary while allowing the bottom to wave naturally.

    Fixing Edge Cutoff Issues

    Enable Continuously Rasterize on the bottom cape layer to prevent the wave effect from cutting off the cape's edges during animation.

    Key Takeaways

    1Convert expressions to keyframes using Keyframe Assistant to gain manual control over complex animations while maintaining the original motion quality
    2Position anchor points strategically at the base of elements like hair and chin to create natural rotation and movement origins
    3Use offset timing when copying keyframes to different layers to create realistic sequential movement, such as hair spikes moving in delayed succession
    4The Pen tool creates custom masks by combining straight line clicks with click-and-drag curved segments for complex shape control
    5Pre-composing multiple related layers allows you to animate complex elements like heads as single units while preserving individual layer animations
    6Hold keyframes create instant value changes without transitions, essential for cartoon-style animations like eye blinks
    7Wave Warp effect with top edge pinning creates realistic fabric movement while keeping attachment points stationary
    8Toggle Continuously Rasterize based on workflow needs - off for mask editing, on to prevent edge clipping with effects

    RELATED ARTICLES