Animating Layers - Adobe After Effects CC Classroom in a Book (2017 release) (2017)

Adobe After Effects CC Classroom in a Book (2017 release) (2017)

6. Animating Layers


Lesson overview

In this lesson, you’ll learn how to do the following:

• Animate a layered Adobe Photoshop file.

• Duplicate an animation using the pick whip.

• Work with imported Photoshop layer styles.

• Apply a track matte to control the visibility of layers.

• Animate a layer using the Corner Pin effect.

• Apply the Lens Flare effect to a solid layer.

• Use time remapping and the Layer panel to dynamically retime footage.

• Edit Time Remap keyframes in the Graph Editor.

Image

This lesson will take approximately an hour to complete. Download the project files for this lesson, following the instructions in the Getting Started section under “Accessing the lesson files and Web Edition,” if you haven’t already done so. As you work on this lesson, you’ll preserve the start files. If you need to restore the start files, download them from your Account page.


Image

PROJECT: SUNRISE EFFECT IN A FILM SHORT

Animation is all about making changes over time—changes to an object or image’s position, opacity, scale, and other properties. This lesson provides more practice animating the layers of a Photoshop file, including dynamically remapping time.

Getting started

Adobe After Effects provides several tools and effects that let you simulate motion video using a layered Photoshop file. In this lesson, you will import a layered Photoshop file of the sun appearing through a window, and then animate it to simulate the motion of the sun rising behind the panes of glass. This is a stylized animation in which the motion is first accelerated, and then slows down as clouds and birds move through the window frame at the end.

First, you’ll preview the final movie and set up the project.

1. Make sure the following files are in the Lessons/Lesson06 folder on your hard disk, or download them from your Account page at www.peachpit.com now:

• In the Assets folder: clock.mov, sunrise.psd

• In the Sample_Movies folder: Lesson06_regular.avi, Lesson06_regular.mov, Lesson06_retimed.avi, Lesson06_retimed.mov

2. Open and play the Lesson06_regular.avi file in Windows Media Player or the Lesson06_regular.mov file in QuickTime Player to see the straightforward time-lapse animation you will create in this lesson.

3. Open and play the Lesson06_retimed.avi file or Lesson06_retimed.mov file to see the same animation after time has been remapped, later in the lesson.

4. When you’re done, quit Windows Media Player or QuickTime Player. You may delete the sample movies from your hard disk if you have limited storage space.

When you begin the lesson, restore the default application settings for After Effects. See “Restoring default preferences” on page 2.

5. Start After Effects, and then immediately hold down Ctrl+Alt+Shift (Windows) or Command+Option+Shift (Mac OS) to restore default preferences settings. When prompted, click OK to delete your preferences file. Then, close the Start window.

After Effects opens to display an empty, untitled project.

6. Choose File > Save As > Save As.

7. In the Save As dialog box, navigate to the Lessons/Lesson06/Finished_Project folder.

8. Name the project Lesson06_Finished.aep, and then click Save.

Importing the footage

You need to import one source item for this lesson.

1. Double-click an empty area of the Project panel to open the Import File dialog box.

2. Navigate to the Lessons/Lesson06/Assets folder on your hard disk, and select the sunrise.psd file.

3. Choose Composition – Retain Layer Sizes from the Import As menu, so the dimensions of each layer will match the layer’s content. (In Mac OS, you may need to click Options to see the Import As menu.)

4. Click Import or Open.

5. In the Sunrise.psd dialog box, make sure Composition – Retain Layer Sizes is selected in the Import Kind menu, and click OK.

Before continuing, take a moment to study the layers of the file you just imported.

6. In the Project panel, expand the sunrise Layers folder to see the Photoshop layers. Resize the Name column to make it wider and easier to read, if necessary.

Image

Each of the elements you’ll animate in After Effects—the shadows, birds, clouds, and sun—is on a separate layer. In addition, there is one layer representing the initial, predawn lighting conditions in the room (Background), and a second layer that represents the final, bright daylight conditions in the room (Background Lit). Similarly, there are two layers for the two lighting conditions outside the window: Window and Window Lit. The Window Pane layer includes a Photoshop layer style that simulates a pane of glass.

After Effects preserves the layer order, transparency data, and layer styles from the source Photoshop document. It also preserves other features, such as adjustment layers and type, which you don’t happen to be using in this project.


Preparing layered Photoshop files

Before you import a layered Photoshop file, name its layers carefully to reduce preview and rendering time, and to avoid problems importing and updating the layers:

• Organize and name layers. If you change a layer name in a Photoshop file after you have imported the file into After Effects, After Effects retains the link to the original layer. However, if you delete an imported layer in Photoshop, After Effects will be unable to find the original layer and will list it as missing in the Project panel.

• To avoid confusion, make sure that each layer has a unique name.


Creating the composition

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

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

Image

2. Choose Composition > Composition Settings.

3. In the Composition Settings dialog box, change the Duration to 10:00 to make the composition 10 seconds long, and then click OK.

Image


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.


Simulating lighting changes

The first part of the animation involves lightening the dark room. You’ll use Opacity keyframes to animate the light.

1. In the Timeline panel, click the Solo switch (Image) for both the Background Lit and Background layers.

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

Image

Currently, the lit background is on top of the regular (darker) background, obscuring it and making the initial frame of the animation light. However, you want the animation to start dark, and then lighten. To accomplish this, you will make the Background Lit layer initially transparent, and then animate its opacity so that it appears to lighten the background over time.

2. Go to 5:00.

3. Select the Background Lit layer in the Timeline panel, and press T to reveal its Opacity property.

4. Click the stopwatch icon (Image) to set an Opacity keyframe. Note that the Opacity value is 100%.

Image

5. Press the Home key, or drag the current-time indicator to 0:00. Then set the Opacity for the Background Lit layer to 0%. After Effects adds a keyframe.

Image

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

6. Click the Solo switches (Image) for the Background Lit and Background layers to restore the view of the other layers, including Window and Window Lit. Make sure to leave the Opacity property for the Background Lit layer visible.

7. Expand the Window Pane layer’s Transform properties. The Window Pane layer has a Photoshop layer style that creates a bevel on the window.

8. Go to 2:00, and click the stopwatch next to the Opacity property for the Window Pane layer to create a keyframe at the current value, 30%.

Image

9. Press the Home key or drag the current-time indicator to the beginning of the time ruler, and change the Opacity property to 0%.

Image

10. Hide the Window Pane properties.

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

The interior of the room transitions gently from dimly to brightly lit.

12. Press the spacebar to stop playback at any time after 5:00.

13. Choose File > Save.


About expressions

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.

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

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.

For more about expressions, see After Effects Help.


Duplicating an animation using the pick whip

Now you need to lighten the view through the window. 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.

1. Press the Home key, or move the current-time indicator to the beginning of the time ruler.

2. Select the Window Lit layer, and press T to reveal its Opacity property.

3. Alt-click (Windows) or Option-click (Mac OS) the Opacity stopwatch for the Window Lit layer to add an expression for the default Opacity value, 100%. The words transform.opacity appear in the time ruler for the Window Lit layer.

Image

4. Click the pick whip icon (Image) on the Window Lit Expression: Opacity line, and drag it to the Opacity property name in the Background Lit layer. When you release the mouse, the pick whip snaps, and the expression in the Window Lit layer time ruler now reads “thisComp.layer(“Background Lit”).transform.opacity.” This means that the Opacity value for the Background Lit layer (0%) replaces the previous Opacity value (100%) for the Window Lit layer.

Image

5. Drag the current-time indicator from 0:00 to 5:00. Notice that the Opacity values for the two layers match.

6. Go to the beginning of the time ruler, and then press the spacebar to preview the animation again. Notice that the sky outside the window lightens as the room inside the window does.

7. Press the spacebar to stop playback.

8. Hide the Window Lit and Background Lit layers’ properties to keep the Timeline panel tidy for your next task.

9. Choose File > Save to save your project.

Animating movement in the scenery

The scenery outside the window is unrealistically static. For one thing, the sun should actually rise. In addition, shifting clouds and flying birds would bring this scene to life.

Animating the sun

To make the sun rise in the sky, you’ll set keyframes for its Position, Scale, and Opacity properties.

1. In the Timeline panel, select the Sun layer, and expand its Transform properties.

2. Go to 4:07, and click the stopwatch icons (Image) to set keyframes for the Position, Scale, and Opacity properties at their default values.

Image

3. Go to 3:13.

4. Still working with the Sun layer, set its Scale to 33, 33% and its Opacity to 10%. After Effects adds a keyframe for each property.

Image

5. Press the End key, or move the current-time indicator to the end of the composition.

6. For the Position property of the Sun layer, set the y value to 18, and then set the Scale values to 150, 150%. After Effects adds two keyframes.

Image

You’ve just set keyframes that instruct the sun to move up and across the sky, and to become slightly larger and brighter as it rises.

7. Hide the Sun layer’s properties.

Animating the birds

Next, you’ll animate the motion of the birds flying by. To create the animation faster, you’ll take advantage of the Auto-Keyframe option. When Auto-Keyframe is enabled, After Effects automatically creates a keyframe whenever you change a value.

1. Select the Birds layer in the Timeline panel, and press P to reveal its Position property.

2. From the Timeline panel menu, choose Enable Auto-Keyframe.

A red stopwatch icon appears at the top of the Timeline panel to remind you that Auto-Keyframe is selected.

3. Go to 4:20, and set the Position values for the Birds layer to 200, 49. After Effects automatically adds a keyframe.

Image

Image


Image Note

While the Auto-Keyframe option can make your life easier, it can also create more keyframes than you intended. Choose Enable Auto-Keyframe only when you need it for a specific task, and remember to disable it when you’re done with that task!


4. Go to 4:25, and set the Position values of the Birds layer to 670, 49. After Effects adds a keyframe.

Image

5. Select the Birds layer, and press P to hide its Position property.

Animating the clouds

Next, you’ll animate the clouds drifting across the sky.

1. Select the Clouds layer in the Timeline panel, and expand its Transform properties.

2. Go to 5:22, and click the stopwatch icon (Image) for the Position property to set a Position keyframe at the current value (406.5, 58.5).

3. Still at 5:22, set the Opacity for the Clouds layer to 33%.

Image

After Effects automatically adds a keyframe, because Auto-Keyframe is still enabled.

4. Choose Enable Auto-Keyframe from the Timeline panel menu to deselect it.

5. Go to 5:02, and set the Clouds layer Opacity value to 0%.

After Effects adds a keyframe, even though you disabled Auto-Keyframe. After Effects adds a keyframe whenever you change the value for a property that already has a keyframe in the timeline.

6. Go to 9:07, and set the Clouds layer Opacity value to 50%. After Effects adds a keyframe.

7. Press the End key, or move the current-time indicator to the last frame of the composition.

8. Set the Position of the Clouds layer to 456.5, 48.5. After Effects adds a keyframe.

Image

Previewing the animation

Now, see how it all comes together.

1. Press the Home key, or go to 0:00.

2. Press F2 or click an empty area in the Timeline panel to deselect everything, and then press the spacebar to preview the animation.

The sun rises in the sky, the birds fly by (very quickly), and the clouds drift. So far, so good! However, there’s a fundamental problem: These elements all overlap the window frame—the birds even appear to be flying inside the room. You’ll solve this next.

Image

3. Press the spacebar to stop playback.

4. Hide the properties for the Clouds layer, and then choose File > Save.

Adjusting the layers and creating a track matte

To solve the problem of the sun, birds, and clouds overlapping the window frame, you must first adjust the hierarchy of the layers within the composition. Then you’ll use an alpha track matte to allow the outside scenery to show through the window, but not appear to be inside the room.

Precomposing layers

You’ll start by precomposing the Sun, Birds, and Clouds layers into one composition.

1. Shift-click to select the Sun, Birds, and Clouds layers in the Timeline panel.

2. Choose Layer > Pre-compose.

3. In the Pre-compose dialog box, name the new composition Window Contents. Make sure the Move All Attributes Into The New Composition option is selected, and select Open New Composition. Then click OK.

Image

A new Timeline panel named Window Contents appears. It contains the Sun, Birds, and Clouds layers you selected in step 1 above. The Window Contents composition also appears in the Composition window.

4. Click the sunrise Timeline panel to see the contents of the main composition. Notice that the Sun, Birds, and Clouds layers have been replaced by the Window Contents layer, which refers to the Window Contents composition.

Image

Creating the track matte

Now, you will create the track matte to hide the outside scenery behind all areas of the image except the windowpane. To do that, you’ll duplicate the Window Lit layer and use its alpha channel.


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.

After Effects preserves the order of a layer and its track matte after you duplicate or split the layer. Within the duplicated or split layers, the track matte layer remains on top of the fill layer. For example, if your project contains layers X and Y, where X is the track matte and Y the fill layer, duplicating or splitting both of these layers results in the layer order XYXY.

Image

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.


1. In the sunrise Timeline panel, select the Window Lit layer.

2. Choose Edit > Duplicate.

3. Drag the duplicate layer, Window Lit 2, up in the layer stack so that it’s above the Window Contents layer.

4. Click Toggle Switches/Modes at the bottom of the Timeline panel to display the TrkMat column, so you can apply the track matte.

5. Select the Window Contents layer, and choose Alpha Matte “Window Lit 2” from the TrkMat pop-up menu.

Image

The alpha channel of the layer above (Window Lit 2) is used to set transparency for the Window Contents layer, so the scenery outside the window shows through the transparent areas of the windowpane.

6. 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.

7. Choose File > Save to save your project.

Adding motion blur

The birds will look more authentic if they include motion blur. You’ll add the motion blur and then set the shutter angle and phase, which control the intensity of the blur.

1. Switch to the Window Contents Timeline panel.

2. Go to 4:22—the middle of the birds’ animation. Then select the Birds layer, and choose Layer > Switches > Motion Blur to turn on motion blur for the layer.

3. Click the Enable Motion Blur button (Image) at the top of the Timeline panel to display the motion blur for the Birds layer in the Composition panel.

Image

4. Choose Composition > Composition Settings.

5. In the Composition Settings dialog box, click the Advanced tab, and reduce the Shutter Angle to 30 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.

Image

Animating the shadows

It’s time to turn your attention to the shadows cast on the table by the clock and the vase. In a realistic time-lapse image, those shadows would shorten as the sun rises.

There are a few ways to create and animate shadows in After Effects. For example, you could use 3D layers and lights. In this project, however, you’ll use the Corner Pin effect to distort the Shadows layer of the imported Photoshop image. Using the Corner Pin effect is like animating with the Photoshop Free Transform tool—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. Switch to the sunrise Timeline panel, and make sure you’re at the beginning of the time ruler.

2. Select the Shadows layer in the Timeline panel, and then choose Effect > Distort > Corner Pin. Small circles appear around the corner points of the Shadows layer in the Composition panel.


Image 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.


Image

You’ll start by setting the four corners of the Shadows layer to correspond to the four corners of the glass tabletop. Begin about midway into the animation, when the sun is high enough to start affecting the shadow.

3. Go to 6:00, and then drag each of the four corner-pin handles to the respective corners of the glass tabletop. Notice that the x and y coordinates update in the Effect Controls panel.


Image Tip

The lower right corner of the Shadows layer is offscreen. To adjust that corner, switch to the Hand tool (Image), and drag up in the Composition panel so that you can see some of the pasteboard below the image. Then switch back to the Selection tool (Image), and drag the lower right corner-pin handle to the approximate location of the lower right corner of the glass tabletop.


If you have trouble getting the shadows to look right, you can manually enter the values shown in the figure that follows step 4.

4. Set a keyframe for each corner at 6:00 by clicking the stopwatch icon (Image) for each position in the Effect Controls panel.

Image

5. Press the End key, or move the current-time indicator to the last frame of the composition.

6. Using the Selection tool (Image), shorten the shadows: Drag the two lower corner-pins about 25% closer to the back edge of the tabletop. You may also need to move the two upper corners in slightly so that the bases of the shadows still align properly with the vase and the clock. Your corner-pin values should be similar to those in the figure below; you can enter the values directly if you prefer not to drag the corners. After Effects adds keyframes.

Image

7. If necessary, select the Hand tool (Image), and drag the composition down to center it vertically in the Composition panel. Then switch back to the Selection tool, and deselect the layer.

8. Go to 0:00, and then press the spacebar to preview the entire animation, including the corner-pin effect. When you’re done, press the spacebar again.

Image

9. Choose File > Save to save your project.

Adding a lens flare effect

In photography, when bright light (such as sunlight) reflects off the lens of a camera, it causes a flare effect. Lens flares can be bright, colorful circles and halos, depending on the type of lens in the camera. After Effects offers a few lens flare effects. You’ll add one now to enhance the realism of this time-lapse photography composition.

1. Go to 5:10, where the sun is shining brightly into the lens of the camera.

2. With no layers selected in the Timeline panel, choose Layer > New > Solid.

3. In the Solid Settings dialog box, name the layer Lens Flare, and click the Make Comp Size button. Then set the Color to black by clicking the swatch and setting all the RGB values to 0 in the Solid Color dialog box. Click OK to return to the Solid Settings dialog box.

Image

4. Click OK to create the Lens Flare layer.

5. With the Lens Flare layer selected in the sunrise Timeline panel, choose Effect > Generate > Lens Flare from the After Effects menu bar.

The Composition panel and the Effect Controls panel display the visual and numeric default Lens Flare settings, respectively; you’ll customize the effect for this composition.

6. Drag the Flare Center cross-hairs icon (Image) in the Composition panel to the center of the sun. Since you cannot see the sun in the Composition panel, position the cross-hairs so that the x,y coordinates in the Effect Controls or Info panel are approximately 455, 135.


Image Tip

You can also enter the Flare Center values directly in the Effect Controls panel.


7. In the Effect Controls panel, change the Lens Type to 35mm Prime, a more diffuse flare effect.

Image

8. Make sure you’re still at 5:10. In the Effect Controls panel, click the stopwatch icon (Image) for the Flare Brightness property to set a keyframe at the default value of 100%.

9. Adjust the brightness of the lens flare to peak when the sun is highest:

• Go to 3:27, and set the Flare Brightness value to 0%.

• Go to 6:27, and set the Flare Brightness value to 0% as well.

• Go to 6:00, and set the Flare Brightness to 100%.

10. With the Lens Flare layer selected in the Timeline panel, choose Layer > Blending Mode > Screen to change the blending mode.


Image Tip

You can also choose Screen from the Mode pop-up menu in the Timeline panel.


Image

11. 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 Lens Flare effect. When you’re done, press the spacebar again.

12. Choose File > Save to save your project.

Adding a video animation

The animation now looks very much like a time-lapse photo—except the clock isn’t working yet! The hands of the clock should be spinning quickly to show the progress of time. To show this, you will add an animation that was created specifically for this scene. The animation was created in After Effects as a set of 3D layers that are lit, textured, and masked to blend into the scene.


Image Note

You’ll learn more about 3D layers in Lessons 11, “Using 3D Features,” and 12, “Working with the 3D Camera Tracker.


1. Bring the Project panel forward. Close the sunrise Layers folder, and then double-click an empty area in the panel to open the Import File dialog box.

2. In the Lessons/Lesson06/Assets folder, select the clock.mov file, and click Import or Open.

Image

The QuickTime movie clock.mov now appears at the top of the Project panel.

3. Click in the sunrise Timeline panel to make it active, and then go to the beginning of the time ruler. Drag the clock.mov footage item from the Project panel to the top of the layer stack in the Timeline panel.

Image

4. Preview the animation by pressing the spacebar. Press the spacebar again to stop playback when you’re done.

5. Choose File > Save to save the project.

Rendering the animation

To prepare for the next task—retiming the composition—you need to render the sunrise composition and export it as a movie.

1. Select the sunrise composition in the Project panel, and then choose Composition > Add To Render Queue.

The Render Queue panel opens. Depending on the size of your screen, you may need to maximize the panel to see all the settings.

2. (Optional) Double-click the Render Queue panel tab to make the panel larger.

3. Accept the default Render Settings in the Render Queue panel. Then click the blue, italicized words Not Yet Specified next to the Output To pop-up menu.

Image

4. Navigate to the Lessons/Lesson06/Assets folder, and name the file Lesson06_retime.avi (Windows) or Lesson06_retime.mov (Mac OS). Then click Save.

5. Expand the Output Module group, and then choose Import from the Post-Render Action menu. After Effects will import the movie file after it’s rendered.

Image

6. Hide the Output Module section.

7. Click the Render button in the Render Queue panel.

After Effects displays a progress bar as it renders and exports the composition, and plays an audio alert when it is finished. It also imports the resulting movie file into the project.

Image

8. When After Effects has finished rendering and exporting the composition, double-click the Render Queue panel tab if you maximized the panel earlier. Then click the x in the Render Queue tab to close the Render Queue panel.

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. 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.

For this exercise, you’ll use the movie that you just imported as the basis of a new composition, which will be easier to remap than the original.

1. Drag the Lesson06_retime movie onto the Create A New Composition button (Image) at the bottom of the Project panel.

After Effects creates a new composition named Lesson06_retime, and displays it in the Timeline and Composition panels. Now you can remap all of the elements of the project at once.


Image Tip

You can get even finer control with the Timewarp effect, which you’ll use in Lesson 13, “Advanced Editing Techniques.


2. With the Lesson06_retime 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.

Image

3. Double-click the Lesson06_retime layer name in the Timeline panel 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.

Image

4. Drag the current-time indicator across the time ruler in the Timeline panel, 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.

5. Go to 4:00, and change the Time Remap value to 2:00.

This remaps time so that frame 2:00 plays at 4:00. In other words, the composition now plays back at half-speed for the first four seconds of the composition.

Image

6. Press the spacebar to preview the animation. The composition now runs at half-speed until 4:00, and at a faster 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 Lesson06_retime layer in the Timeline panel.

2. Click the Graph Editor button (Image) to display the Graph Editor.

Image

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

Using the Graph Editor to remap time

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 position.

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.

1. In the time-remap graph, drag the middle keyframe vertically from 2 up to 10 seconds.

2. Drag the last keyframe down to 0 seconds.

Image

3. 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.


Image Tip

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


The animation progresses rapidly over the first four seconds of the composition, and then plays in reverse for the rest of the composition.

4. Press the spacebar to stop the preview.

Having fun yet? Keep going.

5. Ctrl-click (Windows) or Command-click (Mac OS) the last keyframe to delete it. The composition is still in fast-forward mode for the first 4 seconds, but now it holds on a single frame (the last frame) for the rest of the composition.

6. 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.

7. Ctrl-click (Windows) or Command-click (Mac OS) the dotted line at 6:00 to add a keyframe at 6:00 with the same value as the keyframe at 4:00.

8. Ctrl-click (Windows) or Command-click (Mac OS) at 10:00 to add another keyframe, and then drag it down to 0 seconds.

Image

The animation progresses rapidly, holds for two seconds on the last frame, and then runs in reverse.

9. Go to the beginning of the composition, and then press the spacebar to preview the change. Press the spacebar again when you’re done.


Image Note

Pressing Ctrl or Command temporarily activates the Add Vertex tool.


Adding an Easy Ease Out

You’ll soften the shift in time that occurs at 6 seconds with an Easy Ease Out.

1. Click to select the keyframe at 6:00, and then click the Easy Ease Out button (Image)at the bottom of the Graph Editor. This slows the shift into reverse—the footage runs slowly in reverse at first, and then gradually speeds up.

Image

2. Choose File > Save to save your work so far.


Image Tip

You can refine the amount of ease on this transition further by dragging the Bezier handle that appears out of the right side of the keyframe at 6:00. If you drag it to the right, the transition is softer; if you drag it down or to the left, the transition is more pronounced.


Scaling the animation in time

Finally, use the Graph Editor to scale the entire animation in time.

1. Click the Time Remap property name in the Timeline panel to select all of the Time Remap keyframes.

2. Make sure the Show Transform Box button (Image) at the bottom of the Graph Editor is selected; a free-transform selection box should be visible around all of the keyframes.


Image Tip

If you press Ctrl (Windows) or Command (Mac OS) while you drag, the entire free-transform box scales around the center point, which you can also drag to offset. If you press Alt (Windows) or Option (Mac OS) and drag one corner of the free-transform box, the animation is skewed in that corner as you drag. You can also drag one of the right transform handles to the left to scale the entire animation so that it happens more quickly.


3. Drag one of the upper transform handles from 10 seconds to 5 seconds.

Image

The entire graph shifts, reducing the top keyframe values and slowing playback.

4. 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 change. Press the spacebar again when you’re done.

5. Choose File > Save.

Congratulations. You’ve completed a complex animation, including shifts in time. You can render and export the time-remap project if you’d like. Follow the instructions in “Rendering the animation” in this lesson, or see Lesson 14, “Rendering and Outputting,” for detailed instructions on rendering and exporting a composition.

Review questions

1. Why would you import a layered Photoshop file as a composition?

2. What is the pick whip, and how do you use it?

3. What is a track matte, and how do you use it?

4. How do you remap time in After Effects?

Review answers

1. When you import a layered Photoshop file into After Effects as a composition, After Effects preserves the layer order, transparency data, and layer styles from the source Photoshop document. It also preserves other features, such as adjustment layers and type.

2. The pick whip creates expressions that link the values of one property or effect to another layer. The pick whip is also a way to create parenting relationships. To use the pick whip, simply drag the pick whip icon from one property to another.

3. When you want one layer to show through a hole in another layer, you can use a track matte. To create a track matte, you need two layers: one to act as a matte, and another 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.

4. There are several ways to remap time in After Effects. Time remapping lets you dynamically speed up, slow down, stop, or reverse footage. When remapping time, you can use the values in the time-remap graph in the Graph Editor to determine and control which frame of the movie plays at which point in time. When you enable time remapping for a layer, After Effects adds a Time Remap keyframe at the start and end points of the layer. 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.