Adding Shading to
Vector Objects
by Tom
Coates
Date Posted: 08/21/2001 -
Several of my recent Canvas images have used the same basic technique to add
realistic looking shading to Vector objects. This method is limited to giving
rounded edging to objects. It has the advantages that it is quick, easy, works
on just about anything and allows you to adjust the original object’s inking
after the shading is done. The basic concept behind this is to create a paint
object of the same “shape” as the original vector shape. The paint object is
given the desired shading. Then the paint object is placed on top of the vector
object and the two are combined using the Hardlight Transfer Mode. Below I’ve
shown graphically how this is achieved. The real trick is easily creating the
proper shading in the paint object. This tutorial shows the method I use to
create the shaded paint object.:
Create
the original object, with the desired fill and stroke. Virtually any object or
group of objects could be used. Create a duplicate of the original object, but
switch the inks on the fill and stroke to solid black. I’m going to show all of
these intermediate steps on a contrasting background to make things clearer. But
the background is not necessary for the process to work.
Use Image > Area > Render to transform the black object into a
grayscale paint object, at the final resolution you’ll want in your drawing (in
this example, 72ppi) and use fine anti-aliasing. Also, give the rendering a
Transparency Mask, which creates a channel mask on the Paint object. This will
make something that looks an awful lot like the original black object, which you
can now delete. Note that the transparent areas actually have a white fill which
you don’t see. I’ve shown here what things would look like if you turned off the
channel mask.
Next,
reverse crop the paint object to give it some white border space. The extra
space is needed during the later embossing and blurring steps. You can create
the border manually by Control-dragging the edges, but I prefer to use the Menu
palette Image > Area > Crop, and fill in the dialog box. I typically
expand the area by 120 percent. Due to the transparency mask, you won’t see the
effects of this operation directly. Again, I’ve shown here how things would look
without the mask.
Use the
Image > Filter > Stylize > Emboss filter to create the illusion of
depth. On a black object, you get mostly grey, with white and black highlights.
Note how the channel mask limits the areas where the effect is visible. You can
now see the 3D shading starting to take form. The filter’s controls are your
primary method of controlling the overall effect. Use Angle to control the
apparent light direction. Height controls how far the shading will extend into
the object’s interior. Small values give slightly rounded edges, while larger
values can round the entire surface. The “Amount” control is usually set high
enough to get full black and white in the dark and light areas. Above 100
usually does that. If you set it lower, you’ll get less intense shading.
Use the
Gaussian Blur Filter to smooth the edges. As before, without the channel mask,
things look pretty ugly. But when we only look at the masked image, we get a
beautiful rounded edging. In this case I used a setting of 3.5 pixels. The
values used have to be enough to blur the sharp edges created in the embossing
step.
Finally turn on the Hardlight Transfer mode in the
Transparency palette, and place the shading object over the original vector
object. There’s usually a little bit of hand adjustment required to get the two
to align optimally. It’s often desireable to group the two objects together.
Once you have the shading worked out, it’s possible
to change the inks used on the original vector object. Just apply the new inks
to see how they look. The shading will automatically be re-applied, Here I
selected a veined-stone texture Ink.
Several
additions can be made to this process. First, the intensity of the effect can be
adjustedwithImage>Adjust>Contrast. This can make the shading more or less
intense, which can be necessary depending on the lightness of the inks on the
vector object, or the surface characteristics you are after. For example, shiny
plastic surfaces often have sharper hightlights, with more contrast.
Likewise, the overall effect can be adjusted by using the other painting
tools on the shading object. For example,usingImage>Adjust>Invert you can
reverse the apparent direction of the lighting, by swapping dark and light
areas. The Curves and Levels adjustments can also be of use to get the exact
results you want. You can also hand-paint onto the shading object to add or
remove shading as needed. For example, you might want one portion of the edges
to be less rounded. Air brushing a bit of 50% grey on these areas will remove
the shading effect. The Dodge or Burn tools can create new shaded areas by
darkening and lightening the existing values.