Techniques for adding shadow colors

Post questions on how to use or achieve an effect in Inkscape.
User avatar
Kululu17
Posts: 18
Joined: Thu May 25, 2017 1:56 am

Techniques for adding shadow colors

Postby Kululu17 » Sun May 26, 2019 3:10 am

Hi - I was looking to see if anyone could share a technique for adding a shadow color to a shape, especially a complex shape. The specific issue I have, is that the obvious way to do this leaves a visual error which is time consuming to correct.

Take a shape, say a face, and draw a shadow on part of the face. You can either eyeball the edge of the shadow to exactly match the edge of the original shape, OR you make it larger, then using a copy of the original shape use the [path] -> [intersection] to cut the shadow to fit inside the original shape. However, if you do this, the shadow is cut at the centerline of the stroke, and what you need is the inside edge of the stroke (otherwise the shadow covers over half the stroke width.) So again, you are left with manually adjusting the edge of the shadow to inset it so it does not overlap the stroke of the original object.

The only work around I have for this, is to copy the original shape, set it to stroke only, then place it on top of the shadow. But this greatly increases the total number of shapes on the drawing.

Does anyone have an efficient solution to this?

PS: I can add a drawing if the question is not clear

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Techniques for adding shadow colors

Postby brynn » Sun May 26, 2019 12:16 pm

Yes, it would be easier for us to be able to use your SVG file, to show you examples.

User avatar
Kululu17
Posts: 18
Joined: Thu May 25, 2017 1:56 am

Re: Techniques for adding shadow colors

Postby Kululu17 » Sun May 26, 2019 12:53 pm

Hi, thanks.

A sample svg file is here:

https://www.dropbox.com/s/wcq0223y7j6c7 ... d.svg?dl=0

If you look at the shading on the hand, you see that using a copy of the hand itself as a template to trim the shading, does get the right shape, BUT, the resulting shape overlaps half the stroke width of the hand. Is there a better way than what I have described above to fix this.

Thank you!

User avatar
druban
Posts: 1914
Joined: Fri Nov 20, 2009 10:48 pm

Re: Techniques for adding shadow colors

Postby druban » Sun May 26, 2019 6:08 pm

But this greatly increases the total number of shapes on the drawing


It only increases it by one third, and it is the simplest method. You can also convert the stroke object to a filled path and trim the shade path with it, this is more work but no more objects. The other way is to use a mesh gradient which will actually decrease the number of shapes by one half but will be much more work. I have done rough version here but of course you might want to put much more time into it

Shading_Hand2.png
Shading_Hand2.png (94.6 KiB) Viewed 1789 times
Attachments
Shading_Hand2.svg
(16.47 KiB) Downloaded 89 times
Your mind is what you think it is.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Techniques for adding shadow colors

Postby Lazur » Sun May 26, 2019 7:36 pm

Semi-related:

cel shading

User avatar
Kululu17
Posts: 18
Joined: Thu May 25, 2017 1:56 am

Re: Techniques for adding shadow colors

Postby Kululu17 » Mon May 27, 2019 1:06 am

OK! Thanks for your help.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Techniques for adding shadow colors

Postby brynn » Mon May 27, 2019 4:20 am

In this situation, I would make the stroke on the hand/arm a separate object. Then you have everything stacked on top of each other - the stroke on top, then the shading object, then the hand/arm on the bottom.

- Duplicate the hand/arm
- Remove the stroke from the original
- Remove the fill from the duplicate
- If you do it exactly in that order, the stroke object ends up on top. Or if you do it in some other order, you can move the objects around in the stack, see buttons below (or look up the key shortcuts)
- Done!

The z-order buttons look like this, on the Selection tool control bar. Or else you can also find them in the Object menu.

Image Image Image Image

(I could make you an SVG file, if you need it?)


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: No registered users and 8 guests