Using the Graph Editor to remap time – Animating Layers

When remapping time, you can use the values in the time-remap graph to determine and control which frame of the movie plays at which point in time. Each Time Remap keyframe has a time value associated with it that corresponds to a specific frame in the layer; this value is represented vertically on the time-remap graph. When you enable time remapping for a layer, After Effects adds a Time Remap keyframe at the start and end points of the layer. These initial Time Remap keyframes have vertical time values equal to their horizontal positions.

By setting additional Time Remap keyframes, you can create complex motion effects. Every time you add a Time Remap keyframe, you create another point at which you can change the playback speed or direction. As you move the keyframe up or down in the time-remap graph, you adjust which frame of the video is set to play at the current time.

You’ll have some fun with the timing of this project.

Tip

Watch the Info panel as you drag to see more information as you adjust the keyframe.

  1. Select the Selection tool in the Tools panel.
  2. In the Timeline panel, go to 3:00.
  3. In the time-remap graph, Ctrl-click (Windows) or Command-click (macOS) the line at 3:00 to create a new keyframe.
  1. Drag the new keyframe down to 0 seconds.
  1. Go to 0:00, and then press the spacebar to preview the results. Watch the time ruler and Source Time ruler in the Layer panel to see which frames are playing at any given point in time.
    The animation progresses rapidly over the first two seconds of the composition, and then plays in reverse for a second, and the lights go out. The entire animation plays again.
  2. Press the spacebar to stop the preview.
    Having fun yet? Keep going. You’ll adjust the timing so that the lights blink twice before coming on permanently.
  3. Drag the keyframe from 2:00 to 1:00, so that the lights come on in the first second. Then move the next keyframe to 2:00, so that the lights blink off.

Shifting the keyframe affects the timing for the rest of the clip as well. Currently, it’s set to play the 10-second point in the composition at ten seconds, so the angle of speed adjusts accordingly.
You’ll set the lights to blink one more time before continuing the animation. Notice how the angle for the rest of the animation changes as a result; it becomes steeper because there is more animation to cover in less time.

  1. Ctrl-click (Windows) or Command-click (macOS) the line to create additional keyframes at 3:00 and 4:00, moving them to the 4-second and 0-second marks, respectively, so that the lights blink on and off again before the animation begins to play in full.
    Tip
    You can scale the entire animation in time: Click the Time Remap property name to select all of its keyframes, so that you see a free-transform selection box. Then resize the selection box.
  1. Press the spacebar to preview the animation, and press it again to stop it.
    The lights blink on and off, but the text scrolls across the ticker too quickly. You’ll adjust the timing so that it moves more slowly, even though it means the entire text won’t appear before the end of the clip.
  2. Go to 10:00. Then enter 7:00 for the Time Remap value.
  1. Press the Home key or move the current-time indicator to the beginning of the time ruler, and then press the spacebar to preview the animation. Press the spacebar again when you’re done.
    The clip plays for ten seconds, but it ends at the 7-second point in the composition. Now the text moves more slowly—and much more realistically—across the ticker.
  2. Choose File > Save to save your work so far.

Remapping time – Animating Layers

You’re ready to manipulate the speed and direction of time in your project.

  1. With the Pre-comp 1 layer selected in the Timeline panel, choose Layer > Time > Enable Time Remapping.

After Effects adds two keyframes, at the first and last frames of the layer, visible in the time ruler. A Time Remap property also appears under the layer name in the Timeline panel; this property lets you control which frame is displayed at a given point in time.

  1. With the Pre-comp 1 layer active, choose Layer > Open Layer to open it in the Layer panel.

The Layer panel provides a visual reference of the frames you change when you remap time. It displays two time rulers: The time ruler at the bottom of the panel displays the current time. The Source Time ruler, just above the time ruler, has a remap-time marker that indicates which frame is playing at the current time.

  1. Press the spacebar to preview the layer, and notice that the source-time and current-time markers in the two Layer panel rulers are synchronized. That will change as you remap time.
    Over the first four seconds, the lights come on slowly. You’ll speed that section up so that the lights come on twice as fast.
  2. Go to 2:00, and change the Time Remap value to 4:00.
    This remaps time so that frame 4:00 plays at 2:00. In other words, the clip now plays back at twice the speed for the first two seconds of the composition.
  1. Press the spacebar to preview the animation. The composition now runs at double-speed until 2:00, and at a slower speed thereafter. Press the spacebar again when you have finished previewing the animation.

Viewing time remapping in the Graph Editor
Using the Graph Editor, you can view and manipulate all aspects of effects and animations, including effect property values, keyframes, and interpolation. The Graph Editor displays changes in effects and animations as a two-dimensional graph, with playback time represented horizontally (from left to right). In layer bar mode, in contrast, the time ruler represents only the horizontal time element, without a graphical display of changing values.

  1. Make sure the Time Remap property is selected for the Pre-comp 1 layer in the Timeline panel.
  2. Click the Graph Editor button ( ) to display the Graph Editor.

The Graph Editor displays a time-remap graph that shows a white line connecting the keyframes at 0:00, 2:00, and 10:00. The angle of the line is steep up to 2:00, and then becomes shallower. The steeper the line, the faster the playback time.

Viewing render times for layers – Animating Layers

In a complex project, it can be helpful to know which components are contributing to long render times. For example, you may find it helpful to turn off some layers or specific effects while you work on other aspects of your project.

You can see the overall render time for the current frame at the bottom of the Timeline panel. When you turn on the Composition Profiler, you can see the rendering time of each layer, effect, mask, and layer style in the current frame in the Render Time column.

  1. Click the snail icon (Snail icon) at the bottom of the Timeline panel.

The Render Time column appears in the Timeline panel, displaying the render time for each layer active in the current frame.

  1. Drag the current-time indicator across the time ruler to see how render times differ for each layer on different frames.
  2. Expand the Starburst layer. Notice that the layer styles that were applied in Photoshop increase the render time.
  1. Hide layer properties. Click the snail icon again to turn off the Composition profiler, or leave it on if you want to see how rendering times are affected by changes you make to layers.

Retiming the composition
So far, you have created a straightforward time-lapse simulation. That’s fine, but After Effects offers more ways to play with time using the time-remapping feature. Time remapping lets you dynamically speed up, slow down, stop, or reverse footage.
Tip
You can get even finer control with the Timewarp effect, which you’ll use in Lesson 14, “Advanced Editing Techniques.”
You can also use it to do things like create a freeze-frame result. The Graph Editor and the Layer panel are a big help when remapping time, as you’ll see in the following exercise, when you retime the project so that the time-lapse speed changes over the course of the movie.

Precomposing layers
For this exercise, you’ll duplicate the composition and then precompose the layers, which will be easier to remap than the original.

  1. Select the marquee composition in the Project panel, and choose Edit > Duplicate.
    A marquee 2 composition appears in the Project panel.
  2. Double-click the marquee 2 composition to open it in the Composition and Timeline panels.
  1. In the marquee 2 Timeline panel, select the Starburst layer and then Shift-select the Unlit marquee layer, so that all the layers are selected.
  2. Choose Layer > Pre-compose.
  3. In the Pre-compose dialog box, make sure Move All Attributes Into The New Composition is selected, and then click OK.

After Effects creates a new composition named Pre-comp 1, which replaces the layers you selected in the marquee 2 composition. Now you can remap all of the elements of the project at once.

Simulating a darkening sky – Animating Layers

The lights come on, but the sky and building remain in daylight. The background should darken as the marquee lights up, showing off the marquee contents and creating a sense of excitement. You’ll use a mask, a solid layer, and a blending mode to provide the contrast.

Creating a mask
You want darkness to fall on the building and sky behind the theater sign. You’ll duplicate the layer, and then create a mask to isolate the area you want to darken.

  1. Press the Home key or move the current-time indicator to the beginning of the time ruler.
  2. In the Timeline panel, select the Lit marquee layer.
  3. Choose Edit > Duplicate. After Effects adds a Lit marquee 2 layer to the layer stack, immediately above the Lit marquee layer.
  4. Select the Pen tool ( ) in the Tools panel.
  5. With the Lit marquee 2 layer selected in the Timeline panel, click the upper left corner of the marquee to start drawing.
  1. Click additional points to continue the mask around the left edge of the marquee, the left and upper edge of the background, and the theatre sign, as in the image below. You’ll need to create some points of the mask on the pasteboard outside the image.
  1. Continue around the theatre sign, and then click your starting point again to close the mask.

Adding a solid layer

Now that you’ve masked the background, you’ll add the layer that will affect it, and then animate the opacity of that layer.

  1. Select the Lit marquee layer in the Timeline panel.
  2. Choose Layer > New > Solid.
  3. In the Solid Settings dialog box, make sure a dark gray color is selected, click Make Comp Size, and then click OK. After Effects adds a layer named Dark Gray Solid 1 between the Lit marquee and Lit marquee 2 layers.

With the current-time indicator at the beginning of the time ruler, most of the image will darken, because neither the Lit marquee layer nor the Lit marquee 2 layer (with its mask) are visible yet. Don’t worry; you’ll animate the solid layer’s opacity to account for that.

  1. Select the Lit marquee 2 layer, and press M if the Mask property isn’t already displayed.
  2. Choose Darken from the Mask Mode menu, and select Inverted.
    You drew around the background, but that’s the area you want to remain unmasked. When you invert the mask, the unselected area becomes masked instead.
  1. Select the Dark Gray Solid layer. Make sure the current-time indicator is at the beginning of the time ruler (0:00). Then, change the Opacity value to 0% in the Properties panel, and click the stopwatch icon ( ) to create an initial keyframe.
  1. Go to 1:23, and change the Opacity to 5%.
  2. Go to 4:09, and click the Add Or Remove Keyframe button to create an additional keyframe with Opacity at 5%.

9. Go to 7:00, and change the Opacity to 75%.

  1. Press the Home key or move the current-time indicator to the beginning of the time ruler. Press the spacebar to preview the animation. When you’re done, press the spacebar again.

As the lights brighten and the text begins to move, the surrounding building and sky gradually darken. Your scene is complete.

  1. Hide the properties for all layers, and save your work.

Adding motion blur – Animating Layers

The text’s movement will look more authentic if it includes motion blur. You’ll add the motion blur and then set the shutter angle and phase, which control the intensity of the blur.

  1. Go to 8:00, so you can see the scrolling text well.
  2. Click Toggle Switches/Modes at the bottom of the Timeline panel.
  3. Click the Motion Blur ( ) switch for the Scroll text layer.
    After Effects enables Motion Blur for the entire composition, and the text layer appears less sharp in the Composition panel.
  4. Choose Composition > Composition Settings.
  5. In the Composition Settings dialog box, click the Advanced tab, and reduce the Shutter Angle to 90 degrees.
    The Shutter Angle setting imitates the effect of adjusting a shutter angle on a real camera, which controls how long the camera aperture is open, gathering light. Larger values create more motion blur.
  6. Change the Shutter Phase to 0 degrees, and then click OK.

Animating using the Corner Pin effect

The marquee is looking pretty good, but the starburst isn’t terribly noticeable. You’ll use the Corner Pin effect to distort it over time and draw attention to it.

Using the Corner Pin effect is similar to animating with the Free Transform tool in Photoshop—the effect distorts an image by repositioning each of its four corners. You can use it to stretch, shrink, skew, or twist an image, or to simulate perspective or movement that pivots from the edge of a layer, such as a door opening.

  1. Go to 4:00.
  2. In the Timeline panel, click the Solo switch (Solo switch icon) for both the Show title and Starburst layers.

Soloing the layers isolates them to speed animating, previewing, and rendering.

  1. Select the Starburst layer in the Timeline panel, and then choose Effect > Distort > Corner Pin. Small circles appear around the corner points of the Starburst layer in the Composition panel.
    Note
    If you don’t see the controls, choose View Options from the Composition panel menu. In the View Options dialog box, select the Handles and Effect Controls options, and then click OK.
    You’ll start by creating initial keyframes at their current locations.
  2. If the Effect Controls panel isn’t already open, choose Window > Effect Controls.
  3. In the Effect Controls panel, click the stopwatch icon ( ) next to each of the pins—Upper Left, Upper Right, Lower Left, and Lower Right—to set initial keyframes.
  1. Go to 6:00, and then drag each of the four corner-pin handles outward. With the Corner Pin tool, you can move each handle a different amount. Notice that the x and y coordinates update in the Effect Controls panel. After Effects adds keyframes.
    Instead of dragging the handles, you can manually enter the values shown in the following figure.
  1. Go to 8:00, and then drag the corner-pin handles so that the text is tilted at an angle. Your corner-pin locations should be similar to those in the figure below. After Effects adds keyframes.
  1. Click the Solo switches ( ) for the Show title and Starburst layers to restore the view of the other layers.
  2. Press the Home key or move the current-time indicator to the beginning of the time ruler. Press the spacebar to preview the entire animation, including the corner-pin effect. When you’re done, press the spacebar again.

10. Choose File > Save to save your project.

Creating the track matte – Animating Layers

The text scrolls well, but it overlaps the rest of the marquee, and even the lights on the left side. You’ll use a track matte to confine the text to the black ticker field. You’ll use the alpha channel of the Scroll area layer for the track matte.

  1. Click Toggle Switches/Modes at the bottom of the Timeline panel to display the Track Matte column, so you can apply the track matte.
  2. Select the Scroll text layer, and choose “3. Scroll area” from the Track Matte pop-up menu.

The alpha channel of the layer you selected (Scroll area) is used to set transparency for the Scroll text layer, so the contents of that layer appear only within the matte defined by the Scroll area layer. The video switch is automatically deselected for the Scroll area layer when you apply the track matte.
With the Scroll area layer deselected there are light artifacts at the top of the text area. You’ll make the layer visible to hide those lights without compromising the track matte.

  1. Click the eye icon ( ) for the Scroll area layer in the Timeline panel.
  2. Deselect all layers, and hide all layer properties.
  3. Press the Home key or move the current-time indicator to the beginning of the time ruler, and then press the spacebar to preview the animation. Press the spacebar again when you’re done.
  1. Choose File > Save to save your project.

About track mattes and traveling mattes
When you want one layer to show through a hole in another layer, set up a track matte. You’ll need two layers—one to act as a matte, the other to fill the hole in the matte. You can animate either the track matte layer or the fill layer. When you animate the track matte layer, you create a traveling matte. If you want to animate the track matte and fill layers using identical settings, you can precompose them.


You define transparency in a track matte using values from either its alpha channel or the luminance of its pixels. Using luminance is handy when you want to create a track matte from a layer without an alpha channel, or a layer imported from a program that can’t create an alpha channel. In both alpha-channel mattes and luminance mattes, pixels with higher values are more transparent. In most cases, you use a high-contrast matte so that areas are either completely transparent or completely opaque. Intermediate shades should appear only where you want partial or gradual transparency, such as along a soft edge.
By default, After Effects uses alpha channel values to create a track matte. To use the luminance values instead, click the circle icon ( ) next to the Track Matte column to change it to the sun icon ( ). To invert the matte, click the empty square so that it displays the inverted icon ( ).

Anatomy of a traveling matte

A. Track matte layer: A solid with a rectangular mask, set to Luma Matte. The mask is animated to travel across the screen.

B. Fill layer: A solid with a pattern effect.

C. Result: The pattern is seen in the track matte’s shape and added to the image layer, which is below the track matte layer.

About expressions – Animating Layers

When you want to create and link complex animations, such as multiple car wheels spinning, but want to avoid creating tens or hundreds of keyframes by hand, you can use expressions instead. With expressions, you can create relationships between layer properties and use one property’s keyframes to dynamically animate another layer. For example, if you set rotation keyframes for a layer and then apply the Drop Shadow effect, you can use an expression to link the Rotation property’s values with the Drop Shadow effect’s Direction values; that way, the drop shadow changes with the layer as it rotates.

You work with expressions in the Timeline panel or the Effect Controls panel. You can use the pick whip to create expressions, or you can enter and edit expressions manually in the expression field—a text field in the time graph under the property.

Expressions are based on the JavaScript language, but you don’t need to know JavaScript to use them. You can create expressions using the pick whip, by using simple examples and modifying them to suit your needs, or by chaining objects and methods together.

For more information about expressions, see After Effects Help.

Using a track matte to confine animation

Text should scroll across the bottom of the marquee, but only in the black field. You’ll animate the text, and then create a track matte to confine it to the designated area, so that it appears to be an electronic ticker.

Animating the text

The text should start scrolling after the marquee lights up, and it should continue scrolling until the end of the clip.

  1. In the Timeline panel, select the Scroll text layer.
  2. Go to 4:10.
  3. Press Alt+[ (Windows) or Option+[ (macOS) to set the In point to 4:10.

The text will appear on screen at 4:10, shortly after the marquee is fully lit.

  1. With the Scroll text layer selected, change the Position property in the Properties panel to 4994, 1106.
    Only the first character of the text appears in the black ticker area.
  2. Click the stopwatch icon ( ) to create an initial keyframe.
  1. Go to 9:29, the last frame in the clip.
  2. Change the Position property to 462, 2121.

After Effects creates a keyframe. The last character in the text is visible in the ticker field.

  1. Press the spacebar to preview the scrolling text. Press the spacebar again to end the preview.

Duplicating an animation using the pick whip – Animating Layers

The Starburst layer includes the Bevel And Emboss layer style from Photoshop. You’ll animate the bevel, which makes the starburst appear backlit, so that it lights up as the marquee does.

To do this, you’ll use the pick whip to duplicate the animation you just created. You can use the pick whip to create expressions that link the values of one property or effect to another. In this case, you’ll link the opacity of the Lit marquee layer to the Depth property of the Bevel And Emboss effect in the Starburst layer.

  1. Press the Home key or move the current-time indicator to the beginning of the time ruler.
  2. Expand the Starburst layer, and then expand its Layer Styles > Bevel And Emboss properties.
  1. If necessary, enlarge the Timeline panel so that you can see both the Lit marquee and Starburst properties.
  2. Make sure the Opacity property is still visible for the Lit marquee layer.
  3. Click the pick whip icon ( ) for the Depth property in the Starburst layer, and drag it to the Opacity property name for the Lit marquee layer. When you release the mouse, the pick whip snaps, and the Depth property value is red.
  1. Expand the Depth property for the Starburst layer. An expression in the Starburst layer time ruler now reads “thisComp.layer(“Lit marquee”).transform.opacity.” This means that the Opacity value for the Lit marquee layer replaces the previous Depth value (105%) for the Starburst layer.
  1. Drag the current-time indicator from 0:00 to 4:00. Notice that the Opacity value for the Lit marquee layer and the Depth property for the Starburst layer increase simultaneously. The area around the starburst and the marquee light bulbs brighten in sync.
  1. Hide the properties for all layers to keep the Timeline panel tidy. If you enlarged the Timeline panel, return it to its original size.
  2. Choose File > Save to save your project.

About Photoshop layer styles

Adobe Photoshop provides a variety of layer styles—such as shadows, glows, and bevels—that change the appearance of a layer. After Effects can preserve these layer styles when you import Photoshop layers. You can also apply layer styles in After Effects.

Though layer styles are referred to as effects in Photoshop, they behave more like blending modes in After Effects. Layer styles follow transformations in the standard render order, whereas effects precede transformations. Another difference is that each layer style blends directly with the underlying layers in the composition, whereas an effect is rendered on the layer to which it’s applied, the result of which then interacts with the underlying layers as a whole.

The layer style properties are available for the layer in the Timeline panel.

To learn more about working with layer styles in After Effects, see After Effects Help.

Creating the composition – Animating Layers

For this lesson, you’ll use the imported Photoshop file as the basis of the composition.

  1. Double-click the marquee composition in the Project panel to open it in the Composition panel and in the Timeline panel.

Note
If you don’t see the full image, choose Fit from the Magnification Ratio pop-up menu in the Composition window.

  1. Choose Composition > Composition Settings.
  2. In the Composition Settings dialog box, change the Duration to 10:00 to make the composition 10 seconds long if it isn’t already, and then click OK.

Simulating lighting changes

The first part of the animation involves lighting the marquee. You’ll use Opacity keyframes to animate the light.

  1. Go to 4:00.

Currently, the lit background is on top of the regular (unlit) background, obscuring it so the initial frame of the animation is bright. However, you want the marquee to appear dark and then lighten. To accomplish this, you will make the Lit marquee layer initially transparent, and then animate its opacity so that the lights appear to turn on over time.

  1. Select the Lit marquee layer in the Timeline panel, and click the stopwatch icon ( ) next to the Opacity value in the Properties panel to create a keyframe. Note that the Opacity value is 100%.
  1. Press the Home key or drag the current-time indicator to 0:00. Then change the Opacity to 0%. After Effects adds a keyframe.

Now, when the animation begins, the Lit marquee layer is transparent, which allows the Unlit marquee layer to show through.

  1. Click the Play/Pause button ( ) in the Preview panel, or press the spacebar, to preview the animation.

The bulbs around the marquee transition until they are brightly lit.

  1. Press the spacebar to stop playback at any time after 4:00.
  2. Choose File > Save.