5

Hoping someone can help as this is driving me mad.

I have an initial opaque shape, which will be filled in a light grey: opaque shape

I'm using a duplication of the shape to fill with gradients to lay on top. I want to create a very subtle gradient along the edge of the shape all the way round using a slightly darker grey, to create a subtle depth to the shape.

I've tried using multiple linear gradients on the same shape using the appearance panel. As follows, this is what happens which doesn't look right as the gradient doesn't follow the shape edge: enter image description here

I've tried playing around with the freeform gradient tool, using both points and lines. Lines doesn't work because it only curves (a lot?!) and won't follow the outer edge of the shape. Plus the gradient would run along the line from opaque to grey which wouldn't create the subtle rounded cylindrical tube shape look I am after: enter image description here

I can't see a way in which to use the 'points' option on the freeform gradient tool, as this means assigning each 'point' to the darker grey colour, but I can't see how to make the middle of the shape transparent (I'm planning on having text running along the first opaque shape that shows through the transparent middle of the duplicated gradient-filled shape):

enter image description here

The best work around i found that gets close t the look I am trying t achieve was to use the freeform gradient tool and the 'lines' option to draw lines around the edge of the shape assigned to the darker grey shaded colour, and to then create more 'lines' using the freeform gradient tool along the centre of the entire shape and assign the points to 0% for transparency. Here's this highlighted: enter image description here And the finished effect: enter image description here

I posted the same question on the Adobe forums but the answer that came back was to create a gradient along a path to use as a fill for the shape, which doesn't work because a path does not replicate the altering angles of its edge of the shape as it curves in different directions.

Was what I did the best/only way? It seems complicated and not very accurate or professional!

Thanks for reading and your patience.

Example for Luciano:

enter image description here

3
  • 1
    Well, the gradient does not need to be that path;)
    – joojaa
    Oct 21, 2019 at 14:21
  • I don't know what you mean - please elaborate?
    – Molly
    Oct 21, 2019 at 14:46
  • 1
    Welcome to GDSE! +1 for describing your problem in details as a new user.
    – Wolff
    Oct 21, 2019 at 17:01

5 Answers 5

5

I would simply create a thick stroke and apply the gradient to the stroke....

enter image description here

Then, if shapes are needed, it can be expanded to a Gradient Mesh object.

enter image description here

If you require the slight corner rounding, then merely stack 2 objects. A shape to include the corner rounding, then a stroke slightly thinner than the shape with with the gradient. When colors are the same, the stroke will visually blend to the shape and be indistinguishable.

enter image description here

You can even do this with a transparent-color-transparent gradient on the stroke. So that, to alter the object color, all you need to do is change the flat fill color of the underlying shape.

enter image description here

For me, the stacked gradient stroke method offers the easiest editing and optimal control.


See here: Complex gradient object with transparent center if you are unfamiliar with adding transparency to gradients within Illustrator.

2
2

Try with Blend.

enter image description here

  • Delete the end paths

enter image description here

  • Blend the two resultant paths (they must have the same amount of points and no fill)

enter image description here

  • Expand the blend and blend again each path separately

blend

  • Use the Direct Selection Tool to select each path and change the stroke color

animation

3
  • Hi Danielillo, Thanks for getting back to me! When you say 'two paths' which two do you mean? Do I start buy drawing out multiple paths (as in your left hand illustration) and then select two of them to blend? Which two? Any two? Thanks so much!
    – Molly
    Oct 21, 2019 at 14:48
  • Answer updated with the info
    – user120647
    Oct 21, 2019 at 14:55
  • Lovely. Sorry I've never used the blend tool, so I'm assuming it produces the extra paths in your illustration when you 'blend'. And each blend path you can edit directly. Thanks so much for your time and answer, perfect :)
    – Molly
    Oct 21, 2019 at 14:59
0

The most flexible solution is a Pattern Brush. This is what joojaa meant with "the gradient does not need to be that path" - the gradient is simply a pattern applied to the path.

  1. because Illustrator doesn't accept gradients in brushes, you need to create a blend object. Draw 3 rectangles and fill them with the colors of your pipe + shadow profile.
  2. Blend Tool (W) and click on each rectangle in sequence, like this: enter image description here
  3. Drag the blend object to the Brushes panel (F5 if it's not open) and select Pattern Brush
  4. Adjust the settings for the corners enter image description here
  5. draw a "spine" for your pipe - a single open path with no fill
  6. Select the brush on the Brushes panel to apply to your pipe: enter image description here

Advantages:

  • you can easily change the colors of the gradient later
  • you can easily change the shape of the pipe afterwards
  • you can apply the same pattern to other objects
6
  • Wow this looks awesome! Can this be done in CS6?
    – Molly
    Oct 21, 2019 at 15:11
  • Thanks so much for the explanation - one thing, in step 4, does the Brushes panel auto generate the examples you show for the corner etc?
    – Molly
    Oct 21, 2019 at 15:12
  • @Molly yup, works as far back as I can remember :) Corners are auto generated, but you might need to change the type of corner. Adjust the settings if it doesn't look right.
    – Luciano
    Oct 21, 2019 at 15:12
  • So Luciano, Blend tool doesn't seem to be working. Because I wish for the centre of the pipe to be transparent, I've made two block colours and one central transparent one. When I try your steps, the bottom solid blends into the central transparent easily, but the top solid colour remains so and doesn't blend?
    – Molly
    Oct 21, 2019 at 15:49
  • - have added image to demonstrate :)
    – Molly
    Oct 21, 2019 at 15:54
0

One month after this question there has been follow-up problems and none of the original answers is accepted. Maybe more is needed. This is a simple one:

enter image description here

I guess a slight extrusion only is wanted, because the corner roundings are selected so that it cannot be a bent round pipe. If it was a bent round pipe the outer corners would be less sharp than the inner corners.

Illustrator's 3D effect Bevel&Extrude can create quite plausible apparent thickness. Unfortunately there's no rounded bevel available.

Your own attempts have no beveled ends. If that's needed, you can slice off short pieces at the ends by applying a clipping mask.

Another problem is controlling the color, brightness and contrast. The 3D effect affects them, adjusting will be tricky.

Your own attempts hint that the next (=rounded bevel) could be useful:

enter image description here

It's built of L-shaped pieces. The next cartoon shows how the L-shapes can be made respecting your corner curvatures:

enter image description here

1-2. Draw two 90 degrees angles. You can for example place 2 rectangles to a L-shape (=blue) for guidance and click with the pen to get the black paths or you can join straight lines. Delete the guide shapes.

  1. To get the upper edges of the bevel make a 4 intermediate step blend. Expand and ungroup the result of the blending.

  2. Delete 2 mid steps, insert separately effect Stylize > Rounded corners or use the corner tool to get the needed roundings. In my example I entered the next rounding radiuses:

A=2mm, B=1mm, C=7mm and D=5mm

  1. Expand the appearance of the rounded angles. Then join A and D to get the outer L. Join B and C to get the inner L. Remove the strokes, insert fill colors. Joining =select the halves, press twice Ctrl+J.

  2. Bring the smaller L to front. Make a smooth color blend between the L-shapes.

Make rotated and reflected copies of the L. Build the final shape. Exact placing is tricky because they easily snap wrongly. Select one L. Drag with the direct selection tool one corner point onto another L. It snaps to an anchor if you have Smart Guides and Snap to points =ON. Move with arrow keys, if needed.

The shown "rounded bevel trick" has a fault: It's 3D-like shading looks non-realistic. Practical ligh conditions are never right for it, the light is always more or less tilted. The Extrude&Bevel example was realistic in that sense.

if your apparent thickness can be quite low, also Inner Glow with black creates an acceptable round bevel shading. The next image shows how:

enter image description here

There's a solid grey L-shape with a rounded corner. It has got Effect > Stylize > Inner Glow > Edge. The blending mode of the glow color is normal, but the shape has got blending mode = Lighter color. This makes combining easy, you only place rotated and reflected copies.

If the ends cannot have the dark glow, stretch them longer with the direct selection tool and shorten with a clipping mask.

You may need a solid black copy of the shape in the bottom if this overlaps light other shapes.

If you can accept bitmap (=raster image) shapes, you can use Photoshop's layer style Bevel&Emboss. In the next image a solid grey shape with no effects is copied and pasted into an empty quite high resolution (1200 x 750) image layer. Layer style Bevel&Emboss is applied:

enter image description here

The dialog allows a wide variety of different shadings from matte and plastic to glossy and metallic. A good one should be saved as PNG or PSD and placed to Illustrator document to retain the transparency. Copy&Paste inserts a background, so it's less useful from Photoshop to Illustrator.

The result can be used only as a bitmap shape, it isn't vectorizable properly.

0

enter image description here

I found that when creating a chevron circular flow diagram the easiest way to get the center highlight on the shape was to draw the two outside (base color) and one center (highlight color) line. Then I selected all three and applied a smooth blend.

This allows you to change the colors of the lines to achieve the gradient you desire.

Hope this helps.

Ginger

1
  • 1
    Welcome Ginger! Blends have already been mentioned a couple times.
    – Scott
    May 29, 2022 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.