If you compare an image created in Director's Paint window with a similar image created in Photoshop, you'll see a striking difference. In the image created in Director, the diagonal and curved lines display a stair-step effect referred to as jaggies. In the image created in Photoshop, the same diagonal and curved lines appear smooth (Figure 8.26).
The superior quality of the Photoshop image results from a visual trick called anti-aliasing. Anti-aliasing is a careful blending of the foreground and background colors with intermediate colors in a way that fools the eye into seeing smooth lines and curves (Figure 8.27). Photoshop does an excellent job of anti-aliasing, while Director's Paint window doesn't do it at all.
Anti-aliasing is handled differently with vector images than with bitmapped images. When Director displays a vector image, it performs anti-aliasing in real time while the image is on the screen. With a bitmapped image, however, the anti-aliasing is done at the time the image is created, and the color-blended pixels are stored as part of the image file.
Although anti-aliasing greatly improves the appearance of bitmapped images, it can make compositing difficult in Director. If you create an image on a white background in Photoshop, import it into Director, and apply the Background Transparent or Matte ink effect, you may see a white halo around the sprite (Figure 8.28). This occurs because when the ink effect turns the pixels of the white background transparent, it ignores the blended-color pixels around the edges.
There are two basic ways to eliminate the halo. One is to create and use an ink mask; the other is to edit or re-create the anti-aliased cast member. Each of these solutions has several variations. All require time and effort, butunless you choose to eliminate anti-aliasing entirelyall yield good-looking results. Choose the method that best fits your particular situation and your preferred way of working.
Create an 8-bit ink mask for the haloed cast member according to the steps in "To create and use an ink mask," earlier in this chapter.
In the mask, make the background solid white and the interior of the cast member solid black, but leave the anti-aliased edges as shades of gray (Figure 8.29).
If you haven't done so already, create a sprite from the cast member.
Apply the Mask ink effect to the sprite.
The blended gray edges in the ink mask will largely cancel out the blended colors in the halo (Figure 8.30).
Re-create the cast member from scratch, without anti-aliasing.
You can do this in Director's Paint window (which has no anti-aliasing capability), or you can do it in an external program such as Photoshop by turning off anti-aliasing for each of the tools you use.
or
Re-create the cast member in an external program, anti-aliased against a colored background. The color of the background should be similar to the color or colors that the sprite will be composited with in Director (Figure 8.31).
or
Re-create the cast member in an external program, anti-aliased against a transparent background, and save it as a 32-bit image with an alpha channel. (For more on alpha channels, see the following section, "Working with Alpha Channels.")
Reimport the cast member into Director.
Create a sprite from the cast member.
Apply the Background Transparent or Matte ink effect to the sprite (Figure 8.32).
The three options in step 1 are included for the sake of completeness, but you probably won't want to use the first one. There's no good reason to eliminate anti-aliasing entirely, unless you happen to like jaggies.
The second optionanti-aliasing against a colored backgrounddoes not yield results as good as the third. However, it does add less data to your Director movie. That's because the second option allows you to save the cast member as an 8-bit file, while the third option requires a 32-bit file. (All other things being equal, an 8-bit file is only one-quarter the size of a 32-bit file.)