Join Chris Meyer for an in-depth discussion in this video Illustrator artboards, part of After Effects Hidden Gems.
- [Voiceover] In last week's hidden gem, we explained how and why After Effects re-samples layers. Which can added unwanted and anti-aliasing. This week, I'll explore how Illustrator files are treated differently by After Effects, when you use the video and film templates. First, let's cover how After Effects normally renders an Illustrator file created without using a template. I made this file 1920x1080 in size, and by default, Illustrator creates a file with one artboard.
Note that my star, which is 2000 pixels square, spills out onto the paceboard. Let's import this into After Effects as a composition. I'll select my file, and I'll import it as a composition, with the Retain Layer Sizes option. Open the composition and let's set the background color to white so we can see it. You'll notice my file size is correct. And I would have to set the duration to whatever I needed to be, but that's not important. I'll click OK. And everything is appearing on nice, whole pixels.
And if I look in the Project panel, the size of the star there is 2040 square, which includes the stroke. If I zoom in on my star, I can see I have a nice, sharp edge. Unfortunately, because this file was created with just one artboard in Illustrator, when I move my layer, any imagery on the paceboard is cropped off, even though the layer appears to be the correct size. I'll undo. Fortunately, there is a way to avoid this. Awhile back, Illustrator added templates for video and film.
That allowed layers to bleed onto the paceboard. And it does this by using two artboards. But to use these templates, you will need to make a little fix. Let me show you what goes wrong if you don't, with another version of the same file. In this version, I have two artboards. And I also have another layer. I created this version by using a video and film template. So try selecting a new file, set the profile to Video and Film. While you can select any preset, I used HDTV 1080.
There are other options here. For instance, you can turn off the grid if you don't need it. And even though it says that the number of artboards will be 1, if I click OK, and create a new file, you can see that two artboards are created automatically. The first artboard sets the size of the composition in After Effects. The second artboard is much larger. This second artboard is what allows After Effects to use imagery that's on the paceboard. Let's return to the file I created earlier since it has some content.
But it was created the same way. So long as you import this file into After Effects as a composition, and you have at least two layers, any layers that spill over onto the paceboard, like the star, will not be cropped off. Note that my star is also 2000 pixels square, with a 20 pixel stroke. And it sits on whole pixels on X and Y. You can even place layers on the paceboard that won't be seen initially, but they'll appear as layers in After Effects, and you can animate them onscreen later in the animation.
Let's see how that works in After Effects. We'll double click to import, and this time select the version with two artboards, created with the video template. I'll also import this as a composition. Click Open, and we'll open this composition. Set the background color to white again so we can see our stroke. But when I zoom in, notice my star is anti-aliased. It's not sharp. So let's check the obvious culprits, my anchor point and position values. And they're both on half pixels.
If you remember, it should make them sharp, but not in this case. In the Project panel, when I compare sizes, I can select my star there, and I can see it's at 2041 width and height, not 2040, like it should be. So this anomaly will drive you crazy. Fortunately, it's pretty easy to fix. And while it's best to fix it before you even import the file, you can do it later. Select the star layer, and Edit, Edit Original.
This will open the same file in Illustrator, and After Effects is now watching it to see if you change it. First, let's check out artboard 1. We'll open Artboard Options, and it tells me the width and height is correct. And the center is at 960x540. So that all looks good. The second artboard is set to the magic size of 14,400 pixels wide and high. The second artboard must be this size to trigger After Effects into not cropping off layers.
However, notice that the X and Y values are on a half pixel. I've no idea why this is, but this half pixel causes layers in After Effects to re-sample. So remove the half pixel on the X and Y, click OK, and be sure to save the file before returning to After Effects. That forces After Effects to reload it. Now, at first, you might think that nothing's happened because you still see anti-aliasing. However, in the Project panel, the layer shows a size of 2040 square.
And the anchor point is also on a whole pixel. However, After Effects will not update the position values. It never does this when you edit a file externally. So you will need to move all of the layers by a half pixel. Fortunately, this is also easy to fix. First, set the magnification to 200%. Let's select all the layers and look at their position values. So at 200%, I can use the cursor keys to nudge them a half pixel to the right and a half pixel down.
And if I fix my star, I know that all of the selected layers have also been fixed. And we zoom back so that I can show you that as I drag the star, none of the pixels are getting cropped off. Also, this layer that I had out on the paceboard can be animated in at any time. Of course now that you know about this problem, you should fix Artboard 2 before you even import the file. Or if you haven't done any editing, it might be just easier to import again. Okay, so that was more of a gotcha.
Where is the hidden gem? How about the fact that you can add this magic second artboard to any Illustrator file. If you remember our first file, it only had one artboard, and the star was being cropped off. I'll select the star layer and Edit Original, which opens this file in Illustrator, with After Effects watching it. In the Artboards panel, I'll click the New Artboard button, and in the Options dialogue, be sure to use the magic size of 14,400 in the width and the same value in the height.
And you want to set the X and Y values for the reference point center to match Artboard 1. We'll click OK and you can see that this is the second artboard, and Artboard 1 will continue to be our After Effects composition size. Don't forget to save your file, and when you return to After Effects, the star will no longer be cropped off. With this version, I don't have to fix the position values, because it only had one artboard originally. So, to sum up, if you use a video and film template in Illustrator, be sure to edit the centerpoint for Artboard 2 so that it matches Artboard 1.
And remember to avoid layers being cropped off in After Effects, the file must have at least two layers. And it must be imported as a composition. And finally, you can add the second artboard to an existing Illustrator file. So that's it! I hope some of these tips were useful.
- Setting the vertex point
- Creating swarms of object
- Replacing layers without losing effects and animation
- Simplifying projects
- Hiding layers
- And more…
Skill Level Intermediate
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.