Using Gradient Mesh
Gradients, which are covered in detail in Chapter 6, allow you to fill an object with gradations of color that blend into each other. Although these gradients are certainly useful, they are limited from a creative standpoint because they can be used only in linear or radial forms. In Illustrator 8, Adobe introduced a radical new feature called Gradient Mesh, an incredible tool that allows you to create gradients in any shape. The result is artwork that looks as if it had come right from Photoshop—yet it is all in vector form using the Gradient Mesh tool (Figure 4.53). And if you can achieve the appearance you're looking for while keeping your file in vector form, you can keep your art completely scalable and editable throughout the design process. For example, changing one color in a gradient mesh is far easier than trying to replace a color that's used in a Photoshop file.
Figure 4.53 Illustrator Cheryl Graham uses the Gradient Mesh feature to create photorealistic clouds that are scalable to virtually any size.
However, the Gradient Mesh tool (U) isn't the easiest feature to understand. Many people would like to use the feature, but they can't figure out any consistent way to explain its behavior. This section will help you understand what a gradient mesh is and how it works.
Before you learn how to apply a gradient mesh, let's talk about what a mesh is. A mesh is a grid consisting of multiple mesh points that act much like smooth anchor points (Figure 4.54). You can adjust each of these points (and their control handles) to control the shape of the mesh. A mesh is really a special kind of construct or object in Illustrator, and it does not act like a regular path does. Mesh objects do not have normal fill or stroke attributes and can't display certain kinds of live effects. Rather, you use mesh objects to contain two kinds of attributes in Illustrator: gradients and envelopes (envelopes were covered in Chapter 2, "Selecting and Editing Artwork"). When you're using a mesh to define a gradient, each mesh point determines a change in color, and the control handles for each point determine the way in which that color blends into other nearby colors.
Figure 4.54 A mesh is a grid that consists of mesh points and control handles.
You can create a gradient mesh object in Illustrator in two basic ways, and in both cases, you start by first drawing a regular vector object. You don't draw gradient mesh objects from scratch in Illustrator; you convert existing vector shapes to mesh objects. With a vector object selected, do one of the following:
- Choose Object > Create Gradient Mesh. This opens the Create Gradient Mesh dialog box, giving you the ability to specify the number of rows and columns in your mesh ( Figure 4.55, on the next page). If your original object already has a color applied to it, you can use the Appearance and Highlight options to shade the object with white.
Figure 4.55 Choosing the number of rows and columns determines the number of mesh points in your mesh. You can always add or remove mesh points later.
- Select the Mesh tool from the Tools panel, and click anywhere within your vector path. Each click with the Mesh tool adds mesh points to the mesh object. You'll also notice that as you add mesh points to an object, the paths connecting the mesh points match the contours of the object.
Once you have mesh points defined, you can switch to the Direct Selection tool and select each individual mesh point to adjust its position and its direction handles. With a mesh point selected, you can choose a color from the Swatches or Color panel to define the color for that point. You can also change the opacity of a selected mesh point using the Transparency or Control panels. As needed, you can switch back to the Mesh tool and click to add mesh points. To remove a mesh point from a mesh object, hold the Option (Alt) key while clicking a point with the Mesh tool.