Today we will learn a couple of ways how to create vector shadow with the help of Blend Tool, Gradient Tool, Gradient Mesh, and Appearance panel. Have fun learning our new Adobe illustrator tutorial!
Creation of Shadow from Simple Geometric Shape
This is the simplest situation. There are two ways to create such shadow. The first way is to use Blend Tool between two simple shapes, for example, rectangles, ellipses, and so on. The color of the first object should be black or dark-grey; the color of the second object is white, with 0% opacity. The Multiply blending mode should be used for the object.
The second way can only be used for elliptical shadow. This method consists of creation of an ellipse with black or dark-grey fill, and opacity mask of the same-shape ellipse, but with the fill consisting of gradient from white to black.
Creation of Shadow from Complex Shape
This is a pretty popular case. There are a couple of methods to create shadows from such objects. The first method can be called universal; its meaning is in creation and manual editing of the "right" blend object without artifacts. More details and description of this method can be found in tutorial How to Avoid Problems while Creating Blend Objects. Briefly speaking, this method is about two forms that should have the same amount of points while entering the blend object.
Gradient Mesh can become one of the variants. Let's take a closer look at this method. To begin with, apply to the object or the group of objects the Drop Shadow effect (Effect > Stylize > Drop Shadow) with necessary parameters.
Go to the Object > Expand Appearance to receive a raster object. This object has the same blending mode and opacity as the Drop Shadow effect,
that's why go to the Object > Rasterize.... Now create a rectangle, then go to the Object > Create Gradient Mesh..., and set some small number of cells. Then give to the gradient mesh the shape, which roughly resembles the shape of the raster shadow.
So now we can increase the number of cells using the Mesh Tormentor plug-in.
Select both objects, and with the Mesh Tormentor copy the colors of raster image to the overlaying mesh points.
Delete the raster image and apply the Multiply blending mode to the gradient mesh. Don't worry about some artifacts which appear in our shadow. All artifacts will disappear while exporting into raster format or importing to Photoshop.
There is one more way of vector shadow creation for the users of Adobe Illustrator CS6. It requires the usage of gradients on strokes. Let's check out how it works. To begin with, create a path of our future shadow.
Set the width of stroke of 30px, delete unnecessary points and give a smoother form to the path with the help of Direct Selection Tool (A).
Now apply the linear gradient to the stroke from white with 0% opacity to dark-grey.
Go to the Object > Expand Appearance. Now our path is transformed into Gradient Mesh.
Can the method, described above, be applied in earlier versions of Adobe Illustrator? Surely, yes! To do so, create a rectangle with width of 30px, and fill it with linear gradient as it is indicated on the figure below.
Go to the Object > Expand, and set the following parameters.
In the received group, delete everything except for Gradient Mesh. As Gradient Mesh consists only of one cell, then with the help of the Mesh Tormentor increase its number.
Transform the Gradient Mesh into the Brush Mesh Grid.
Create from the received object group the Art Brush, with the parameters indicated on the figure below.
Next, as in Illustrator CS6, we'll need path for the future shadow.
Apply the created brush to it.
Go to the Object > Expand Appearance, then convert the received objects into Gradient Mesh.
Combine the start and end points of the gradient mesh with the Direct Selection Tool (A). The Smart Guides mode (Cmd / Ctrl + U) will help you to work accurately and fast.
Creation of Shadow from Very Complex Figure with a lot of Small Details or from Text
This situation appears as often as the previous one, and even though any described above method can be used here, it will require enormous effort. The solution can be the usage of the Appearance and Graphic Styles panels. Create a duplicate of a basic object right below it (Cmd / Ctrl + C, Cmd / Ctrl + B) with solid fill (Grey 60%); shift it a little bit down and to the right.
Open the Appearance panel (Window > Appearance), and set 5% opacity for the fill.
Add a new fill with 5% opacity, and then apply the Offset Path effect (Effect > Path > Offset Path…) with 0,5 px value.
We need to add the remaining 19 fills by analogy. The opacity value should be 5% everywhere, and the Offset Path should be everytime changed to 0,5 px. In such a way, for the last Offset Path fill, the value should be -10px.
As shadows usually don't have any sharp edges, apply the Round Corners effect (Effect > Stylize > Round Corners…) with a small value, in this case 5px.
Drag the shadow into the Graphic Styles panel. And now, using the style, we can easily create shadow from any object.
Go to Object > Expand Appearance, we'll get a group of simple objects with 5% opacity of each.
On the figure below, you can see the shadow, which has a linear gradient as a fill. This gives us the opportunity to change the density of shadow while getting away from the object.