Tuesday, August 28, 2012

The Digital Illustration Edge


When it comes to creating illustrated imagery, one type of element that is important in every illustration, and is often taken for granted is an edge. In the non-digital illustration world edges are created by the physical use of an art material, but in the digital world, edges must be created in a virtual way to simulate a non-digital visual appearance. Image software programs like Adobe Photoshop provide both automated and user defined ways to manipulate an edge. So, as is the case with every aspect of a digital image, the illustrator has the ability to influence the look of edges in their work. It’s helpful to know how digital edges are rendered and displayed.

Anti-Aliasing

A good explanation of anti-aliasing begins with a good description of display aliasing. Basically, aliasing is a jagged or stair-step appearance that is caused by a lack of resolution either by restrictions in a hardware device, such as a display, or file size limitations in a raster-based document. Anti-aliasing is the technique software designers have adapted to reduce or eliminate jagged edges by fooling the eye of the viewer. This is done by creating a diminishing series of shading steps between the edges of adjacent colors. See Below. Anti-aliasing is also referred to as “smoothing”.

Closeup of aliased stair step in red, anti-aliased smoothing in blue.

Aliased mountain rendering. © 2012 Don Arday.
Anti-aliased mountain rendering. © 2012 Don Arday.
Closeup of the anti-aliased edge of a rose petal.

Interpolation

Anti-aliasing occurs through the interpolation of picture elements, “pixels”. Think of interpolation as swapping and sharing. To improve the digital visual appearance of an image on our monitor the technique of interpolation is used. Let’s refer to the data in an image as a sample. To make the image display better, the computer converts the image to a higher sample by using filtering techniques like anti-aliasing. It may be no coincidence that the word interpolation bears a resemblance to interpretation, because that is sort of what occurs within anti-aliasing. The software in the case of a document, or the computer video card in the case of the display, interprets the color relationships when attempting to create a smooth transition between one color and another to render edge pixels. This generally occurs automatically, but illustrators can use manual methods to control the appearance of edges within their illustrations.

Dithering

Dithering is often confused with anti-aliasing, but it is actually something quite different. Dithering most often occurs in color image situations where colors in an image are out of the range of the colors available in an image display or output device. When this occurs the software program creates the unavailable color by mixing other colors that are available. For example, dithering can occurs when a particular web browser does not support a specified color. The browser will then attempt to mix the requested color by “dithering” pixels by using a combination of other colors it can produce.  Although usually invisible to the naked eye, dithering is done in the same manner as “noise” is, (see below) and like noise, it can appear slightly grainy in the extreme.

Some Manual Techniques

Feathering
Feathering is the softening of edges of adjacent shapes and colors within an image beyond the standard level of interpolation. Adobe Photoshop gives you the option to feathering selection edges in an image. A feathered edge results in increased edge blurring and a lowering of edge contrast between colors. With feathering, the artist has the ability to control the number of pixels to be included in a feathered edge. The result of feathering is similar to that of Gaussian blur. (See below.)

Gaussian Blur
Using Gaussian blur, or any of the other blur options in raster programs, means to force adjacent colors to drift into one and other creating a smoother edge transition. Colors in a Gaussian blur drift in a randomly distributed, non-linear manner. A motion blur option of the Gaussian blur limits the random color distribution to a particular direction. Blur can be used to redefine edges, and it can also be used to control the amount of focus in an image.

Gaussian blur applied to complimentary colors.
Gaussian blur closeup.

Noise
Although a controllable option in Photoshop, and a very useful one, noise, and specifically random pixel noise is not necessarily thought of a s a good thing. Pixel noise is an unnatural, or unwanted, variation of value or color information in an image. Noise has a tendency to degrade sharp edges within an image by producing a scattered effect of random colored pixels. So a yellow flower against a blue sky may end up with blue pixels mixed among the yellow ones. And the flower and the blue sky might both have red pixels scattered in as well. See below. Photographers generally find noise to be very disturbing, however for the illustrator it may help to produce a desired, even naturalistic color effect. Noise is best applied as a final stage before publishing an illustration. And once saved an illustration that has had noise added is permanently altered, so it is always best to save your illustration prior to using noise, then save the noise applied version as a separate file.

Noise applied. Note the addition of other color pixels to the original pair
of complimentary colors.
Noise closeup.

Sharpening
The three techniques discussed above can produce a smoothing appearance to an edge, but they also degrade its sharpness. Using a sharpening filter or “Unsharp Mask” in Photoshop can give the appearance of actually sharpening edges. Sharpen filters identify where dark and light edges meet in an image, and add contrast to those edges. The filter does this by creating an even darker line along the edge of a dark shape, and also a lighter line on the edge of an adjacent light shape. Unsharp Mask tends to move edges away from an anti-aliased appearance, and taken to far, sharpening can produce a very unnatural looking halo around shapes. See below. Sharpening like noise is best applied as a final stage before publishing an illustration.

Edge sharpening applied. Note the increased contrast at the edges of
the two colors.
Edge sharpening closeup.

There are also some techniques in Photoshop for working with edges that rely on methods of selection like “Refine Edge” and “Fringe”, but the result of any of those actions uses the above basic methods of rendering.

By understanding how digital image edges are rendered and by using these manual options for refining them, you will have greater control over the appearance of your illustration either in print or on the monitor.