Archive for May, 2015

Another Fine Mesh…

Most weekends I spend a quiet hour or so watching a few tutorials from a range of sources, to see how other people are teaching certain aspects of Adobe software—what techniques they are using and so on—which sometimes leads to an idea for a blog post like this one. One of the things I looked at this weekend was a tutorial on getting started with the Gradient Mesh feature in Illustrator—Gradient Mesh is very powerful but there is a learning-curve associated with it, and to be honest it’s not the easiest thing to teach—you just have to learn the basics and persevere with it. Before we look at the thing that prompted this post, let’s cover some gradient mesh basics.

Gradient Mesh Basics

Mesh lines form a kind of 2D wireframe, that can be manipulated in various ways; where the mesh lines intersect mesh points exist, and these points can be assigned colour and opacity values.

There are a couple of ways to create gradient mesh objects, so we’ll look at these first.

Mesh Tool

Here’s a simple example, using the Mesh Tool.

Draw an ellipse, with no stroke and a solid fill:

step1

Tap U on your keyboard to access the Mesh Tool, then click somewhere near the middle of your ellipse:

step2

The ellipse will be converted to a gradient mesh object, made now from a composite of Anchor Points and mesh points. The mesh point you created when you clicked will still be active; make sure that the fill attribute is in front on the tool box (solid square in front—tap X to toggle this) then choose a different fill colour:

step3

 

You’ll see how the colour radiates out from that mesh point to the other mesh points on the shape (mesh points can be distinguished from anchor points as they are diamond-shaped, where anchor points are squared). While the point is still selected, change the Opacity—drop it down to 0%—and hopefully you’ll start to see the potential that Gradient mesh has, even if it’s only used as a shading overlay.

step4

 

Create Mesh

Gradient mesh can also be created with the Object menu—sometimes this is the best method to get started—as you get an equally distributed mesh that you can preview visually. This time I’m starting with a kind of pear-shape:

step5

Next step is to choose Object > Make Gradient Mesh… and in the resulting dialog choose the following options:

  • Rows: 5
  • Columns: 5
  • Appearance: Flat

step6

 

Tap A on your keyboard to access the Direct Selection Tool and click on the mesh patch (that’s the name for the area between any four mesh points) as indicated in the image below with the red X; this will select the surrounding four points—again, choose a different colour swatch:

step7

Now tap U to select the Mesh Tool as before; click on any one of the horizontal grid lines over on the right-hand-side, and a new vertical grid line will appear; repeat this step as shown below:

step8

Next, click on one of the vertical lines, between the bottom of the shape and the first set of mesh points:

step9

Tap Q to pick up the Lasso Tool and drag around the points towards the bottom-right of the mesh, roughly as shown below:

step10

Then choose a darker colour:

step11

You’ll see how that works quite nicely, but it’s a bit angular in the middle of the curve at the bottom-right. Switch to the Mesh Tool again and now we can manipulate the mesh points, which will affect the gradient between them. Tip: hold down SHIFT to “slide” mesh lines along the mesh lines. I’ve started to do this in the image below:

step12

This is just a crude example, but you’re probably seeing how this works, and that with a little more effort this could be cooking up great results.

So About That Tutorial…

One of the tutorials that I watched looked at creating a mesh within a more awkward shape, like this:

step13

The tutorial recommended that you create a rectangle, then bend the mesh using the transformation tools—and a large chunk of your patience—to achieve the desired result. This is necessary on some objects, to be honest, but on a shape like this one, and many others like it, there is another way.

Start with a stroke

step14

Making sure the stroke attribute is frontmost in the Tools panel (tap X to swap if necessary):

step15

Tap the Period key (ok, full-stop—if you must) on your keyboard to apply a gradient to the stroke; go to the Gradient Panel and apply the gradient in the direction you want (see below):

step16

Gradient options:

  1. Applies the gradient within the stroke—this is almost like the effect you’d previously have achieved using the stroke as an opacity mask on an object with a gradient. This method doesn’t work with our technique.
  2. Applies the gradient along the stroke
  3. Applies the gradient across the stroke

The gradient can be modelled any way you want it to be, just be aware that the more colours you use, the more complex the results will be in the next step.

Create The Gradient Mesh From The Stroke

This is the really easy bit: Object > Expand Appearance and the gradient stroke is transformed into a perfectly formed gradient mesh object.

step17

In the examples above:

  1. Uses the gradient along the stroke
  2. Uses a simple white to black gradient across the stroke
  3. Uses a more complex spectrum gradient across the stroke—note the increased number of mesh lines

More Potential

There are other attributes that can be applied to the stroke, before converting it to a mesh object, such as using round end-caps and width profiles (I always keep a copy of my original stroke, just in case I change my mind about any of these things). Don’t forget that you have the Width Tool (SHIFT-W on the keyboard) to mould your own profiles as well as the built-in examples.

step18

Links

Here’s a link to the Learn the Gradient Mesh Tool movie on Adobe Learn & support and to help with that perseverance and practice here’s some inspiration from—to my mind the undisputed master of Gradient Mesh—Yukio Miyamoto.