Rotating Wedge: Null Objects & Hold Keyframes

Free After Effects Tutorial

Master creating a photo slideshow with a graphic wedge that wipes on text as it moves through this in-depth After Effects tutorial.

This exercise is excerpted from past After Effects training materials and is compatible with After Effects updates through 2020. To learn current skills in After Effects, check out our After Effects classes and video editing classes in NYC and live online.

Topics covered in this After Effects tutorial:

Using a Null Object, Creating a Shape Layer, Animating Spin, Hold keyframes

Exercise Preview

preview photo wipes rotation

Exercise Overview

In a series of exercises, we’ll create a photo slideshow with a graphic wedge that wipes on text as it moves. In this exercise, you’ll learn to animate spin using the Rotation property, how to animate shape layers, and how to use a null object to simplify animation. You’ll also learn how to animate values that change instantly instead of over time.

After Effects Bootcamp: Live & Hands-on, In NYC or Online, Learn From Experts, Free Retake, Small Class Sizes,  1-on-1 Bonus Training. Named a Top Bootcamp by Forbes, Fortune, & Time Out. Noble Desktop. Learn More.

Previewing the Final Movie

  1. On the Desktop, navigate to Class Files > After Effects Class > Rotating Wedge > Final Movie and double–click Hyatt-Regency-Rotating-Wedge.mov.

  2. Play the video and notice the following:

    • A photo slideshow plays throughout the duration of the video. The first one fades on from black, and the others have cross-fades. It fades to black at the end.
    • All the photos get slightly larger over time.
    • A colored wedge occasionally rotates on-screen, and it reveals some white text. The wedge is a different color each time and the text it reveals is also unique.
  3. Replay the video as many times as you need—we’ll be reproducing it in this series of two exercises. Keep it open so you can refer back to it as needed.

Getting Started

  1. Switch to After Effects.

  2. Go to File > New > New Project.

  3. Let’s create a dummy composition to get the settings we want. Go to Composition > New Composition.

  4. Set the following (we aren’t naming it because we’re about to delete it):

    Preset: HDTV 1080 29.97
    Resolution: Full (so our layers appear as sharp as possible on-screen)
  5. Click OK to create the dummy composition.

  6. At the top left of the Timeline, the current time display will be showing either Frames (00000) or Timecode (0;00;00;00).

    We want it to see Timecode (0;00;00;00), so if it’s displaying Frames (00000), hold Cmd (Mac) or Ctrl (Windows) and click it to toggle it to Timecode (0;00;00;00).

  7. We only created it to get the duration we want, so go to the Project panel, click on the new composition, and press the Delete key.

    The Standard Television HD Preset & Semi-Colon Timecodes

    The preset (the TV standard for North America) not only sets the comp’s width and height. It also sets the Frame Rate to 29.97 with Drop Frame enabled, which change the timecode so it uses semi-colons instead of colons. Drop frame and the way it counts frames only affects durations longer than 1 minute, as the timecode will “jump” 2 frame counts every minute, except the 10th minute. For more info, please see tinyurl.com/drop-frame-timecode

  8. Go to File > Import > File.

  9. Navigate into Desktop > Class Files > After Effects Class > Rotating Wedge, and click once on the Assets folder. Do not double–click on it!

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

  11. In the Project panel, expand the Assets folder and the Photos and Vectors subfolders.

    We should have 3 photos and a flattened Illustrator file (we don’t need its layers). If Hyatt-Regency-logo.ai came in as a Composition and folder, delete both and “File > Import” only that file, as “Footage” with “Merged Layers”.

  12. Let’s create our composition. Select everything inside the Photos folder by clicking on 1-spa-lady.png and Shift–clicking on 3-pool-lady.png.

  13. Still in the Project panel, Ctrl–click (Mac) or Right–click (Windows) on any selected photo and choose New Comp from Selection.

  14. In the dialog that appears, choose the following options:

    • Under Create, make sure Single Composition is selected.
    • In the Use Dimensions From menu, keep 1-spa-lady.png selected. Each photo is 1920 x 1080, (HD video size), so it’s easiest to stick with what it chose.
    • Set Still Duration to 0;00;04;00 so each still photo will be on-screen for 4 seconds.
    • Check on Sequence Layers.
    • Check on Overlap.
    • Set Duration to 0;00;00;15 so the layers overlap by 15 frames (not 15 seconds!).
    • Set Transition to Dissolve Front Layer.
  15. Click OK and After Effects will automatically create a slideshow!

    Cross-Dissolves in After Effects

    Typically a cross-dissolve involves one layer fading out while another layer fades in. After Effects doesn’t quite work like that with full-frame images. To create a cross-dissolve we instead have one layer fade up or down in opacity on top of another layer, while the bottom layer stays static.

  16. In the Timeline, slide through with the playhead to see that it created a slideshow with 15 frames of overlap between layers. During that overlap, we get nifty cross-dissolves during which the previous layer fades away to reveal the next layer in the sequence. Your layers should look like a set of stairs going down with slight overlaps.

  17. While all the layers are still selected, press the U key to show all keyframes.

  18. Notice that everything except the last layer already has Opacity keyframes! These were added automatically when we set Transition to Dissolve Front Layer.

    This shows that when you tell After Effects to automatically create a cross-fade, only the layer that’s fading away has keyframes. As it fades away, you see more of the next photo, which stays static throughout the transition.

  19. The composition is named 1-spa-lady because that’s where After Effects took the dimensions from. To change it, go to Composition > Composition Settings and:

    • Rename it to Rotating Wedge-MAIN
    • Set Background Color to Black
    • Click OK.
  20. In the Project panel, drag the new Rotating Wedge-MAIN composition out of the Assets folder to an empty area of the Project panel, as shown below:

    drag rotating wedge out of assets folder

  21. In the Timeline, click in an empty area to deselect all.

  22. Let’s fade the first photo (the spa lady) up from black. Move the playhead to 0;15.

  23. To the left of the [1-spa-lady.png] layer’s Opacity property, click the diamond diamond icon.

    Because the diamond was gray, you just added a keyframe here (turning it blue).

  24. Press the Home key (or Fn–Left Arrow) to go back to the video’s first frame at 0;00.

  25. To complete the fade-up, set the [1-spa-lady.png] layer’s Opacity to 0%.

  26. Scrub the playhead from 0;00 to 0;15 to see the spa lady photo fade up from black.

  27. Go to File > Save As > Save As and:

    • Navigate into Desktop > Class Files > After Effects Class > Rotating Wedge
    • Name the project yourname-Rotating Wedge.aep
    • Click Save.

Scaling Up All the Photos Using a Null Object

In the finished video, the photos slightly scale up throughout their duration. (Feel free to re-watch it if needed.) We can ensure that all of the photo layers enlarge consistently by using a Null Object, an invisible layer that can control other layers.

Using Null Objects to Parent Other Layers

A Null Object is an invisible layer that can be animated and adjusted like any other layer. (Though you can see its wireframe while working, a null object has no visibility when you export your movie.) We can make a null object control any other layer in a composition by setting it as that layer’s Parent. This means any Position, Scale, or Rotation adjustment you make to the null object would be applied to its child layer. Remember, child layers do not inherit Opacity or Effects from their parent.

Null objects are best used to simplify an animation. In our case, rather than scale up all our photo layers, it will be easier to animate the null object.

  1. To make the scaling easier, we’ll Parent all three photo layers to a null object. With the [01-spa-lady.png] layer selected, go to Layer > New > Null Object.

  2. In the center of the spa lady photo, notice a small square with its anchor point anchor point in the top-left corner. We’ll make this layer grow throughout the animation.

  3. To remind us of its purpose, let’s rename it. In the Timeline, select the new [Null 1] layer and press Return (Mac) or Enter (Windows) to make its name editable.

  4. Type: Scale Null and press Return (Mac) or Enter (Windows) to end renaming.

  5. We are going to connect our pictures to this Scale Null so it can control their scale. Find the Parent & Link column on the left side of the Timeline panel (to the right of the switches timeline switches or modes).

    If you do not see the Parent & Link column, Ctrl–click (Mac) or Right–click (Windows) on one of the columns (such as Layer Name) and choose Columns > Parent & Link.

  6. Collapse all of the layers down arrow menu so that you only see the layer names.

  7. Let’s use the null object as a driver/mover for all the photo layers. Select all the photos: click on [1-spa-lady.png] and Shift–click on [3-pool-lady.png].

  8. Under one of the selected layers’ Parent & Link column, drag the pick whip pick whip icon to the Scale Null layer name as shown below:

    wedge pick whip drag child to parent

    After you release, look in the Parent & Link column to see that 1. Scale Null (our first layer) is now parenting all the layers you selected.

  9. In the Timeline, move the playhead to 0;00

  10. Select the Scale Null layer and expand right arrow menu into its Transform properties.

  11. Next to the Scale property, click the stopwatch stopwatch to add a keyframe here at 0;00.

  12. Press the End key (or Fn–Right Arrow) to get to the last frame at 10;29.

  13. To the right of Scale, click on either 100%, type 120%, and press Return (Mac) or Enter (Windows). This will add a new keyframe keyframe end.

    It’s important to be mindful of the original sizes of the photos so you don’t scale them up too much. (Ours are the size of the composition.) We recommend that you scale up photos and other pixel-based footage no more than 125–130%. We’re in the safe zone by scaling the null object (and hence its child photo layers) to 120%.

  14. In the Timeline, go to 0;00 and scrub through to see all the photos grow slightly.

Creating a Color Wedge Using a Shape Layer

The revolving shape you saw in the final video is a square Shape Layer. Let’s create it and set it up so it will rotate on its top-right edge.

  1. In the Timeline, click into any empty area to deselect, or go to Edit > Deselect All.

  2. In the Tools panel at the top, choose the Rectangle tool rectangle tool. You may need to click and hold on the Ellipse tool ellipse tool and then select the Rectangle tool.

  3. In the Tools panel to the right of the tools, you’ll see two options appear, for Fill and Stroke. First make sure the checkbox next to Bezier Path is NOT turned on.

  4. Still in the Tools panel, click on the blue word Fill (not its swatch!) and:

    • In the row of icons, choose the second option, Solid Color shape layer solid color.
    • Make sure Opacity is 100%.
    • Click OK.
  5. To the right of the word Fill, click the color swatch.

  6. In the bottom field for hex codes, set the color to #098AA3 (a relaxing blue).

  7. Click OK to set the color.

  8. Back in the Tools panel, click on the blue word Stroke (not its swatch!) and:

    • In the row of icons, choose the first option, None shape layer none.

    • Click OK.

  9. In the center of the Composition viewer panel, hold Shift and drag to draw a large square instead of a rectangle. Any size is fine for now as we’ll be changing it soon.

  10. After you release, you’ve created a shape layer! Look on the left side of the Timeline to see that the topmost layer has a star shape layer icon before its Layer Name. This is how you know it’s a shape layer.

  11. Press UU (two U s in quick succession) and in the Timeline you can see all the property settings for Shape Layer 1 that have been changed from their defaults.

  12. In the Timeline under Contents > Rectangle 1 > Transform: Rectangle 1 (which should be the last option), change the Position values to 0, 0 to center the square.

    Positioning a Shape Layer

    Each shape layer comes with at least 1 group. (In this case Rectangle 1 is our only group.) Each group contains a Path shape, Stroke, Fill, and its own set of Transform properties that contains unique properties such as Skew, as well as a Position property. These values are based on the center of the screen.

    To confuse things further, shape layers have traditional Transform properties too, and within those, the Position values are based on the top left of the screen. Going into the shape group’s Position values and zeroing them out at the start simplifies things so that we can keep animating as we’re used to, with the traditional Transform > Position property.

  13. Under Rectangle Path 1, change the Size values to 2000, 2000.

  14. Above the options you just set, click on the Shape Layer 1 layer name and press Return (Mac) or Enter (Windows) so we can rename it.

  15. Type Wedge and press Return (Mac) or Enter (Windows) again to finish renaming.

  16. To get a better look at the new shape, do the following:

    • In the Timeline to the left of Wedge’s layer number, click on the colored square (the Label Color) and from the menu, choose Yellow so we can see it better.
    • At the bottom left of the Composition panel, click into the menu with a zoom percentage and choose 12.5%. You should be able to see the entire square with its bounding box and square selection handles.
  17. To prepare to move the square into position:

    • In the Tools panel at the top, choose the Selection tool selection tool.
    • In the Composition panel, hold Spacebar to switch to the Hand tool hand tool and drag the composition frame to the top of the panel so you can see plenty of space below and to the left of it.
  18. As shown below, click and hold anywhere inside the square and drag it down and to the left, so its top-right handle is roughly positioned just below the center of the frame to get the result shown below (don’t worry about exact positioning yet).

    drag wedge into position

Changing the Wedge’s Anchor Point

  1. Like other layers, a shape layer revolves around its anchor point anchor point, which by default is in the middle. We want our square to revolve around its top-right corner, so we need to move the anchor point. In the Tools panel, choose the Pan Behind (Anchor Point) tool pan behind anchor point tool.

  2. Using the Pan Behind (Anchor Point) tool pan behind anchor point tool, drag the anchor point anchor point to the square’s top-right corner (on top of the selection handle).

  3. To make sure the square is perfectly placed, let’s input exact values. First, to make sure you won’t get confused, go to the Timeline and use the arrows down arrow menu to close up the entire Wedge layer.

  4. Open up the layer’s traditional Transform properties (not the ones within the Rectangle 1 shape group!) and set the following exact values:

    Anchor Point: 1000, –1000
    Position: 960, 1080 (960 is half the width of our 1920 px frame)
  5. It will be nice to see the entire square as we animate it. At the bottom of the Composition panel, make sure the zoom level is still 12.5% and keep it there until we tell you to zoom in.

Animating Spin with the Rotation Property

We want the wedge to rotate clockwise on its anchor point. We can animate this using the Rotation property. Let’s give it a spin!

  1. There’s another way to move the playhead. At the top left of the Timeline:

    • Click on the timecode timecode inline and it’ll become editable.
    • Type in 15 and press Return (Mac) or Enter (Windows) to get to 0;15. Neat-o!
  2. In the Timeline under the Wedge layer’s set of traditional Transform properties, locate the Rotation property.

  3. Enable keyframing by clicking the stopwatch stopwatch next to Rotation.

  4. Go to 4;00 by clicking on the timecode timecode inline and typing in 400.

  5. In the Timeline, change Rotation from 0x+0.0° to 1x+0.0° to add a keyframe.

  6. Look in the Composition panel to see that the square hasn’t budged. That’s odd…

  7. Back in the Timeline in the layer’s Transform properties, look at the Rotation value of 1x+0.0° once more and let’s break this down:

    • The 1x portion indicates how many full Revolutions (times it goes back to its starting point) it will make.
    • The 0.0° portion is the Tilt, as expressed in degrees. When you don’t want something to make a perfect revolution, you change this part of the property.
    • In After Effects, positive values rotate an object clockwise, and negative values rotate it counterclockwise.
  8. Still in the Timeline, drag the playhead from 0;15 to 4;00 to see the wedge rotate clockwise on its top-right corner, making one full revolution.

    The difference between two Rotation keyframes determines how much it’ll spin. After Effects subtracted the first value from the second one to get the difference (1x minus 0x equals 1, which means it will fully revolve around a single time).

  9. We want the wedge to make two more full revolutions. Go to the timecodes indicated and change the Rotation property as follows:

    7;15: 2x+0.0° (2x minus 1x equals 1, which means we’re adding one more full revolution)
    Last frame (10;29): 3x+0.0°

    Keep in mind that because these are complete revolutions, the square won’t appear to move until you scrub the playhead along the Timeline to see that it’s spinning.

  10. Let’s zoom in so we get a bigger preview of the rotation sequence. Go to the bottom left of the Composition panel and from the Magnification ratio popup with a 12.5% zoom percentage, choose Fit.

  11. In the Preview panel on the right, make sure Play From is set to Start Of Range (to see this option you may need to resize the panel by dragging it’s bottom border down).

  12. Hit Spacebar to examine your work. A good start, but there’s no text yet. Let’s add that next.

Adding Text & Scaling It Up

  1. In the Tools panel at the top, select the Horizontal Type tool type tool. Don’t click anything yet!

  2. On the right-hand side of the screen, in the Character panel, set the following:

    Font family: Proxima Nova (if you don’t have it, do the Before You Begin: Syncing Adobe Fonts exercise at the beginning of the book)
    Font style: Regular
    Font size font size: 85 px
    Leading leading: Auto (choose it from the menu)
    Tracking tracking icon: 0
  3. Still in the Character panel, to the right of the font menu, click the Fill Color swatch. If the Fill Color swatch isn’t already active (in front of the stroke), you will need to click it twice to open the Color settings.

  4. In the Color dialog that appears, set it to #FFFFFF (white) and click OK.

  5. We don’t want a stroke on the text, so make sure the Stroke swatch looks like stroke swatch no stroke. If it’s not, activate the swatch and then click this icon no stroke color next to it.

  6. If you can’t see the Paragraph panel on the right, go to Window > Paragraph.

  7. In the Paragraph panel, click the Center text icon center text if it isn’t already selected.

    Text Alignment & Anchor Points

    Choosing a text alignment option sets where the text’s anchor point anchor point in sidebar will be. Text anchor points are always at the bottom of the text. Center alignment places the anchor point in the bottom center. Left alignment places it in the bottom left, and Right alignment places it in the bottom right.

  8. If the playhead isn’t at 0;00, press Home (or Fn–Left Arrow) to go there.

  9. In the Timeline, make sure the Wedge layer is selected so the layer we’re about to create will get added on top of it.

  10. Do NOT click with the Type tool! Instead go to Layer > New > Text. The cool thing about creating a text layer this way is it places the cursor in the middle of the screen, exactly where we want it.

  11. Type Luxurious Amenities and keep the Type tool selected.

  12. The text in this layer will change a few times throughout the video, so let’s rename the layer. In the Timeline, click on the Luxurious Amenities layer and press Return (Mac) or Enter (Windows).

  13. Rename it to Text and press Return (Mac) or Enter (Windows) again.

  14. With the layer still selected, expand into the Text layer’s Transform properties.

  15. Enable keyframing on the Scale property by clicking the stopwatch stopwatch next to it.

  16. Press the End key (or Fn–Right Arrow) to get to the last frame of the video.

  17. To match the scaling of the photos, change either Scale value to 120%.

Changing Text Values Using Hold Keyframes

Let’s animate the text changes we saw in the final video.

  1. There’s another way to keyframe navigate. Swivel closed every layer except the Text layer to try it out:

    • Press the J key to return to the selected layer’s previous keyframe (the Scale keyframe at 0;00).
    • Then press the K key to advance to the selected layer’s next keyframe (the Scale keyframe at 10;29).
    • Press J once more to return to the first keyframe at 0;00.

    If other layers are open, these shortcuts will keyframe navigate on all open layers.

  2. In the Timeline, swivel open the Text layer’s set of Text properties.

  3. Next to the Source Text property, click the stopwatch stopwatch to add a keyframe.

  4. Look in the Timeline and notice the square-shaped keyframe keyframe hold. That indicates it’s a hold keyframe.

    While normal diamond-shaped (linear) keyframes transition from one keyframe to another, hold keyframes hold their value until it reaches the next keyframe in the sequence. This means the text will abruptly change when it gets to our next keyframe—exactly what we want!

  5. Go to 4;00 (you can click on the timecode and type in 400).

  6. With the Horizontal Type tool type tool click in the Luxurious Amenities text.

  7. Go to Edit > Select All or press Cmd–A (Mac) or Ctrl–A (Windows).

  8. Replace the text with World-Class Dining and notice a new hold keyframe has been added at this point in the Timeline!

  9. Go to 7;15 and replace the entire text by selecting it all and typing Stay with Us. (including the period) over it.

  10. In the Timeline, use the arrow down arrow menu to collapse the Text layer.

  11. In the Preview panel, press Play play icon to see that the text changes at each keyframe we set, but just stays there on-screen. We’ll fix that in the next exercise.

  12. In the Tools panel, choose the Selection tool selection tool.
  13. Do a File > Save and leave this project open to use in the next exercise.

Kalika Kharkar Sharma

Kalika Kharkar Sharma is a professional animator and motion designer. She has worked on projects for some of the world's leading studios and companies, creating innovative and entertaining motion graphics and character animations. Kalika is passionate about helping others learn the craft of animation and has taught at several universities and academies.

More articles by Kalika Kharkar Sharma

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