How to prevent filter leak without clipping
How to prevent filter leak without clipping
Many filter effects will leak outside it's shape on other objects that surrounds it. If I want the filter only to affect the targeted object, I need to clip it to a duplicate of itself. Is is possible to make sure that a filter effect never exit the shape without clipping it?
-
- Posts: 215
- Joined: Thu Aug 21, 2008 4:08 am
- Location: Belgium
Re: How to prevent filter leak without clipping
Could you tell me which filter causes this kind of problem ?
In most case when it lacks you can add a Composite "In" at the end of a filter and link its second handle to "Source image".
ivan
In most case when it lacks you can add a Composite "In" at the end of a filter and link its second handle to "Source image".
ivan
Re: How to prevent filter leak without clipping
Well, all filters does that.
Last time, I use a filter (can't remember the name) that probably had specular lighting in it.
The idea was to make the shape raise out like if it was made of metal. Now to make the down right interior part of the shape shinning, you needed to use a specular light filter. Now the shinyness exceed the boundaries of the shape making it's surroundings also brighter.
I do not want everthing in a radious to be bright, only a portion of the shape. So the solution I used is to create a duplicate of the shape and clip it to that shape.
I Could give you screenshot if you want.
Last time, I use a filter (can't remember the name) that probably had specular lighting in it.
The idea was to make the shape raise out like if it was made of metal. Now to make the down right interior part of the shape shinning, you needed to use a specular light filter. Now the shinyness exceed the boundaries of the shape making it's surroundings also brighter.
I do not want everthing in a radious to be bright, only a portion of the shape. So the solution I used is to create a duplicate of the shape and clip it to that shape.
I Could give you screenshot if you want.
-
- Posts: 215
- Joined: Thu Aug 21, 2008 4:08 am
- Location: Belgium
Re: How to prevent filter leak without clipping
Here is a file including most Bevel filters with removed glowing effect. If you use a simple Specular light it shouldn't expand outside the shape.
ivan
ivan
- Attachments
-
- no-glow.svg
- (22.24 KiB) Downloaded 179 times
Re: How to prevent filter leak without clipping
You mean that if I want to apply a simple bevel effect to my shape, I only need to use specular light and not all the filter list in the "bevel" menu?
By the way, when I print, it creates some artifacts where the filter expand around the shape. They do not appear on the screen, only when printed. I am not sure if clipping could remove the problem, but I don't see myself duplicating and clipping all the shapes in the document.
I have attached an example of artifact. If you look at the bottom and to the bottom-left, there are lines that should not be there. This is probably because the filter effect size exceed the size of the shape and it creates artifacts on it's edge once printed.
Also note that everytime, I select a shape with a filter on it, the bounding box is much larget than the original shape. So by default, filters leak outside their shape.
By the way, when I print, it creates some artifacts where the filter expand around the shape. They do not appear on the screen, only when printed. I am not sure if clipping could remove the problem, but I don't see myself duplicating and clipping all the shapes in the document.
I have attached an example of artifact. If you look at the bottom and to the bottom-left, there are lines that should not be there. This is probably because the filter effect size exceed the size of the shape and it creates artifacts on it's edge once printed.
Also note that everytime, I select a shape with a filter on it, the bounding box is much larget than the original shape. So by default, filters leak outside their shape.
- Attachments
-
- Line artifacts around the filter border once printed.
- artifact_cut.png (19.77 KiB) Viewed 1933 times
-
- Posts: 215
- Joined: Thu Aug 21, 2008 4:08 am
- Location: Belgium
Re: How to prevent filter leak without clipping
I see the artifacts very well !
Thus as you tell they are only present on the printed result. Do you print directly with Inkscape ? Personnally I don't because Inkscape is not ready for printing. I always save as PDF and print the PDF and never had this kind of problems this way. Of course you have to keep two versions of your document : one Inkscape SVG and one PDF because the latter rasterizes filter effects.
About the bounding box size, this is a part of SVG specifications that you may increase or decrease the filter effect area ; you can change it at the bottom of the Filters Editor in Filters General Settings. For example when you apply a filter with blur, or displacement to very small shapes or text or drawings with stroked lines the bounding box could be too small and your effect will be clipped, thus you must increase the size of the filters area. Perhaps could you try to do that also for printing with Inkscape and see the result. And if it persists you could fill a bug on Launchpad.
ivan
Thus as you tell they are only present on the printed result. Do you print directly with Inkscape ? Personnally I don't because Inkscape is not ready for printing. I always save as PDF and print the PDF and never had this kind of problems this way. Of course you have to keep two versions of your document : one Inkscape SVG and one PDF because the latter rasterizes filter effects.
About the bounding box size, this is a part of SVG specifications that you may increase or decrease the filter effect area ; you can change it at the bottom of the Filters Editor in Filters General Settings. For example when you apply a filter with blur, or displacement to very small shapes or text or drawings with stroked lines the bounding box could be too small and your effect will be clipped, thus you must increase the size of the filters area. Perhaps could you try to do that also for printing with Inkscape and see the result. And if it persists you could fill a bug on Launchpad.
ivan
Re: How to prevent filter leak without clipping
I make PDF before printing.
I could try playing with the boundering box, still, not all shapes are rectangular. Elsewhere on my print, there was some text with a filter where it's boundering box create artifacts. Even if I shrikin the box, it will not make artifacts less visible because the shape does not match the box.
It would be interesting the the filter options to simply have a clip check box since not all filters would need to be clipped. For example, you generally do not want to clip a gaussian blur effect.
I could try playing with the boundering box, still, not all shapes are rectangular. Elsewhere on my print, there was some text with a filter where it's boundering box create artifacts. Even if I shrikin the box, it will not make artifacts less visible because the shape does not match the box.
It would be interesting the the filter options to simply have a clip check box since not all filters would need to be clipped. For example, you generally do not want to clip a gaussian blur effect.
-
- Posts: 215
- Joined: Thu Aug 21, 2008 4:08 am
- Location: Belgium
Re: How to prevent filter leak without clipping
Could you create a simple example file with artifacts and upload it ? I will take a look ans see what's the matter.
ivan
ivan
Re: How to prevent filter leak without clipping
Since the Generated PDF are big, One of the solution I will probably use is to rastarise the whole picture in JPG and then print it as PDF. It should remove any artifacts, and the files will be smaller.