- [Instructor] In this movie, I'll show you
how to convert a radial gradient to a gradient mesh
and we're going to use this technique
to create this headlight effect.
Now I'm going to switch over to Photoshop for a second
so that you can see the screenshot that I captured
complete with color values, and these are all the RGB values
that are associated with those default gray scale swatches.
And if you're not sure what I'm talking about,
you will be in just a moment.
But I want you to see how converting a radial gradient
gives you a different kind of gradient mesh
than you can achieve with any other approach.
And so as opposed to creating rows and columns,
we end up with rings.
All right, so I'm going to switch back over to Illustrator here
and I'll zoom on in here inside the document in progress.
And I'll go ahead and select the headlight
by clicking on this outline, very important,
and then you just want to copy it and paste it in front.
So, Control + C, Control + F here on the PC,
Command + C, Command + F on the Mac.
Now I'm going to twirl open my meshes layer
and I'm going to turn off the original,
which is this guy right here.
The name of this object is left light, incidentally.
All right, now I'll go ahead and select the Gradient tool,
which of course you can get by pressing the G key,
so that we can see that I have this almost upright gradient.
I'll go ahead and drag outside of its end point
so that I can rotate this guy while pressing the Shift key
so it's exactly horizontal.
You can see that it's got a bunch of color stops
and that it's offset from the center.
So the center point,
as opposed to be right in the center of the shape,
is off to the side, and you may remember
that you can achieve this effect
by dragging this smaller circle right here.
All right, now let's see what happens
when we convert this guy to a gradient mesh.
And I'm going to do that by first pressing the V key
to switch back to my black arrow tool.
And then I'll go up to the Object menu,
and what I want is this Expand command,
the same command that we used to convert a linear gradient
in the previous movie, but it's dimmed
and the Expand Appearance command is available instead.
What that tells you
is we have some sort of special appearance attributes,
and so I'm going to go ahead
and switch over to the Appearance panel
and that's it right there, the Drop Shadow.
Go ahead and select it, and click on the trash can
in the bottom right corner of the panel to get rid of it.
And we might as well get rid of the stroke too
because it's not going to survive the conversion.
All right, now if you return to the Object menu,
you will see that the Expand command is available.
At which point, go ahead and choose it,
make sure that the Fill checkbox is turned on.
We want to Expand the gradient to a mesh.
And then click OK.
And notice that resets the center point.
So, that offset center does not survive the conversion,
just so you know.
All right, now notice up here
on the far left side of the Control panel
that we have a group.
We don't want that, so go to the Object menu
and choose the Ungroup command
or press Control + Shift + G
or Command + Shift + G on the Mac,
after which point, we have a clipping group,
which is exactly what we do want.
All right, so now I'll go ahead
and switch back to the Layers panel
and I'll twirl that new clipping group open right there
and you can see that we have a clipping mask
in the shape of the headlight.
And then if I select this bottom object right there,
we have a big radial gradient mesh.
All right, now I'll press the A key
to switch to my white arrow tool.
Now, you can take advantage
of all of these points if you want,
all four points, there are really five points
as I'll show you in a second,
that's around each one of the circular rings.
And so I could drag this guy over here
and drag this one down,
and reshape that central ring to any extent I like.
I won't do that, however, so I'm going to press Control + Z
or Command + Z on the Mac a couple of times.
Now something else to note is we're not really seeing rings.
We are seeing rows.
They just happen to be wrapped around into a circle.
So there's a beginning and an end to each one of these rings
and it typically occurs over here on the right-hand side,
at what is generally considered to be zero degrees.
And so notice, if I drag this point,
I leave a hole right here in this region
because there's another point right there below it.
So that's just something to bear in mind.
Go ahead and press Control + Z a couple times in a row.
Obviously, that's Command + Z twice on the Mac.
Now I want my rings to remain circles
or at the very least, ellipses.
And if you want that as well, then you might as well get rid
of these extra points right here
by switching to the Mesh tool,
which you can get by pressing the U key.
And then you'll want to Alt + Click
or Option + Click on this line right there,
then Alt or Option + Click on this one, and this one.
You can't get rid of the one
that has two points associated with it.
And so note, if I Alt or Option + Click on this guy,
Illustrator just ignores me.
All right, now I want to move these rings
to specific positions and just so that you and I
have a prayer of getting the same result,
I have created this guides layer
here at the bottom of the stack.
And so I'll just go ahead and turn it on
and what we're seeing here is the preferred location
for each one of these rings.
And so rather than dragging any one of these points,
and in this case, I goofed up,
I ended up selecting the hood
and so I'm just going to lock down the hood for now
so that it doesn't get in the way.
I'll select this ring mesh right there once again,
here inside the Layers panel.
And then I'll just demonstrate.
If I grab this and start dragging,
then I'm going to create a hole.
Obviously that's not what I want.
So if you want to avoid any holes,
what you're going to have to do is marquee the points.
And in my case, I'm not having any luck here,
and so you know what?
I'm just going to get rid
of this nearly outermost ring right here.
Notice that there's another ring
right at this location under my cursor.
I'll get rid of this one by pressing the Alt key
or the Option key on the Mac, and clicking
so that that guy goes away.
But if you want to, for example,
move this ring to a different location, well, for one thing,
you're going to have to switch away from the Mesh tool.
That's my problem.
I need to press the A key to grab the white arrow tool.
And then I'll marquee these points, like so,
to select both of them.
So both the one that you're seeing and the one underneath,
then just go ahead and drag it to the left
so that it snaps into alignment.
And then I'm going to scale this ring
by switching to the Scale tool,
which I can get by pressing the S key.
And then I'll Alt or Option + Click right there
in order to bring up the Scale dialog box.
And I'll increase that Uniform value
until I get this thing to be the right width.
So notice that even though I've only selected
these two coincident points right here,
I am able to move and scale the entire shape.
All right, now drop-down to the Vertical value
and increase it until I get more or less of a match,
but let's say I'm trying to do this exactly right.
In that case, I'll set the horizontal value to 105.5%
and I've got a Vertical value of 111%.
At which point, I'll click OK.
And I'm going to change the color of those points as well
by selecting this guy right here,
R=204 G=204 B=204.
So we're going to be working with gray values exclusively
during this movie, so I'll just go ahead and select that.
And I didn't change the color because the fill's not active,
so I'll switch to the Fill, like so,
and then I'll click that swatch once again.
And now, I'll press the A key
to switch back to the white arrow tool.
And I want to get this guy.
Why am I having such problems?
So I'll just go ahead
and target the gradient mesh once again
and I'll switch to the isolation mode
by clicking on this icon up here in the Control panel.
And then I'll marquee those two guys.
This time, it worked.
And now, I'll change the color to white.
All right, I don't want to
stay inside the isolation mode however
because I can't really see what I'm doing,
so press the Escape key in order to escape out.
And then I'll marquee these two points,
so you want to marquee pretty carefully
to get the work done here.
And then I'll just press the arrow key a couple of times
to scoot it over to the left, in this case.
And I'll press the S key to switch to the Scale tool
and I'll Alt or Option + Click right there
in order to bring up the Scale dialog box.
And I'll increase the Uniform value
until the width of the shape matches.
And then I'll click in the Vertical value
and I'll increase it,
and I'm just doing this by pressing the Up Arrow key
until I get another match, like so, and then I'll click OK.
All right, now this guy wants RGB=102,
and so I'll go ahead and assign that one.
And now, I'll press the A key
to switch back to the white arrow tool.
We're going to be doing this quite a bit.
And then I'll marquee this guy,
this pair of points right there.
And I'll press the Right Arrow key a couple of times
to nudge that guy over.
And I'll go ahead
and change its color once again to RGB=204.
And I'll press the S key to switch to the Scale tool
and I'll Alt or Option + Click right at this location here.
And then I'll increase that Uniform value.
I'm just pressing the Up Arrow key
in order to increase it to 143%.
And then I'll click to the Vertical value
and take it up like so
to, I guess, 161%.
And then I'll click OK.
All right, now we want to make
a couple of modifications to these guys.
I'm going to marquee all these points right here.
So it looks like I'm just marqueeing two points,
but there's actually four points going on.
And then I'll scoot this guy over
so that this point right there
is more or less centered inside the central ellipse.
And then I'll marquee this guy independently.
Press the Right Arrow key
to nudge them over just a little bit.
Press the S key to switch to the Scale tool,
Alt or Option + Click right there.
And I'll take that Uniform value down
until I match the width,
and then I'll click in the Vertical value
and take it up until I match the height, and I'll click OK.
All right, now this guy wants that same color value
that is RGB=204, and so I'll go ahead and assign it.
All right, now you may just be able to tell
that we're still missing three rings.
Press the U key to switch to the Mesh tool
and I'll click right there to add a ring.
And then I'll click here and here as well.
And you can see, if we look very closely here,
that the two points that are on top of each other
are not the same color, which is why we're getting a seam.
All right, I want to zoom out just a little bit
so I can better see what I'm doing.
Actually, that's not far enough.
That is.
And now I'll press the A key
to switch back to my white arrow tool,
and I'll marquee these two points.
This time, we want a very dark gray,
where the RGB values are all 77.
And now, I'll press the S key
to once again switch to the Scale tool.
I'll Alt or Option + Click right at that location
on the right side of the shape.
I'll take the Uniform value down until I match the width,
and then I'll take the Vertical value up
until I match the height.
And I might want to take the horizontal value up
just a little bit
'cause I'm not really getting an exact match at this point,
but this is probably good enough, so I'll click OK.
And then I'll press the A key
to switch to the white arrow tool.
I'll marquee these two points right there.
I'll change their color to another dark gray,
this time, where all the values are 102.
And my problem
is that I don't really have an ellipse anymore.
I've got this kind of weird shape going on,
but I think I can work with it,
so I'll press the S key to switch to the Scale tool
and I'll Alt or Option + Click
in the right side of this shape.
I'll take the Uniform value down until I get a width match
and I'll take the Vertical value up
until I get something of a height match.
The shape is a little too boxy,
but I can live with that, so I'll click OK.
And then I'll press the A key
to switch back to the white arrow tool.
I'll marquee the center point right there,
it's actually two points once again, in order to select it.
And I'll change it to all values 204,
so I get a bright center.
And then I'll marquee these two guys
and I'll change them to all values 179.
And then I'll zoom in a little bit and I'll press the S key
to switch to the Scale tool.
I'll Alt or Option + Click
on that right point in the selected ring.
Now I'll take that Uniform value down to 80% maybe.
And then I'll take the Vertical value,
let's say up to 91%, fine.
And then I'll click OK to accept that change.
Press Control + Shift + A or Command + Shift + A on the Mac
in order to deselect my artwork.
I'll press Control + 0
or Command + 0 on the Mac to zoom out.
And I'll scroll down the list here
and turn off the guides layer,
which at this point are just going to the distracting.
All right, I actually want to zoom in just a little bit.
Notice that we have this kind of ring art effect here.
That isn't really going to be there, by the way,
not when you print the artwork or export it.
All right, but I do want to bring back
my original radial gradient.
So notice here, if I turn off the clipping group,
that is the original shape.
And now I'll turn the new one on,
which has a different center, notice that.
So our centers aren't quite aligned with each other
and that will make for a pretty nice headlight effect.
And so I'm just going to go ahead
and target the entire clipping group,
which is the top shape,
and then I'll click in the word Opacity
and I'll change the Blend mode to Overlay
in order to create this effect here.
And then I'll just go ahead and press Control + Shift + A
or Command + Shift + A on the Mac
in order to deselect the artwork.
And so just to give you a sense of what we've accomplished,
this is the original radial gradient,
and this is the final headlight effect,
with two light sources behind the glass,
very much like you might see in the real world.
And that's how you convert a radial gradient
to a very different kind of gradient mesh
here inside Illustrator.