How to properly Mask/Clip/Exclude drop shadow filter
How to properly Mask/Clip/Exclude drop shadow filter
I'm trying to cut out the center of a button so that I can fill it in in my app. The button has a drop shadow on it (applied via filters...drop shadow), and I can't get the drop shadow to stay, while cutting out the center.
I want the red portion to be transparent in my final image:
But the closest I have been able to get is this:
which is basically the opposite effect I want, as the drop shadow only remains on the inside, while I need it on the outside.
I have tried all of the clip/mask and path tools, but I'm sure I am not applying them in the right way. One other thing I thought of doing was to convert the drop shadow to a path, and cut that out. But I have no idea how to do that, or if it was possible.
What is the best way to get this cut out?
Thanks in advance!
I want the red portion to be transparent in my final image:
But the closest I have been able to get is this:
which is basically the opposite effect I want, as the drop shadow only remains on the inside, while I need it on the outside.
I have tried all of the clip/mask and path tools, but I'm sure I am not applying them in the right way. One other thing I thought of doing was to convert the drop shadow to a path, and cut that out. But I have no idea how to do that, or if it was possible.
What is the best way to get this cut out?
Thanks in advance!
Re: How to properly Mask/Clip/Exclude drop shadow filter
Welcome to InkscapeForum!
I'm not clear what you're trying to do. You can remove the filter using Filter menu > Remove filters. Is that enough info to help you? Otherwise I'd need to ask a bunch of questions to try and clarify.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: How to properly Mask/Clip/Exclude drop shadow filter
Thanks Brynn,
I do not want to remove the drop shadow. I just want to cut out the red area. I was able to do it in Gimp using the select by color tool and then deleting, but I would like to know if it is possible in Inkscape as well.
I do not want to remove the drop shadow. I just want to cut out the red area. I was able to do it in Gimp using the select by color tool and then deleting, but I would like to know if it is possible in Inkscape as well.
Re: How to properly Mask/Clip/Exclude drop shadow filter
Oh, yes it can be done with Inkscape, but not in the same way. An easy way might have been to just change the color from red to white, or whatever color. Unless you want that area to be transparent? In that case, you could make it transparent by changing the Alpha value of the red color.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: How to properly Mask/Clip/Exclude drop shadow filter
Unfortunately just changing the alpha doesn't work. It removes the drop shadow as well, presumably because there is nothing to "block the light" when the alpha is 0.
Re: How to properly Mask/Clip/Exclude drop shadow filter
Perhaps you could make the shape which would be blurred and represent dropshadow. Set it in back, while having the shape of the button present and on top, then use Path/Difference which would make shadow independent.
After all this, add the outlined shape of the button.
*since the shape which represents shadow is blurred, it could (as shown) put some shadow on the button aswell but it could be prevented with careful choice of strokes width, on both "shadow" and "button" shapes.
After all this, add the outlined shape of the button.
*since the shape which represents shadow is blurred, it could (as shown) put some shadow on the button aswell but it could be prevented with careful choice of strokes width, on both "shadow" and "button" shapes.
Re: How to properly Mask/Clip/Exclude drop shadow filter
Unfortunately just changing the alpha doesn't work. It removes the drop shadow as well, presumably because there is nothing to "block the light" when the alpha is 0.
It worked when I tried it.
1 - draw rectangle
2 - add fill color
3 - apply drop shadow filter
4 - Fill and Stroke dialog > Fill tab > change A slider, not Opacity slider
Hhm....I see....changing Opacity to 0 makes entire thing transparent. Changing the A slider to 0 makes the red rectangle completely transparent, and the drop shadow partially transparent. That seems weird to me, but I can't explain it....??
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: How to properly Mask/Clip/Exclude drop shadow filter
That's okay, thanks for trying! Guess it's gimp to the rescue for this one.
Re: How to properly Mask/Clip/Exclude drop shadow filter
What is the best way to get this cut out?
The fast and easy way is to use the 'cutout' options in the drop shadow dialog, but not always the best result, note in my example the bottom of the drop shadow appears cut off, Depending on the size of your objects your results may be acceptable.
Manual clipping is the best way to get this effect, IMO. The shadow object is below a large rectangle with the shape of the original rounded corner rectangle cut out of it (with difference). The new shape is used to clip the blurred shadow rectangle.
Later edit: Oops, I should add that to use the cutout options you may have to download a more recent build of Inkscape.
- Attachments
-
- clipped cutout.svg
- (48.38 KiB) Downloaded 199 times
Last edited by druban on Mon Jan 30, 2012 8:00 pm, edited 3 times in total.
Your mind is what you think it is.
Re: How to properly Mask/Clip/Exclude drop shadow filter
Oh, that's an awesome effect there, druban!
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: How to properly Mask/Clip/Exclude drop shadow filter
Excellent idea, druban.
I use cutout a lot, but here`s what I got in combination with masking
*red stripe is just transparency reference.
I use cutout a lot, but here`s what I got in combination with masking
*red stripe is just transparency reference.
Re: How to properly Mask/Clip/Exclude drop shadow filter
druban wrote:What is the best way to get this cut out?
Manual clipping is the best way to get this effect, IMO. The shadow object is below a large rectangle with the shape of the original rounded corner rectangle cut out of it (with difference). The new shape is used to clip the blurred shadow rectangle.
Thank you very much!
This is almost working for me, except for a small problem. You probably couldn't have noticed it since you used black as the color of your box before the drop shadow. I think there is a small size difference between the first cutout (difference) and the actual shape. Therefore, a little bit of the color leaks through. It's kind of weird, but when I zoom in, the color disappears, and when I zoom out, it reappears. But it is clearly visible when exported.
Here is the exported bitmap, where it is most obvious (zoomed in):
Zoomed out in inkscape, has a bit of green tint (I took a screenshot, zoomed into the screenshot, and took another screenshot):
And zoomed way in in inkscape, the green almost disappears:
Unless you zoom into the bitmap:
Is this a bug?
Re: How to properly Mask/Clip/Exclude drop shadow filter
Just in case anyone reads this, I was able to take care of the slight outline by increasing the width and height by about .150 pixels each, re-centering over the original object, and then doing difference using the slightly enlarged object.
Re: How to properly Mask/Clip/Exclude drop shadow filter
i believe whaat you are seeing is an expected behaviour when exporting screen resolution bitmaps in which the objects are not aligned with a pixel grid. In this case in particular the clipping object should be aligned with the pixelgrid (rather than the drop shadow, which is soft edged anyway) to give the sharpest effect. Expanding its size may have had the same effect.
Your mind is what you think it is.
Re: How to properly Mask/Clip/Exclude drop shadow filter
druban wrote:i believe whaat you are seeing is an expected behaviour when exporting screen resolution bitmaps in which the objects are not aligned with a pixel grid. In this case in particular the clipping object should be aligned with the pixelgrid (rather than the drop shadow, which is soft edged anyway) to give the sharpest effect. Expanding its size may have had the same effect.
Interesting that it's green though! Did you use green anywhere in the image?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design