Chapter 26: Animating in the Animation (Timeline) Panel 841 Now that I have the unpleasant limitations out of the way, I focus on what we can do with key- frames. The next few sections take you through the particulars of animating the common proper- ties of every layer: position, opacity, style, and global lighting. Cross-Ref You can absolutely animate the previously listed properties in Photoshop, just not using keyframes. I show you how this is done in Chapter 28. n Animating the Position of a Layer As I demonstrated in the previous section, you can animate the position of objects or selections within a layer. These positions must be changed with the Selection tool rather than by transformations. You learned that creating a keyframe is a relatively simple process. Creating the right keyframe, however, can be tricky—even more so while animating position than any other layer style. The timing of a movement is vital. If you are attempting to create a realistic movement, such as a bouncing ball, you must time it so it looks like it’s truly bouncing. Too slow and you get a floating quality. Too fast and you get a spastic ball. Choosing how many keyframes to place in a movement is key to creating a successful animation. Most true-to-life movements are not mechanical and precise. Placing several keyframes throughout a movement, even if it is in the same direction, can add variations in movement and speed that makes it seem more realistic. I am also going to show you how you can animate positions across multiple layers, animating objects together so that they move in unison, as well as animating them individually. These are difficult concepts to demonstrate using still shots in a book, so follow along with the exercises and try things out for yourself so you can see the results on your own computer screen. Keyframe placement For the first exercise, I use my bouncing ball example again. I reduce the size of it significantly so it has much more room to bounce. You can create a less mechanical bounce to your ball by adding extra keyframes to the timeline: 1. Create a new file in Photoshop. Use the default Photoshop size or larger. 2. Use the Ellipse tool found in the Toolbox to draw a circle. Hold down the Shift key while you are doing it to constrain it to a perfectly circular shape. You can jazz it up by adding a color or layer style. 37_584743-ch26.indd 84137_584743-ch26.indd 841 5/3/10 10:49 AM5/3/10 10:49 AM Part VIII: Working with Video and Animation 842 3. Right-click your newly created shape layer to open the pop-up menu, and select Rasterize layer. 4. Select Window ➪ Animation to open the Animation (Timeline) panel. 5. Click the triangle next to the layer name in the Animation panel to show the layer prop- erties, and click the Time-Vary Stopwatch next to the word Position to activate it. 6. Set the current time indicator to the beginning of the timeline, and move the ball to the top of the canvas. 7. Move the Zoom slider to the right to expand the timeline enough to see half-second increments. The Zoom slider is found at the bottom of your Animation (Timeline) panel. As you increase the size of the timeline, a 15f appears in the time ruler to indicate the half second mark. The 15f indicates that 15 frames have gone by. 8. Set the current time indicator to one-half second, and move the ball down to the bottom of the canvas. 9. Move the current time indicator about one-third of the way between the two key- frames, and move the ball up slightly to create a new keyframe. This makes the first part of the ball drop slower than the second. 10. Select all three keyframes, and copy them by right-clicking one of them and select- ing Copy Keyframe from the menu. Tip You can select all the keyframes in any given layer property by clicking the name of the layer property. n 11. Move the time indicator to one second, and paste the keyframes. 12. Move the time indicator about a third of the way between one-half second and one second, when the ball is on its way back up, and create a new keyframe by moving the ball farther up along the path. This makes the ball move faster through the first part of the bounce. Tip You can adjust the position of a keyframe by clicking and dragging it in the timeline. n 13. Copy and paste all the keyframes several times at each new half second until the ball bounces several times in succession. Your timeline should look similar to the one in Figure 26.10. As you play this animation back, you see that adding a few additional keyframes improves the ani- mation. You can add more keyframes that give the ball a brief pause at the apex of each bounce, or you can edit the position of the ball with each subsequent bounce so it doesn’t bounce as high each time. You could even have it bouncing all over the walls like a trapped super ball. Trial and error will help you find the spots where a keyframe would be beneficial. 37_584743-ch26.indd 84237_584743-ch26.indd 842 5/3/10 10:49 AM5/3/10 10:49 AM Chapter 26: Animating in the Animation (Timeline) Panel 843 FIGURE 26.10 Adding a couple of extra keyframes can make the ball’s bounce more realistic. Animating positions in multiple layers There may come a time when you want to animate the position of objects in different layers at the same time. For instance, if I added text to the bouncing ball, I would want the text to move along with the ball as it bounced around my screen. To animate both layers at once, you simply need to select the position layer property in both layers by holding down the Ctrl/Ô key while you click each in turn. As you can see in Figure 26.11, both position property layers are highlighted in the Animation (Timeline) panel. Meanwhile, in the Layers panel, both object layers are highlighted as well. This allows you to move both objects simultaneously, creating keyframes in both position layers. You can see how well this worked for the ball in Figure 26.12. 37_584743-ch26.indd 84337_584743-ch26.indd 843 5/3/10 10:49 AM5/3/10 10:49 AM Part VIII: Working with Video and Animation 844 FIGURE 26.11 You can animate the position of two layers at once by selecting the position properties in both layers in the Animation (Timeline) panel. FIGURE 26.12 Now I can move the ball and the text together without losing the editing capability of either. Caution As long as the Time-Vary Stopwatch is active, you don’t even have to be displaying the layer properties to set a keyframe. Any change in any of the layer properties sets a new keyframe, even if you can’t see it. This means you can wreak havoc on your animation without even thinking by moving your layers around the document. Lock the position of your layer (using the Lock icons at the top of the Layers panel) whenever you are not actu- ally creating keyframes. n 37_584743-ch26.indd 84437_584743-ch26.indd 844 5/3/10 10:49 AM5/3/10 10:49 AM Chapter 26: Animating in the Animation (Timeline) Panel 845 Animating the Opacity Setting The principles of animating opacity are essentially the same as animating position. You can create some pretty cool effects by changing the opacity of layers over time. Create ghosts, change the level of special effects, or simply create a fade transition. This feature can be especially useful in creating video special effects. Keep in mind that as you learn the basics of creating keyframes, the applica- tions of using keyframes can be very advanced. Changing the opacity of a layer is as simple as adjusting the Opacity setting in the Layers. If the Time-Vary Stopwatch is activated in the opacity layer property, simply adjusting the opacity at dif- ferent locations in the timeline creates keyframes. With opacity, setting the keyframes isn’t nearly as tricky as it is with changing position. It’s as easy as deciding what opacity you want where in your animation and setting keyframes at those points. It required only two keyframes to reveal my secrets, as shown in Figure 26.13. You’d think they’d expect it from me by now, but my very gullible family was very relieved. The important thing here is not how hard it is to animate opacity; it’s the flexibility that the tools in Photoshop give this animating capability. You can animate the opacity of any layer in your proj- ect, including a Fill and Adjustment layer or a layer style that has been converted to its own layer. You can’t animate the actual creation of a paint job or text, but as long as it’s on its own layer you can animate its opacity, fading it in or out over time. Of course, you can set the keyframes to hold interpolations as well, allowing your images or special effects to pop in and out of sight. In Figure 26.14, I created a Black & White Adjustment layer over the image of a lion, tinted it green, and gave it the Darken Blend mode. This simulated this photo being taken with an infrared camera. By fading the opacity of the Black & White Adjustment layer over time, I can show you the daytime image that I started out with. The more layers you have, the more unwieldy the Animation (Timeline) panel can become, especially when you are displaying layer properties. Remember that you can change the settings to show only those layers you are working on. The keyframes you have set operate whether the layer properties are being displayed or not, so reduce the view of the layer properties whenever you are not placing keyframes. This is a great way to prevent accidentally clicking the Time-Vary Stopwatch and deleting all those hard-placed keyframes. Managing Multiple Layers 37_584743-ch26.indd 84537_584743-ch26.indd 845 5/3/10 10:49 AM5/3/10 10:49 AM Part VIII: Working with Video and Animation 846 FIGURE 26.13 Is this the kind of picture that gives you the chills, or not so much? Animating the opacity of the back- ground image with just two keyframes revealed the true risk involved in this feat. 37_584743-ch26.indd 84637_584743-ch26.indd 846 5/3/10 10:49 AM5/3/10 10:49 AM Chapter 26: Animating in the Animation (Timeline) Panel 847 FIGURE 26.14 Fading out the Adjustment layer is the difference between night and day. Animating Layer Styles Animating Layer styles is the most diverse of the animation capabilities in Photoshop. Animating position or opacity changes just one setting of the layer selected, but there are ten different layer styles. Every time you change the setting of any one of these styles, you can create a keyframe. Use the styles one at a time or together, or bring styles in and out at will. Adjusting layer styles is the capability to animate a mind-boggling amount of special effects. Layer styles can be added to a layer by clicking the Layer Styles icon (the fx) at the bottom of the Layers panel and choosing a style from the list. When you select a layer style, the Layer Styles dia- log box opens. From the dialog box, you can edit the properties of the layer style you selected and select additional layer styles, as shown in Figure 26.15. Cross-Ref The individual Layer Styles and their settings are covered in detail in Chapter 21. n After you add a layer style, click the Time-Vary Stopwatch next to the style property. Adjust the current time indicator, and double-click the layer style in the Layers panel to bring up the Layer Styles dialog box again. Making any change in the Layer Style dialog box—such as adjusting the settings, adding a style, or deleting the style—creates a new keyframe. If you are over an existing keyframe, the changes you make to the layer style change the settings for that keyframe. In Figure 26.14, I created an Adjustment layer over the lion and animated it by fading the opacity. You can fade the opacity of a layer style, but not using the opacity setting in the Layers panel. You need to set the opacity of the style in the Layer Style dialog box. 37_584743-ch26.indd 84737_584743-ch26.indd 847 5/3/10 10:49 AM5/3/10 10:49 AM . can create a less mechanical bounce to your ball by adding extra keyframes to the timeline: 1. Create a new file in Photoshop. Use the default Photoshop size or larger. 2. Use the Ellipse tool. new keyframe by moving the ball farther up along the path. This makes the ball move faster through the first part of the bounce. Tip You can adjust the position of a keyframe by clicking and. perfectly circular shape. You can jazz it up by adding a color or layer style. 37_584743-ch26.indd 84137_584743-ch26.indd 841 5/3/10 10:49 AM5/3/10 10:49 AM Part VIII: Working with Video and Animation 842