Difficulty with drop shadow filter

Post questions on how to use or achieve an effect in Inkscape.
LachieC
Posts: 2
Joined: Mon Apr 22, 2013 11:08 am

Difficulty with drop shadow filter

Postby LachieC » Mon Apr 22, 2013 11:16 am

Hi Guys,

I've been using inkscape for a while now and I'm really enjoying it for my work ads I have to whip up. Now, I have an issue.
I cannot seem to set drop shadows on text without them being cut off by the object bounding box.

Image

Doesn't seem to matter if I make a large text box for the text to go into, or if I convert the text to paths before hand.

I'm assuming I'm doing something very simple incorrectly, but I've googled my little heart out and just can't figure out what I'm doing wrong.

Any help, GREATLY appreciated.

-LachieC

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Difficulty with drop shadow filter

Postby flamingolady » Mon Apr 22, 2013 4:23 pm

hi, and welcome!
Do you have the stroke or blur set to something other than 0 on the shadow? Are you using a filter on the blue background? It's hard to tell.
It would be helpful if you could attach a copy of the file, so someone on here can see what is happening. It may also be helpful to tell us what your operating system is, etc. The more info we have the better for analyzing it. I'm not very technical on some of these issues, but others are, so figured I could at least ask you for the file and info, as it may save a little time.
I can't say that I've ever had any issue with drop shadows, but haven't done once since upgrading to the latest stable version.

LachieC
Posts: 2
Joined: Mon Apr 22, 2013 11:08 am

Re: Difficulty with drop shadow filter

Postby LachieC » Mon Apr 22, 2013 4:27 pm

I'm on Linux Mint 14; latest version of Inkscape via the repo.

Doesn't seem to matter what background I have etc. To reproduce it I open a new document, put some text on it, filter>shadows-etc>drop shadow>OK.

I've attached a sample file. Thanks for the tips :)
Attachments
shadow-test.svg
(2.8 KiB) Downloaded 459 times

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Difficulty with drop shadow filter

Postby v1nce » Mon Apr 22, 2013 5:34 pm

It looks like the settings of the filter bounding box isn't large enough [*] according to your blur radius + offset.
(Plus your y-offset is badly set : see the l)

*: Which is quite normal coz it's broken by design in svg 1

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

Re: Difficulty with drop shadow filter

Postby Lazur » Mon Apr 22, 2013 7:37 pm

I cannot reproduce the problem with blurring a normal or a flowed text.
Maybe you should update to the latest version of inkscape (?), or, if nothing works, convert the text to path.

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Difficulty with drop shadow filter

Postby Xav » Mon Apr 22, 2013 9:49 pm

v1nce is correct... but he didn't mention how to fix it.

With your object selected open the filter editor (Filters > Filter Editor). The drop shadow should be selected in the list on the left.

At the bottom of the dialogue are two tabs - one for the parameters of the currently selected filter effect, and one for "Filter General Settings" which affect the entire filter. Select this second tab and you'll see two pairs of spinboxes, for "Coordinates" and "Dimensions". These define the maximum area for which Inkscape will calculate the filter - outside of this area the filter is not drawn at all.

The units are in terms of the object's dimensions: the typical values of -0.1, -0.1, 1.2, 1.2 really mean "the top left corner of the filter region is 10% to the left of, and 10% higher up than, the top left of the object. The width of the filter region is 120% of the object width, the height is 120% of the object height." In other words, the filter region extends for 10% of the object size all round the object.

So in your case you need to increase the dimensions - try 1.5, 1.5 or even 1.0, 2.0. You may also need to reduce the coordinates if the shadow is being cut off at the top or the left. Remember, if you reduce the coordinates you'll need to increase the dimensions to keep the bottom right corner of the filter region in the same place.


Why does it work like this? It's because some filters (such as Gaussian blur, as used in your drop shadow) are theoretically infinite, even though the visible effect drops off quite quickly. Rather than spend too long doing a lot of maths these parameters let you set a limitation on how far out the filter should be calculated. For most smaller filters the default values are fine, but if you are trying to push to a particularly large filter by using a big offset or huge blur, you need to adjust the filter region accordingly.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Difficulty with drop shadow filter

Postby v1nce » Mon Apr 22, 2013 10:03 pm

How do you apply the drop shadow filter ?
1) Duplicate text ; set it black ; apply blur from Fill&stroke dialog
2) Filter > shadow & glows > drop shadow

1) automatically adjust the filter bounding box but not 2)

to adjust manually
filters > filter editor
select your filter (name should be drop shadow something)
click "filter generall settings"
adjust offset & width.

[edit]grilled[/edit]

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Difficulty with drop shadow filter

Postby v1nce » Mon Apr 22, 2013 10:08 pm

Xav wrote:Rather than spend too long doing a lot of maths


adding 1/2 kernel width is not "a lot of maths" ;)

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Difficulty with drop shadow filter

Postby Xav » Tue Apr 23, 2013 1:19 am

Off topic:
v1nce wrote:
Xav wrote:Rather than spend too long doing a lot of maths


adding 1/2 kernel width is not "a lot of maths" ;)


I was referring to calculating to a theoretical infinity. From that perspective it makes sense to have some sort of boundary within which to limit the calculations, but I agree that the SVG 1 approach of explicitly specifying that boundary area is, indeed, broken by design. It looks like the working group may be fixing it for SVG 2, with talk of automatically calculating the filter region where possible.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Difficulty with drop shadow filter

Postby v1nce » Tue Apr 23, 2013 8:26 am

Off topic:
Xav wrote:...
From that perspective it makes sense to have some sort of boundary within which to limit the calculations, but I agree that the SVG 1 approach of explicitly specifying that boundary area is, indeed, broken by design. It looks like the working group may be fixing it for SVG 2, with talk of automatically calculating the filter region where possible.


My point was not that much against the lack of automatic computation, but rather against the fact that filter bounding box is expressed as % of shape width/height when most of the time you just want to increase the size by x pixels (typically offset, blur, convolution matrix, displacement..)
And, yes, you're right most of the time the bounding box would be computable

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

Re: Difficulty with drop shadow filter

Postby brynn » Tue Apr 23, 2013 11:34 am

In my experience, you have to be careful about changing the Filter General Settings, i.e. Filter Effects Region. I would make very conservative changes, because if you go too far in any direction, you may introduce other similar issues. :D

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Difficulty with drop shadow filter

Postby v1nce » Tue Apr 23, 2013 5:27 pm

brynn wrote:In my experience, you have to be careful about changing the Filter General Settings, i.e. Filter Effects Region. I would make very conservative changes, because if you go too far in any direction, you may introduce other similar issues. :D


You won't introduce any issue doing this (other than slowing down the filter because there will be more pixels to compute and removing (unwanted) clipping).

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

Re: Difficulty with drop shadow filter

Postby druban » Tue Apr 23, 2013 5:50 pm

Vince is the huge filter expert here :D , but I can offer a little workaround that I have found useful in the past:
Group a completely transparent rectangle with the objects to be blurred. If you have already blurred them and they are not in a group then of course you will have to remove the filter group them and reapply the filter; if they are already in a group you can open the group and draw the rectangle. What this does is to effectively give you on-canvas control of the filter area because the rectangle, while invisible, can be resized in outline view without any effect on the drawing EXCEPT making the filter area larger.
rect1401.png
rect1401.png (23.87 KiB) Viewed 10644 times
Your mind is what you think it is.

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Difficulty with drop shadow filter

Postby v1nce » Wed Apr 24, 2013 3:37 am

druban wrote:Vince is the huge filter expert here :D , but I can offer a little workaround that I have found useful in the past:
Group a completely transparent rectangle with the objects to be blurred. If you have already blurred them and they are not in a group then of course you will have to remove the filter group them and reapply the filter; if they are already in a group you can open the group and draw the rectangle. What this does is to effectively give you on-canvas control of the filter area because the rectangle, while invisible, can be resized in outline view without any effect on the drawing EXCEPT making the filter area larger.
rect1401.png


It looks like you applied filter on every letter instead of the full text, how did you manage to do that ? Was it deliberate ?

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

Re: Difficulty with drop shadow filter

Postby druban » Wed Apr 24, 2013 6:53 am

v1nce wrote:It looks like you applied filter on every letter instead of the full text, how did you manage to do that ? Was it deliberate ?


Just to make the point I guess, I should have said that they are converted to paths and ungrouped before applying the filter.
The top shows the same paths grouped with an invisible rectangle before applying the filter.
Your mind is what you think it is.

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

Re: Difficulty with drop shadow filter

Postby brynn » Thu Apr 25, 2013 3:39 am

v1nce wrote:
brynn wrote:In my experience, you have to be careful about changing the Filter General Settings, i.e. Filter Effects Region. I would make very conservative changes, because if you go too far in any direction, you may introduce other similar issues. :D


You won't introduce any issue doing this (other than slowing down the filter because there will be more pixels to compute and removing (unwanted) clipping).

If you change the Coordinates (under Filter General Settings tab) rather than Dimensions, and you change too far, you will fix the boundary on one side, but you'll start to see the boundary on the opposite side. If you change the Dimensions smaller, you'll make the situation even worse. If you change the Dimensions larger, the object's bounding box gets larger. For those reasons, I suggest very small changes :D

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Difficulty with drop shadow filter

Postby v1nce » Thu Apr 25, 2013 6:07 am

brynn wrote:
If you change the Coordinates (under Filter General Settings tab) rather than Dimensions, and you change too far, you will fix the boundary on one side, but you'll start to see the boundary on the opposite side. If you change the Dimensions smaller, you'll make the situation even worse. If you change the Dimensions larger, the object's bounding box gets larger. For those reasons, I suggest very small changes :D


You're right. I meant enlarging (no, not that part of your anatomy) the width or height.


Return to “Help with using Inkscape”