Downloaded from www.biorust.com on Sat Nov 21, 2009 09:40:05

 
Gradient Meshes Introduction
Tutorial Author - bedlam123 (http://forums.biorust.com/member.php?userid=5021)

Mastery of Illustrator's gradient mesh functionality is the holy grail of vector graphic design.  Although difficult to learn and time consuming to set up, gradient meshes can give your vector images an illusion of photorealism and detail that will bring your artwork to new levels of excellence. This introduction will take you through the basics of gradient mesh design and give you pointers on more advanced aspects to explore.  

 

The Basics
The Gradient Mesh tool is not an easy tool to master. Getting the results that you want may require more than just a little practice. However, the tool can help you get amazing results. Before beginning this tutorial, please make certain you are familiar with all basic operations in Illustrator, particularly the Pen tool, Color Swatches, and understand the idea of shading and highlights - it will help you greatly later on.

It's important to recognize the various parts of the gradient mesh. As shown in the image following, the different parts of the gradient mesh are:

  • Mesh Lines: These are straight (or curved) lines which can be used to change the shape of the object or the direction of the color. Mesh lines are added in a few different ways which we will learn about later. They are moved using their control points just like moving other lines in Illustrator.
  • Mesh Points: Mesh points are the basis of the mesh. They control where color is placed, what direction it goes in, and the overall shape of the mesh. Mesh points are also the place where the mesh lines intersect. At these points you can add color that will radiate out from the point to the surrounding parts of the mesh. You can select, move and delete these mesh points which will move the color around throughout the mesh or alter the shape of the mesh.
  • Mesh Patch: This is the section within the four mesh points. You can add color to the mesh patch that will radiate out from within to the surrounding areas.
  • Control Lines: These are the lines which control the curve of the mesh lines, and the amount of color applied to both a patch and a mesh point. These lines are selected and moved like all other curves and lines in Illustrator.

How color is added to the mesh, and moving the control points and lines is covered later in the tutorial. For the time being, however, we will detail more basic aspects of mesh creation...



Creating the Shape for the Mesh
Open Illustrator and create a new document selecting the standard letter size document (8.5 x 11 inches) in portrait mode, with RGB Color. For me, turning off the tiling and art board keep me from becoming distracted, and that is usually one of the very first things that I do (But you do not need to do it to complete this tutorial if you prefer it to be visible). Delete any unused swatches in your color palette because we will be building a palette of color swatches. There should be no color swatches left except for black and white.

Be sure your color picker palette is visible, along with your layers and swatches palettes. Chose a base color for your shape, which will be the basis for the colors in your image. For the balloon we are making, I selected a baby pink. Add it to your swatches palette since we will be using it often once we start adding the mesh. With your newly created color selected as the foreground color, begin drawing the basic shape of the balloon as shown in the image to the right.

You can create the balloon using whatever tool and method works well for you. However, if a shape is going to be turned into a gradient mesh, I found that the pen tool works best because of the smooth lines and simple points it creates. Go ahead and zoom in on your page whenever necessary.  The balloon and the string should actually be separate shapes. They are outlined with a 1 point stroke of black so you can see it easier, but you should not use a stroke on the image you are creating.

When working with detailed, complex images, it is better to use separate shapes that you can layer than try to fit everything into one big mesh. Smaller shapes result in a more controlled environment. How many shapes you use in your image depends on exactly how complex you want the shape and color of your final image. Right now we are not concerned with the finer details of the image, various shades of colors or the exact shape - Let’s just get the basic shape, layout and idea of the image down.

This step is one of the most important steps in working with gradient meshes. Select your entire image (using the Select all option from the menu), and make a duplicate of it. Place it on a separate layer, hide, and lock the layer. Name the layer according to whatever method you use. This is your backup should you need to revert to it. You could save it to a new file, but having it in the same file makes it really handy if you need it later.

REMEMBER once you create the gradient mesh, you will not be able to go back to the “unmeshed” version of your image. Sometimes you may find that you need to abandon the mesh and start over with your basic shape. If your shape is a difficult one to make, or an odd shape, this could be very discouraging. Creating a backup of your original shapes and image before starting to add the mesh will save you many hours of work and frustration.



Adding the Gradient Mesh to your Shape
There are three rules to keep in mind when working with gradient meshes:
  1. It’s easier to ADD than delete. This is important when making your mesh; too many mesh points can be a confusing, jumbled mess.
  2. Don’t be in a rush! Stop and look at your image after each mesh point is added. Sometimes you will find that the last point you added was perfect in color and placement and nothing more needs to be done. You don’t want to overdo it, or miss the perfect point and end up with a muddled mess of color and mesh.
  3. Edit > Undo is your friend. When meshing, have one hand on the mouse, and the other on the undo key. You could drop in a mesh point, or set a color that is all wrong and have to undo it. You might drop in multiple mesh lines, only to find that they’re all wrong, and all you need to do is just undo back.

With these points in mind, there is more than one way to create mesh objects:

Select your object and go to “Object --> Create gradient mesh”. Then adjust the settings in the dialog box (as shown to the left).

OR

Press the "U" Key on your keyboard to bring up the gradient mesh tool, or click the gradient mesh tool in the toolbox as shown on the right and click the shape one by one to add mesh points.

Using the create gradient mesh option often places mesh points where they aren’t wanted. It then becomes difficult to manipulate and move them later. If you add the mesh points manually you have more control over exactly where the points go, and the colors of each point. Adding mesh points one by one allows you to start small with only the minimum lines you need to get the coloring and shading accurate, and then add more points and lines when needed.


Ready, Set, Go!!
First, make a few more color swatches that will be the highlights and shadows in our image. We will be using these as we lay down some of the mesh. I made the following swatches using the color picker and RGB Color mode: (from Left to Right) 242, 183, 208 (baby pink), 242, 227, 233 (light pink), 175, 47, 121 (dark pink), 221, 76, 138 (medium pink).

Take a good look at your image and visually decide where the highlights and shadows fall. These will be the places where you will add mesh points and colors that will make the image more "lifelike".

Using the mouse, click on the mesh button in your toolbar (or press the letter "U" on your keyboard) and hover your cursor over the balloon. Do you see the plus (+) sign? That sign indicates that you're ready to place a mesh point where your cursor is. Select the medium pink color as your foreground and click along the horizontal line at the top of the balloon towards the right. This will add a vertical mesh line that follows the natural curve of the shape and extends the length of the balloon. Deselect the image.

Next, select the light pink swatch as your foreground color and add a second mesh point. Click on the same horizontal line at the top of the balloon, but a bit to the left of the first line. You will see a second vertical line created.

Repeat this process, alternating medium and light pink swatches until you have a total of four vertical mesh lines. If you place a mesh point in the wrong place, you can use the Undo command, or click on the point you just placed using the direct selection tool and delete it.

With the medium pink color selected as your foreground color, click just below the middle point on the right side of the image. Be sure to click on the outline of the balloon. This will add a horizontal mesh line that will extend the width of the image and follow the angle of the area where we are placing the point.

Click a second time just a bit above the first mesh point you added (above the center point of the balloon), thereby placing a mesh line towards the top half.



Click one more time in the middle of the balloon and add a third mesh line in the middle. The lines are following the angle of the curves of the shape.

Whenever you are adding mesh points, keep in mind the location of the point, what is around it and the direction you want the color to go in. If you click on an empty area of a shape, the mesh line will extend horizontally and vertically, and if you click on an existing point (either on a mesh line or an anchor point), the mesh line will extend perpendicular to the existing line. The lines follow the general direction of the shape, and angles of the curves. Sometimes the lines will seem to do crazy things and go in the opposite direction of where you want or expect.

Deselect your mesh object. As shown in the image, the color extends through the top half of the balloon. Given that the color is a gradient, it is strong at one part (in this case, the mesh point), and gradually lightens as it extends out. Since the shape is long, and the start of the color is at the top, it doesn't extend as far down as the bottom. If we want the color to appear in the bottom half of the balloon, we need to add color to the mesh points along the bottom. There are a few different ways to add color to a mesh that has already been placed.

One way is to click on a mesh point with the direct selection tool and then click the color you want that mesh point to be. You can also add color as we did above, by selecting the color before placing the mesh point. Another way to add color is to select a color swatch and drag and drop it to the mesh patch (the space between the lines). This will add the color in the patch and it will radiate out. We will now colorize the bottom half of the balloon so it matches the top half.

Select the balloon and locate two mesh points at the top of the balloon that are light pink. Follow the lines visually to the bottom of the image and select them. To select both points, first click one, then shift + click the second one. With the two mesh points selected, click the light pink color swatch in your palette. The lines will change to light pink. Repeat this same procedure with the medium pink color and the other two mesh points. The end result should look similar to the image below.

There is more than one way to select mesh points. Click on them with the direct select tool, and use the Shift + Click option to select more then one; use the direct select tool to draw a box around a bunch of mesh points to select them all; or, you can use the lasso tool to draw a custom "lasso" around mesh points. The Lasso tool is useful when working with a mesh that has a lot of tightly packed mesh points. Don’t forget---use your zoom tool whenever necessary to get in real close.

Ta Dah! You have completed the first half of creating an image using the gradient mesh. The image doesn't look finished yet, but it will as soon as we add more color, and shading. There are a few important points that should be reviewed before continuing this tutorial. Clicking an empty area of a shape will add a mesh point with lines that extend horizontally and vertically, following the general shape of the image. Clicking an existing point will add a line that extends perpendicular (either horizontally OR vertically) to the existing line.

When placing mesh points, keep in mind the general location where you want to add the highlights or shadows, and using the colors (light or dark), place the mesh points accordingly.
Now let’s add some shadows to make the image more lifelike.



Bringing the Image to Life
The first thing to do is add another color to our swatch palette. Using the color picker, create a burgundy pink color. I used RGB 114, 0, 5. That may be a bit too dark for your tastes, so feel free to adjust it as you see fit. Once you've mixed this color, drag it to your swatch palette for handy use.

Click the upper right point of the balloon with the direct selection tool to select that mesh point. Then click the swatch of the new color we just created (burgundy color). As you can see from the image the edge of the balloon was accentuated with the very dark pink color. However, it does not extend the length of the image. This is due to the placement of the point. The way to fix this is to add more points along the edge of the drape that you can add color to.

With the mesh tool selected, and the very dark pink selected as the foreground color, click on the right edge of the balloon to add the dark color and mesh points the length of the image. You will notice that this places horizontal lines across the balloon, and that it also extends the dark color down the edge of the image as well. This is exactly what we want.

Take a look at your image; do we need to add more vertical or horizontal mesh points? To get a lifelike appearance, add where you think necessary.

There are a lot of vertical mesh points. The reason for this is that not only would do we need a dark color; we need a midtone as well. Therefore, add enough lines to allow you to add the very dark color, and the dark pink that we have in the swatch palette. Don't worry if you don't add the exact amount of mesh points that I do, or in the exact same spot, the main thing here is to add enough lines to be able to add the proper coloring and shading that is needed.

Experiment with placing mesh points in various places, using various colors on different mesh points, sometimes the best results come from accidents and trial & error.

Next, adjust the colors of the vertical lines by adding the burgundy, dark pink, and light pink to shape the highlights and shadows. Using the direct select tool, click on all the mesh points in a single vertical line on the top half only of the balloon. Then click on the colors in your color palette accordingly to add light, medium and dark shades to the balloon as shown below. Be sure to select the intersecting points on each vertical path so that the color doesn't stop halfway down the image. You can use the direct selection tool and the Shift + Click option to select multiple mesh points or use the Lasso Tool to "collect" the mesh points.

As you progress look at your image, ask yourself the question - Does it need more mesh points? If so, add them. Zoom in whenever necessary.

Keep working in this manner adding color until the top half of the balloon is done. Just be sure to add color to the mesh points on the vertical lines, not the horizontal lines. You can add color to the horizontal lines, if you like, but what will happen is the color will start at the point you add the color, and radiate out from there and may not give you the look you want.

Let's finish adding the colors to the bottom of the balloon like the top half. Do this by repeating the steps above until you achieve the look you are satisfied with. The string on the balloon was added using the brush tool; no fill, baby pink, 1 pt. stroke, butt cap, miter join.



The Completed Balloon
Congratulations! You have now used the gradient mesh tool to create a basic mesh object.  Of course, this exercise was just general theory to get you started. Practice hard and you may eventually develop your skills to the level of enikone, who has a few of his works displayed below (yes, these are all meshes!).
 

As I said at the beginning of this tutorial, the gradient mesh tool is powerful and can be challenging to learn. The trick is to keep practicing. Placing highlights, shadows, and Midtones in an image can be very tricky and you may have long way to go before you can consider yourself a “master”.  That said, its a fantastic journey!  Have fun being creative!
 




All Content © BioRUST 2009 All Rights Reserved.