Using Photoshop with AE
While After Effects is a great program for adding movement to still images, it's not always a great program to create or modify still images in. Photoshop, however, is perfect for this task, and since both are owned by Adobe they tend to work very well together. As with many of the things we have covered so far, there are several different ways to use the two programs together which I will be covering here.
The most common use of Photoshop with AE is to prepare still images before you import them. When you are doing this there are a few things to keep in mind:
- When working in video or onscreen (i.e. not for print) dpi has no meaning. All that is important is the actual pixel dimensions of your file - it needs to have enough pixels so that at it's largest size onscreen you don't need to enlarge the pixels. Thus, if you are working with a comp that is 320x240 and you plan to have your image fill the entire screen, you should make it 320x240 in Photoshop. If you plan to blow it up bigger(zoom into it, for instance) than full screen you need to make it bigger in photoshop, say 640x480 if you want it twice as big as your comp.
- Don't make an image bigger than you need - larger files use more memory and take more time to render. Don't make your image too small, though, or you will need to enlarge it in AE which will make the image look soft. If you are unsure about the exact size, it is usually better to go a little larger than you think you need...remember it's always better to reduce an image than to enlarge it, at least as far as quality is concerned.
- AE can import just about any format which quicktime recognizes, which is most of the formats Photoshop can save as. However, most of the time I use TIFF because it is cross platform, compatable with many other programs, and it supports an alpha channel. PICT is also a good format if you only plan to work on a Mac, or you can use .PSD (native photoshop format) which I will discuss in more detail below. The one format I recommend you don't use is GIF - this format is 8 bit, meaning it only has 256 colors in an image. GIF will generally provide insufficient quality for your AE work.
These are basic guidelines for all images you create in Photoshop that you plan to import into AE. However, there are some specific things you need to do which are dependent upon how you plan to use the image in AE.
One of the most common uses of Photoshop with After Effects is for adding transparency to an image. This is done using an Alpha Channel
. Full color images generally have three color channels, one each for the red, green and blue components of the image. An Alpha Channel is simply a fourth greyscale channel which describes the transparency in the image. White areas of the channel correspond to opaque portions of the image, while black is for the transparent areas. Grey indicates partially transparent areas; lighter grey is more opaque, darker grey is more transparent.
Adding an Alpha channel to an image in Photoshop is a fairly straightforward process...
- First you need to select to portion of the image you wish to keep opaque. You can do this using any of the selection tools in Photoshop...the marquee (square or round), the lasso or magic wand, color range, etc.
- Once you have a portion of the image selected, go to the 'Select' menu and choose Select>Save Selection... This will bring up a dialogue asking you to name the channel, but you generally don't need to change any settings or bother with naming the channel. Just click OK and the selection will be saved as an alpha channel. To check the new channel, click on the 'Channel' tab in the 'Layers' palette. You should see the red, green and blue channels listed with a new alpha channel on the bottom. Clicking on the eye icon next to the alpha channel will let you preview it in the main image window.
- There should be only one alpha channel in your image. If you accidentally create more than one only the first one will be saved. To delete extra channels, drag them to the trashcan icon at the bottom of the layers palette in Phostoshop.
- With the new alpha channel in place, all that's left to do is save your file to a format that supports an alpha. Choose File>Save As and select Pict or TIFF from the format menu. Make sure the 'save alpha' box is checked before you save. This option will be grayed out if you choose a format which doesn't support alpha channels.
After finishing this process, you import the file into AE just as we have been in the past. AE will recognize the alpha channel and automatically make it transparent when you add the image to a composition.
Layered Photoshop Files
There are two ways you can use a layered Photoshop file within AE.
To use individual layers:
- Create a document in Photoshop which has more than one layer. Give each layer an appropriate name so you can identify it later. Save the file.
- In AE, choose File>import>file and select your Photoshop file. In the import dialogue box AE should identify it as a photoshop file, and below that it should say "import as" with a drop down menu. By default the menu says "footage" - leave it on that for now. Click Import.
- A new dialogue box will open up which says "Choose layer" with a drop down menu listing all the layers in the .psd file. You can choose the individual layer you want, or choose to import all the layers merged into a single image.
- You can now use the file in any comp, just like any other file.
One of the main limitations of this method is that if you import a individual layer which has layer styles applied to it in Photoshop, those styles will be lost. They will be preserved, however, if you import the file as merged.
To import the file as a comp:
- Again, create a layered file in Photoshop, and save it to disk.
- Import the file into AE as before, but in the drop doiwn menu labeled "import as" choose "composition" instead of "footage".
- The file will be added to your project as a composition. If you open it up, you will see that all layers have been transfered over intact in their relative positions. A folder will also be added to your project containing all of the individual layers in your new composition. You can now animate them individually as you desire.
This method actually does preserve most of the layer styles... however, it rasterizes the effect and splits it out into individual layers. For instance, if you add a drop shadow to some text, the text and the drop shadow will be two seperate layers.
When using layered photoshop files in AE, the best way to add transparency to layers is using a Layer Mask
. A layer mask is like an alpha channel that applies only to the layer it's attached to. The big advantage of these is that they don't actually erase the contents of the layer, so you can always change the transparent areas of the layer later.
To add a layer mask, select a layer in Photoshop that you wish to add the mask to and click on the icon at the bottom of the layer palette which looks like a grey square with a circle in it. This will add a mask to that layer. If you make a selection before adding the mask, that selection will become the mask, adding transparency to the layer.
On the layer itself you will now see a second icon next to the main layer icon. This represents the layer mask, and by clicking on it you can select it (it should highlight) to work on. With the mask selected you can only paint in greyscale, but wherever you paint will become transparent. Black adds transparency, white returns the image, and greys make it partially transparent. This allows you to create very softly blended masks for your layers. Remember to click back on the main layer icon whenyou are done working on the mask.
Returning to Photoshop
Once you've imported and begun working with your Photoshop files, you may find that you need to make changes to the original file. Fortunately you don't have to re-import your file each time you change it, you can simply update it to reflect the most recent changes.
- Open your file in Photoshop again, make any changes to it, then save it.
- In your AE project window, highlight the file you need to update. If you imported as a comp previously, you need to go into the folder with the comp's layers and update each individual layer. Chose File>Reload Footage.
- Your footage will update to include the most recent changes.
There are a couple of limitations with this. The first is that layer styles from Photoshop will not update if they are changed. Second, if you import your file as a comp, then add more layers to it in Photoshop, those layers won't be added by reloading your footage. You will need to import them individually, and then manually add them to their comp.
Another way to edit an image in photoshop is using the "Edit Original" command. Select the file you want to edit in your project window and from the main menu choose "Edit>Edit Original..." or use the keyboard shortcut Apple-E. This will automatically open the file in Photoshop. Once you make some changes, save the file and return to After Effects - AE will automatically reload the file to include the new changes.
There are also limitations to this method. The first is that it only works once - if you do this, then return to Photoshop and make some more changes, AE won't reload them when you bring it to the front. In order to work around this, always use the "edit original" command or keyboard shortcut (instead of just clicking back into Photoshop). If your picture is still open in PS this won't open a new copy, but it will let AE know to check for updates after you return from Photoshop.
All of the other limitations mentioned in the section above (new layers, layer styles, etc) also apply when using the "edit original" method.
a comp simply refers to using one composition within another composition in AE. You can drag a comp into another one and it will be added as a single layer to the new comp. At any time you can edit the original composition and the changes will be reflected in the new comp as well. This can be very useful when bringing in photoshop files as compositions, because you can then add those entire compositions into your main comp without adding a lot more layers at the same time.
Pixel Aspect Ratio
Computers generally treat a pixel as square; thus a standard 4:3 television image would have pixel dimensions of 640x480 pixels. However, certain video formats, such as DV, use rectangular instead of square pixels. Because the pixels are taller than they are wide, a frame of DV video has dimensions of 720x480 pixels, which is a 3:2 pixel ratio but displays on a television monitor as 4:3.
This difference in pixel ratios can cause a problem when creating graphics in external programs. If you just create your graphics at the proper size (720x480) with square pixels, the image will be squashed horizontally when you view the finished video on tv - this is most apparent when you have circular graphics which become oval on the tv.
There are two ways to deal with this. The traditional way is to create your graphics at 720x540 (a 4:3 ratio), then once you are done scale the image to 720x480 - this will squash the image vertically, but it will appear correct on a television.
If you have upgraded to the latest version of Photoshop (Photoshop CS) there is a new option which lets you set a different pixel aspect ratio. Create your image at 720x480, then from the main menu select Image>Pixel Aspect Ratio>D1/DV NTSC (0.9). This will give you the proper rectangular pixels, and Photoshop will automatically squash them back to square so that you can view the image in it's normal aspect ratio. To see the actual rectangular pixel image, from the main menu select View>Pixel Aspect Ratio Correction. Your image should appear stretched horizontally - but it will look right on tv.
Using Illustrator with AE
For the most part, Illustrator files work just like Photoshop files - you can choose to import individual or merged layers, or you can maintain the layers and impost the file as a composition. The one significant difference is that Illustrator uses vectors to describe images (see my notes on supported file types
for a discussion of the differences between bitmap and vector files). to get the maximum quality from vectors (and to take advantage of their resolution independence) you need to make sure that your vector layers are set to "continuously rasterize" - this means AE recalculates the vectors on each frame to maintain full resolution. Each vector layer has a switch which looks like a sun or light (between the preview quality and 'shy' switches). When this switch has a hollow center (the default setting) the layer is rasterized only once - which means if you scale it up you will see pixelated edges. When the switch is solid the image will be continuously rasterized and will look good no matter how large you scale it.
You may notice that your vector images still have jagged edges even when they are continously rasterized - this is because the default preview setting does not anti-alias the vector edges. Click the preview quality switch to toggle it from the jagged diagonal line to the smooth one and your layer should smooth out nicely.