Get a free year on Tuts+ this month when you purchase a Siteground hosting plan from $3.95/mo
Gradient Mesh can be daunting for a beginner. Trying to achieve realism takes a lot of time, effort and patience. If you are intimidated by Gradient Mesh, this might be a good place to start.
We'll use a simple Gradient Mesh to create organic shapes that don't have to be super-real. We'll add some radial gradients to make craters and highlights for an easy, yet sophisticated background. Let's get started!
Choose a color palette. You'll only need three swatches: dark, medium and light. I'm using a gray green, in the following values:
Draw a rectangle the size of your artboard and fill it with the middle color. Lock that layer and create a new one above it. You can hide the bottom layer for now.
Click on the artboard with the Star Tool, and enter the following values in the dialog box. Fill the star with the same color as the background layer.
Keep the star selected and go to Effect > Stylize > Round Corners. Enter .25 inches in the Radius field. Next got to Object > Expand Appearance.
Select the star shape, and go to Object > Create Gradient Mesh. In the dialog box that appears, enter 8 rows and 8 columns. Choose Flat as the appearance.
Using the Direct Selection Tool (A), begin pulling out every other point along the star's edge. Take care not to let the interior paths overlap. The result should be a random splat shape, as in the image below.
Again using the Direct Selection Tool, select a point on the next inside ring of points. This point should correspond to a point that forms one of the sharper parts of the splat. Fill the selected point with the dark color. Do this with every other point like it. The result should look something like the image below:
Keep using the Direct Selection Tool, and move the inside points toward the center, so they form a tighter clump in the middle. If you get a lot of interior paths overlapping one another, resulting in some funky things happening with the mesh, adjust the handles to get them out of the way. This isn't entirely necessary, because this part will eventually be covered by another object, but it's nice to have a tidy file.
Now move some of the edge points outward, so that the overall shape is less pointy. To make this go a little faster, you can use the Lasso Tool to select more than one point at a time. Hold down the Command/Control key to temporarily switch to the Direct Selection Tool to move the points. The less pointy shape should look something like the image below.
We need to add a few more dark areas. These are the "valleys" of the side of the crater. It will help to add a line to the mesh. Choose the Gradient Mesh Tool (U) and click on one of the paths that radiates from the center. The cursor will have a little + sign to indicate that a path is being added.
Change the fill color of a couple more points to the darker value. Adjust the handles, if necessary, to avoid letting the darker color go to the edge of the shape.
At this point it might help to show the background layer. We don't want any hard edges of darker color, as these are supposed to recede and blend into the background. To fix an abrupt edge, pull its handle in toward the center so that the lighter color extends into the shape further
The base of the crater is done, and should look like the image below, and blend with the background after adding the same color as the outer edge to the background, as shown.
Draw a circle that's about half the diameter of the crater shape. Go to Effect > Distort & Transform > Roughen. Enter a small Size and Detail, just enough to rough it up a little bit. Then expand the appearance, under the Object menu.
Go to Object > Path > Offset Path. Enter 2 points, enough to create a slightly smaller shape.
Fill the inner shape with a radial gradient, as in the image below. The Gradient should be made up of all the colors in the color group, going from the lightest in the center.
Choose the Gradient Tool (G) and drag the gradient diagonally from the lower-left edge to the upper right.
Group the two roughened circles and place them on top of the crater shape. Adjust the size, if necessary, so that the edges of the circle meet the inner edges of the side of the crater.
For a finishing touch, add some highlights by changing two or three points on the mesh to the lightest color.
Draw a few small circles and fill them with the same radial gradient. Drag the gradient as you did in Step 17. Varying the gradient's placement slightly will result in small craters that appear to have different depths.
Copy and re-size the large craters to populate the entire artboard. Scatter the small circles among the craters. Use the Warp Tool or the Roughen effect to add variety to the shapes, giving them a more organic, less uniform look.
I hope this has taken some of the mystery out of Gradient Mesh. With some practice, you can achieve professional results with relatively simple shapes. Attention to detail is also important, especially when dealing with radial gradients. Keep at it, and you'll be moon-walking in no time!