Real-World Blends

Today's Best Tech Deals

Picked by Macworld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

Those of us who spend too much time staring at cathode-ray tubes can always benefit from an occasional glimpse of real life. So if you can bear to wrench your eyes away from this article, turn and look at the nearest wall–you may have to stand up and peer over your cubicle to find one. Chances are you'll see a single color of paint coating some portion of that wall. And yet you'll notice that the surface comprises a myriad of shades, with the brightest shades near the light source and the darkest ones far away. In the natural world, gradual color transitions are the norm; solid colors are something we never actually witness.

So it's hardly surprising that a solid color applied in Adobe Illustrator or a similar vector program looks altogether synthetic. Images need subtle variations of color to look natural. Illustrator's Gradient palette can spice things up by applying multiple shades and colors, but the resulting transitions are unnaturally regular and don't respond to an object's shape. A better solution is to create custom blends, gradual color transitions between two or more hand-drawn paths. Custom blends give you more control over the shape and speed of your gradients. When you're finished, place the blends inside a mask to adopt an object's shape, and you're on your way to photo-realistic art. (For tips on creating blends, see the sidebar "Perfect Blends.")

While custom blends have been possible for more than a decade–originally popping up in Illustrator's 1988 edition–Illustrator 8 greatly expanded their features. Blends are now live, updating dynamically when you edit the source paths. This ensures that you can edit a blend without having to start from scratch each time. You can blend three or more paths at a time, creating complex blends that taper gently at the beginning and end. For more-dramatic coloring, you can also blend paths that contain gradient fills, a perfect technique for simulating chrome and other complicated color transitions. Best of all, you can attach the blend to a curve, which means you can precisely mold a color transition to the surface of a rounded object.

For a different effect, Illustrator 8 also provides a Gradient Mesh tool that lets you add points of color inside a shape (see the sidebar "Working with the Gradient Mesh Tool"). Though ultimately less flexible than blending–it can't control the shape of a key color as a blend can, for example–the Gradient Mesh tool does offer the advantages of speed and ease of use.

Be forewarned–creating good, realistic blends is no piece of cake. Even with these added features, blends remain one of the trickiest members of Illustrator 8's arsenal. If you've never experimented with blends before, give yourself some latitude–like sketching with a pencil, getting shading exactly right takes time and patience. But if you're an experienced blender, get ready to take your skills to the next level. Illustrator 8 has the power to create color transitions once all but impossible within a vector-based drawing program.

April 2000 page: 102

Illustrator 8's blend feature ALLOWS you to create gradients that conform to an object's exact contours. Although the concept is fairly straightforward–you essentially draw two paths marking the beginning and ending of the blend and then tell Illustrator to interpolate them– perfecting a blend is anything but simple. Blending is rife with parameters, so many that it's surprising when something doesn't go wrong. Fortunately, a little bit of blending theory goes a long way toward learning how to anticipate, decipher, and remedy problems.

Consider the example of the Ping-Pong paddle to the right. I've used automatic gradients to shade the handle, and custom blends to add shadows inside and behind the ball. In the following steps, I'll show you how to shade the paddle's red pad. I could apply a linear gradient, but a blend will result in a more naturalistic effect.

   To begin, create the first (A) and last (B) paths in the blend and fill them as desired. As a general rule, paths should echo the contours of the shape you are filling. For best results, these two key paths should contain an equal number of points and should not be stroked. To blend them, select both paths and press command-option-B (or under the Object menu, choose Blends and then Make).

TIP: Notice that I've avoided overlapping the ball shadow (outlined in black) and the paddle blend. The effect may be less realistic than you'd like, but mixing blends requires so much effort and attention to minute detail that I avoid it at all costs.

   The downside of Illustrator's blends is that you can't control their speed. The distribution of colors between two paths plods along uniformly from beginning to end. If you want to taper the gradient--say, fade it quickly at the outset and then more slowly toward the end--you have to add an intermediary path (C) . The easiest way to do this is to clone one of the existing key paths. Because the stacking order of paths affects blending, always clone the path just behind the one you want to add. In this case I've cloned path A. Modify the fill of the new path to create the desired blend.

TIP: Illustrator creates an invisible path--called a spine--that runs perpendicular to the blend. (To see it, switch to Artwork mode by pressing command-Y.) Each point in the spine controls the position of a path; adjusting the points repositions the corresponding paths. By default, the spine's segments are straight, which can make your blend look choppy. To smooth out transitions, use the Convert Point tool to convert the spine's corner points to smooth ones. This often has the added effect of making the blend more closely follow the contour of a path.

   If you are still not satisfied with a blend's appearance, adjust the orientation of the paths along the spine. First make sure you've selected the blend; then go to the Blends submenu under the Object menu. Choose Blend Options and select the second orientation button. This spreads the paths along the spine as if they were slats in a fan. Oddly, the fan centers on the spine, so the blend has a tendency to pivot around the spine like a propeller. Taking this into account, I enlarged the paths and moved the spine to the bottom of the paddle.

   Now that you've created the blend, you need to apply it to the object: in this case, the paddle's red pad. To do this, select the shape and press command-X to cut it. Then select the blend and press command-F to paste the shape in front. While holding down the shift key, select both the shape and the blend and press command-7 (or under the Object menu, select Masks and then Make) to mask the blend with the shape. Unfortunately, this has the added effect of removing the fill and stroke from the shape. To reinstate these attributes, select just the shape with the Direct Selection tool and reapply the desired settings.

Illustrator's Gradient Mesh tool lets you add points of color to a fill, and then it blends them. While it provides no method for constructing specific shape blends, a gradient mesh comes in handy for adding indefinite highlights and shadows. For example, in his photo-realistic rendering of the John Deere logo, graphic artist Brad Neal relied on standard blends to shade the deer icon and the wedge-shaped highlight in the upper-left corner of the name plate. The rest of the name plate requires generalized color transitions, making a gradient mesh the perfect choice.

   Neal started by selecting the name plate and filling it with a radial gradient. The gradient comprised four progressively darker shades of green, as seen in the Gradient palette on the right.

   Next, Neal converted the radial gradient to a mesh by choosing the Expand command from the Object menu. To make sure he converted only the fill colors, he turned off the Stroke check box; then he selected the Gradient Mesh radio button. The result was a target of four concentric circles, each representing a ring of color in the radial gradient.

   The Expand command placed the mesh target inside a mask, permitting Neal to modify the gradient independent of the name plate. Using the Direct Selection tool, he deselected the name plate and selected the gradient mesh target on its own. He then used the Rotate and Scale tools to transform and position the target to better suit his needs.

   To add more points of color to the gradient, Neal selected the Gradient Mesh tool and clicked a total of five times along the upper-right perimeter of the target. Illustrator added a series of five lines to the target, radiating outward from the target's center. The five lines intersect the four concentric rings, resulting in 20 new points of color.

   From there, it was just a matter of changing the colors of the points and moving them into position. Using the Direct Selection tool, Neal selected and dragged points within the mesh target. (These points and connecting segments behave just like standard paths--you can drag points and control handles, and you can even select multiple points by shift-clicking on them.) Once he'd selected the points, Neal changed their colors from the Color palette. With very little tweaking, he was able to add a credible highlight to the name plate's upper-right corner.

1 2 Page 1
Page 1 of 2
Shop Tech Products at Amazon