Achieving Photorealism with Gradient Mesh


As you learned back in Chapter 2, Vectors 101, gradients 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 only be used 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 results are painterly effects that look as if they had come right out of Photoshopyet they are all in vector form using the gradient mesh feature. 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.

However, the Gradient Mesh tool 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. Hopefully, this section will help you understand what a gradient mesh is and how it works.

Be sure to check out Yukio Miyamoto's examples using the Gradient Mesh tool in the color insert.



Before you learn how gradients are applied, let's talk about what a mesh is. A mesh is a grid made up of multiple anchor points, called mesh points (Figure 5.26). You can pull or adjust each of these anchor points 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. We'll talk more about Envelopes in Chapter 9, Graphs, Distortion, and Blends. When you're using a mesh to define a gradient, each mesh point determines a color stop and the way in which that color blends into other colors.

Figure 5.26. A mesh is a grid that is made up of paths and mesh points.


Creating and Editing a Gradient Mesh Object

To create a Gradient Mesh object, choose the Mesh tool from the Toolbox and click any vector path in your document. You don't draw Gradient Mesh objects from scratch in Illustrator; you convert existing vector shapes to mesh objects. Each click with the Mesh tool adds additional mesh points to the mesh object. You'll also notice that as you add mesh points to an object, the paths that connect the mesh points match the contours of the object (Figure 5.27, next page).

Figure 5.27. In this example of using a circle, notice how the mesh points that are added create curved paths, not straight ones.


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 (Figure 5.28). With a mesh point selected, you can choose a color from the Control, Swatches, or Color palette to define the color for that point. Each mesh point can contain only one color. Each mesh point's direction handles and paths define how its color blends with other colors from other mesh points (Figure 5.29). As needed, you can switch back to the Mesh tool and click to add additional mesh points.

Figure 5.28. Editing a mesh point is no different than editing an anchor point.


Figure 5.29. The paths that connect the mesh points define how colors blend and the shapes and contours of the gradient.


You can also create a gradient mesh from an existing vector object. With the object selected, choose Object > Create Gradient Mesh. You can then choose how many rows or columns you want in the mesh, and if the object is filled with a color, you can specify a highlight towards the center or the edge of the object. Once the gradient mesh is created, you can continue to tweak it using the methods mentioned previously.

If you converted a path to a mesh object and then want to get the path back, you can select the mesh object and use the Offset Path function with a setting of 0. This creates a new path that you can edit and color as you wish.






Real World Adobe Illustrator CS2
Real World Adobe Illustrator CS2
ISBN: 0321337026
EAN: 2147483647
Year: 2003
Pages: 147
Authors: Mordy Golding

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net