Why do my blurs have hard edges

Post questions on how to use or achieve an effect in Inkscape.
peterfreeth
Posts: 2
Joined: Tue Dec 08, 2015 9:46 am

Why do my blurs have hard edges

Postby peterfreeth » Tue Dec 08, 2015 9:59 am

I am creating an image which has a blurred line and I have a problem with the outer edges of the blurred path.

Whatever I try, the outside edges of the path don't blur gradually, the blur for a while then stop abruptly, resulting in a nasty hard edge to the blur.

The path is not filled, so it's the line that I'm blurring using the blur amount slider in the object fill & stroke dialogue box.

My path is around 10px in thickness, the blur amount is around 3.0 to 5.0

The effect I'm creating is a soft glow around the outline of a lightbulb.

I've tried making the line thicker and thinner, increasing and decreasing the blur ratio, nothing seems to solve the problem.

As you'll see in the attached image, the blurring is fine right up until the outermost edges i.e. the tallest and widest parts. It's as if Inkscape decides the path is smaller than it actually is, and cuts off the PNG rendering. You might not see it clearly in the full image, so the smaller image shows the edge in closeup. Don't say it doesn't look that bad, this is for a book cover, it looks bad.

I've tried putting the path on a larger background and exporting the whole thing, but that's a problem because I'm then using the image in Scribus over a graduated background.

Any ideas? This is actually a problem I've always had with Inkscape once the blur radius gets to a certain size, but it's never been a big enough problem to look for a solution until now.

Thanks.
Attachments
path6261a.png
path6261a.png (26.1 KiB) Viewed 3687 times
path6261.png
path6261.png (159.75 KiB) Viewed 3688 times

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Why do my blurs have hard edges

Postby Moini » Tue Dec 08, 2015 10:11 am

Hi Peter,

try the solution posted here by Mc only recently:
https://answers.launchpad.net/inkscape/+question/275477
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

peterfreeth
Posts: 2
Joined: Tue Dec 08, 2015 9:46 am

Re: Why do my blurs have hard edges

Postby peterfreeth » Tue Dec 08, 2015 8:43 pm

Thank you - it was a bit fiddly to work out how to use it, and it creates huge PNGs which I then have to crop down with GIMP, but at least I get smooth edges.

For future readers, the settings in filter editor -> general settings apply not to the filter in general but to the specific filter that is assigned to an object. For blur, you first have to select the filter 'gaussian blur' and the 4 settings move the box that the filter sits inside, so by making the boundaries further away, the blurred edge isn't cut off sharply.

Many thanks.

User avatar
Espermaschine
Posts: 892
Joined: Thu Jun 05, 2014 9:10 pm

Re: Why do my blurs have hard edges

Postby Espermaschine » Tue Dec 08, 2015 9:10 pm

I never quite understand why people are doing this.
Okay, so its fully scalable because its vector.
But that is also a question of how you are going to use your artwork. Is it a poster or an 800px image for a website ?

I find working with Blur in Inkscape painful. It slows everything down, the sliders are messy and there is little control.
Thats why i would always work on my base art in Inkscape, import it into Gimp and add the glows there.
So much easier and you can tune everything nicely with alpha curves, layermodes, colorize, layer glows, etc.

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

Re: Why do my blurs have hard edges

Postby Xav » Tue Dec 08, 2015 9:51 pm

Espermaschine wrote:I never quite understand why people are doing this.
Okay, so its fully scalable because its vector.
But that is also a question of how you are going to use your artwork. Is it a poster or an 800px image for a website ?


You could make the same argument about almost any aspect of Inkscape. Why bother creating vector graphics at all? Sure, they're scalable, but they're slower to render and aren't as portable as a bitmap.

There are, of course, many reasons why you might prefer to create a vector graphic: it's easier to make subsequent edits, it can be used dynamically on a web page and modified with Javascript, it's easier to re-use individual elements between different images. It might just be that people don't want to learn how to use two programs if they can already achieve what they want with one.

As has often been said about Microsoft Word: people only use about 10% of the features - but they don't all use the same 10%. Just because it's not the right option for you, it doesn't mean that it's not the right option for someone else. Besides, if we start answering every Inkscape question with replies about how to do it in some other program instead, we may as well give up now!
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

User avatar
Espermaschine
Posts: 892
Joined: Thu Jun 05, 2014 9:10 pm

Re: Why do my blurs have hard edges

Postby Espermaschine » Tue Dec 08, 2015 10:16 pm

Xav wrote:You could make the same argument about almost any aspect of Inkscape. Why bother creating vector graphics at all? Sure, they're scalable, but they're slower to render and aren't as portable as a bitmap.

I disagree. Most aspects of Inkscape work very well, but Blur doesnt.

There are, of course, many reasons why you might prefer to create a vector graphic: it's easier to make subsequent edits, it can be used dynamically on a web page and modified with Javascript, it's easier to re-use individual elements between different images. It might just be that people don't want to learn how to use two programs if they can already achieve what they want with one.

Agreed.

As has often been said about Microsoft Word: people only use about 10% of the features - but they don't all use the same 10%. Just because it's not the right option for you, it doesn't mean that it's not the right option for someone else. Besides, if we start answering every Inkscape question with replies about how to do it in some other program instead, we may as well give up now!

Right, i get it and i can see why this can be annoying.
On the other hand, why make everything so hard ?
Is it about the program or is it about the art you want to make ?

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

Re: Why do my blurs have hard edges

Postby v1nce » Tue Dec 08, 2015 10:46 pm

What's wrong with blur ?

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

Re: Why do my blurs have hard edges

Postby Xav » Tue Dec 08, 2015 10:56 pm

Espermaschine wrote:
Xav wrote:You could make the same argument about almost any aspect of Inkscape. Why bother creating vector graphics at all? Sure, they're scalable, but they're slower to render and aren't as portable as a bitmap.

I disagree. Most aspects of Inkscape work very well, but Blur doesnt.


I won't deny that blur is slow, but that doesn't automatically make it bad. Any complex filter can slow Inkscape down - it's the penalty for having everything "live". But a complex drawing, or too many clones of clones of clones can also slow it down. None of which are bad things, they just expose a different trade-off between speed and flexibility than you get with a bitmap editor.

In using a bitmap editor you only have the hit of calculating the blur once, but then it's fixed and uneditable. Need to make a change? Delete the layer and try again. It may be faster, but it's more hassle to make a small tweak. Speed vs flexibility.


The there's the question of fidelity when moving your work from one program to another. The GIMP does a reasonable job of importing an SVG file, but it doesn't always accurately reproduce the image as it appears in Inkscape. You could export an XCF file from Inkscape, of course, but now you have to think more about how you arrange your layers in order to be able to blur things in The GIMP, since you lose the ability to blur on a per-object basis. In either case you also have to make a decision about the final resolution of your image at this point: get that too wrong and you have no choice but to re-export/import and go through your bitmap edits all over again.


There is definitely a role for combining vector and bitmap editors into a single workflow, and in some cases it may be better to blur some objects in The GIMP rather than in Inkscape. But your original reply suggested that there was no point using Inkscape's blur at all, when you can use the one in The GIMP instead: that may work well for you, but it doesn't make it a general solution for everyone, and certainly doesn't address the question the OP posted.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

User avatar
Espermaschine
Posts: 892
Joined: Thu Jun 05, 2014 9:10 pm

Re: Why do my blurs have hard edges

Postby Espermaschine » Tue Dec 08, 2015 11:34 pm

Heres the problem with your argumentation:
peterfreeth wrote:Thank you - it was a bit fiddly to work out how to use it, and it creates huge PNGs which I then have to crop down with GIMP, but at least I get smooth edges.

So he has to use Gimp anyway...

Xav wrote:In using a bitmap editor you only have the hit of calculating the blur once, but then it's fixed and uneditable. Need to make a change? Delete the layer and try again.

Not entirely correct, you can manipulate a Blur in Gimp with an alpha curve (extend or detract).


I get what you are saying. We have slightly different point of views in this matter, and thats why our arguments are kind of going past each other.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Why do my blurs have hard edges

Postby Moini » Wed Dec 09, 2015 12:03 am

Just in case someone else stumbles about this and gets horrified (I'm sure the regulars here know about these) ;) :

There are a few things you can do to make working on files that have many filters applied faster.

In the Preferences -> Rendering: Set the rendering quality to a lower setting, raise the number of threads used for rendering filters.
In the View menu -> Choose 'No filters' display mode or even 'outline' while working when zoomed in closely.
Avoid using sliders, rather choose to enter numbers directly, so the intermediate steps won't be calculated.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

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

Re: Why do my blurs have hard edges

Postby Xav » Wed Dec 09, 2015 1:31 am

Espermaschine wrote:Heres the problem with your argumentation:
peterfreeth wrote:Thank you - it was a bit fiddly to work out how to use it, and it creates huge PNGs which I then have to crop down with GIMP, but at least I get smooth edges.

So he has to use Gimp anyway...


No, he doesn't. It sounds like he's set the size of the filter area too high, so he could just reduce that. Or, given that he's exporting PNGs, he could explicitly set the dimensions of the output in the export dialog. Or he could use any one of a number of other tools to crop the image. The fact that he's chosen to use The GIMP to crop the image should have no bearing on whether or not it's the right tool for adding blurs.


Espermaschine wrote:
Xav wrote:In using a bitmap editor you only have the hit of calculating the blur once, but then it's fixed and uneditable. Need to make a change? Delete the layer and try again.

Not entirely correct, you can manipulate a Blur in Gimp with an alpha curve (extend or detract).


That's not the same thing at all, even if the visible result is similar in some cases. Applying an alpha curve won't let you...

  • Extend the blur beyond its original size (e.g. going from 5px to 50px or even 500px).
  • Modify the amount of blur in the x direction by a different amount to the y direction.
  • Apply blur to an object before transforming it (e.g. rotate or skew), (I don't count using The GIMP's own bitmap-based transformations, as that doesn't produce the same result).
  • Dynamically change the blur in a web page, using javascript.
  • Apply the blur to an object that's then cloned, such that any of the above changes also affect the clones


If you want to use The GIMP for your blurs, that's fine. Suggesting it as an alternative approach is also welcome - as is drawing attention to the limitations of both approaches. But making broad statements which imply that there's something inherently wrong with Inkscape's blur filter, or that using The GIMP for this is always a better option, is potentially confusing and misleading to the many new Inkscape users who visit the forum.


Moini wrote:There are a few things you can do to make working on files that have many filters applied faster.

In the Preferences -> Rendering: Set the rendering quality to a lower setting, raise the number of threads used for rendering filters.
In the View menu -> Choose 'No filters' display mode or even 'outline' while working when zoomed in closely.
Avoid using sliders, rather choose to enter numbers directly, so the intermediate steps won't be calculated.


All very good points. I also prefer to not work with a maximised or full-screen window. Redraw speed is partially dependent on the amount of the canvas that is visible, so I tend to keep that relatively small by reducing the window size whilst using the space outside to hold any dialogs (rather than using docked dialogs).

See also this thread: viewtopic.php?f=6&t=12160
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

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

Re: Why do my blurs have hard edges

Postby brynn » Wed Dec 09, 2015 3:43 am

Off topic:
Espermaschine wrote:On the other hand, why make everything so hard ?
Is it about the program or is it about the art you want to make ?


Probably a lot of different reasons. For me, I would have a learning curve trying to do much of anything in a raster editor. I don't think of GIMP as easy to use. But if I had learned GIMP before Inkscape, it might seem easier. To me, Inkscape blurs are easy, and masks confuse the heck out of me!

User avatar
Espermaschine
Posts: 892
Joined: Thu Jun 05, 2014 9:10 pm

Re: Why do my blurs have hard edges

Postby Espermaschine » Wed Dec 09, 2015 7:23 am

Wow Xav, are you misinterpreting me on purpose to protect your precious vector program ?
Im on your side, you know.

No need to patronize me.

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

Re: Why do my blurs have hard edges

Postby Xav » Wed Dec 09, 2015 6:13 pm

Espermaschine wrote:Wow Xav, are you misinterpreting me on purpose to protect your precious vector program ?
Im on your side, you know.

No need to patronize me.


If I misinterpreted you it certainly wasn't on purpose, and it's not my intention to patronise you. I simply felt that your original post suggested that using Inkscape's blur was a bad idea, and that it's better to use The GIMP for that. Those of us that have been using Inkscape for a while probably have a reasonable understanding of the pros and cons of each approach, but blanket statements like that can easily be picked up by new users who don't yet have that background knowledge. If I misinterpreted you then it's possible that a new user would do the same, leading to the mistaken idea that Inkscape's blurs are fundamentally broken in some way.

I don't want to imply that discussing out-of-Inkscape alternatives shouldn't be allowed, or that we should pretend that Inkscape doesn't have its fair share of issues (and, indeed, slowdowns due to filters is one of them). But rather than "I never quite understand why people are doing this", which might suggest that the OP's approach is somehow wrong, it's surely better to lead with "if you're familiar with The GIMP, you can export your Inkscape drawing as a layered XCF file and add the blurs there; the result won't be scalable any more, but personally I find it easier to work with."
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter


Return to “Help with using Inkscape”