Blur Gradient

Flesh out your ideas for new or improved Inkscape features before submitting a request.
User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Blur Gradient

Postby BobSongs » Mon Jul 19, 2010 1:49 pm

An idea to consider adding to Inkscape would be a blur gradient.

:tool_rectangle: Currently, a user has access to two gradients (or may blend both gradient effects in the same object):

  1. use a transparency gradient: from an opaque colour of one's choice on one end blending to complete transparency on the other.
  2. use a color gradient: from a solid colour of one's choice on one end blending to a different colour on the other.

the concept of gradient blur
An object drawn, a rectangle for the purpose of this illustration, could be set to a blur of 0 on one end blending to a blur of a different number (example: 4) on the other end. This would give objects a sense of depth that is often seen when photographing model towns, etc., with a wide aperture, giving a narrow depth of field.

layered effect
The gradient would affect all objects "beneath" it on the same layer if the object in question is transparent. Example:

  1. Create a rectangle.
  2. Set it to No Stroke.
  3. Set the Fill to 100% transparent.
  4. Set our "gradient" blur from 0 to 4.
  5. Place the rectangle over a variety of objects in the work area: triangles, text, imported images, ellipses, spirals, etc.
  6. Objects closer to the 0 blur edge of the rectangle would all display the least amount of blur.
  7. Objects closer to the 4-blur edge of the rectangle would all display the larger amount of blur.

As with other gradients, a varied number of "stops" can be added, allowing for a gradient of 4 blur to 0 blur to 5 blur (for example).

Thoughts? Ideas? Improvements? Objections?
Last edited by BobSongs on Sun May 19, 2013 7:31 am, edited 2 times in total.

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

Re: Gradient Blur

Postby brynn » Mon Jul 19, 2010 6:05 pm

My only comment would be to call it a Blur Gradient.
In English, blur describes the gradient, omgosh grade school was SO long ago....adjective, that's it :oops: The adjective belongs in front of the noun. Because I often use a blur on a regular gradient, and before I read your message, I thought by the title, that's what it was going to be about. (Yes, I always got A's in English.)

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: Gradient Blur

Postby BobSongs » Tue Jul 20, 2010 7:17 am

*giggles*

Hey! Feel free to call it Blueberry Covered Cheesecake. As long as it can be implemented fairly easily, any name would please me immensely. ;) Pardon my grammatical errors. Sometimes my French syntax sneaks thru. I do re-read my text and try to catch those sneaky foxes, but I don't always manage to win. :lol:

So? What do you think of the idea? Blur is already incorporated in Inkscape. Gradient technology too. Why not marry the two ideas and give the Inkscape-using community a nice new tool.

Perhaps all it would take is a plug-in to draw from already integrated features, I dunno. :geek: Just thought I'd put the idea out there. I've kinda hoped it would be a usable feature by now. But since it doesn't seem to be on the horizon, I figured I'd submit the idea here.

hoshi411
Posts: 4
Joined: Sat Jun 12, 2010 2:43 am

Re: [Renamed] Blur Gradient

Postby hoshi411 » Mon Nov 08, 2010 10:29 am

i really need this feature right now. I`m trying to create a 3d drop shadow and real shadows are not blurred to the same degree all around. I need to blur the shadow in varying degrees. where the shadow is closest to it`s object the blur should be less and where it is further away the blur needs to increase. isn`t there a way to select the node that you want to blur and increase blur to different nodes??

scruffyeagle
Posts: 22
Joined: Sun Nov 07, 2010 7:19 pm

Re: [Renamed] Blur Gradient

Postby scruffyeagle » Thu Nov 11, 2010 9:00 pm

I think the Blur Gradient is a great idea, but perhaps a better term for the manner in which you envision it being used might be that the blurring construct is a "lens" that could be moved to affect the manner in which features it affects get perceived.

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

Re: [Renamed] Blur Gradient

Postby brynn » Fri Nov 12, 2010 9:37 am

Oh, so you're saying that instead of a rectangle, it should be a circle? And then the blur would be defined radially rather than linear-ly? I think BOTH would be nice to have!

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: [Renamed] Blur Gradient

Postby BobSongs » Mon Nov 22, 2010 6:06 am

NOTE: for those reading this thread in hopes of finding a way to do gradient blur...

First: this isn't the forum to place requests for Inkscape itself. My bad. I was just thinking that this blur-gradient would be so very useful.

Second: Inkscape (while a very effective tool, quite powerful and effective at managing and creating SVG documents) has a limitation. It creates and manages SVG files. And SVG files have specifications just like HTML. We have to allow the SVG committee time to consider options for SVG before they'll ever be implemented in Inkscape.

Third: While this is Inkscape's finest forum, it's true that requests for ideas should be submitted to bugs.launchpad.net/inkscape for consideration.

Fourth: at present there are a number of requests lodged at launchpad:

https://bugs.launchpad.net/inkscape/+bug/172099
https://bugs.launchpad.net/inkscape/+bug/171800
https://bugs.launchpad.net/inkscape/+bug/171945

... among others. Inkscape staff are aware of the request for this feature. Now it's a matter of a plug-in to be created for the task, though the net result probably won't meet SVG specifications for some time to come.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: [Renamed] Blur Gradient

Postby ~suv » Mon Nov 22, 2010 11:17 am

BobSongs wrote:Now it's a matter of a plug-in to be created for the task, though the net result probably won't meet SVG specifications for some time to come.
As plug-in (new gradient type added to the internal renderer) it is unlikely to get into Inkscape (IMHO) - see what happened with 'Flowed text' for example... (implemented based on an earlier SVG working draft, and incompatible with the current spec, working drafts for future specs and any other SVG renderer).

See also: SVG WorkingGroup - Inkscape Wiki

Or do you mean an extension that applies an effect e.g. made of differently masked copies (like in this prove of concept: depth of field) to simulate a 'blur gradient' (maybe similar to the extensions 'Inset/outset Halo' and 'Edge 3d') or a preset filter effect (implementing - if possible - blurred gradients with current available filter effect primitives, to be compatible with other renderers) as hinted at in this comment [1]?


[1] see attachment for an example of a gradient blur as SVG filter effect (Inkscape's renderer displays some small glitches, but it's a blur varied along the shading of a black-to-white gradient of an overlaying shape). Note that it's just a test - I'm not very experienced in creating new filter effects - and maybe it's already among one of the presets? Also, the effect needs the 'enable-background' tag added.
Attachments
gradient-blur-1.svg
(14.31 KiB) Downloaded 416 times
gradient-blur-1.png
gradient-blur-1.png (135.55 KiB) Viewed 11258 times

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: [Renamed] Blur Gradient

Postby BobSongs » Wed Dec 08, 2010 4:44 am

I suppose this brings us to what is on my mind about Inkscape Ideas.

Many people will probably disagree with the following, but I hope for a day when there are two branches of Inkscape: one that faithfully creates SVG files that comply 100% with the standards. Files it produces would be accurately displayed in browsers, etc. The other branch would have all this plus a wider selection of tools that work far beyond the scope and/or limitations of SVG, providing the OpenSource artistic community with a tool that rivals other software such as CorelDRAW.

The blur in one of the examples you gave was a combination of a variety of effects. Clever, but hardly what one would call "easy". I'm seeing a plug-in/extension that would easily be applied both to vectors and to bitmaps.

The technique of using two or more images with various levels of blur, masks and other wizardry would leave most users hoping for a tool as simple as creating a shape that would blur all things under it.

:)

UncleJoe
Posts: 9
Joined: Fri Mar 15, 2013 11:23 pm

Re: [Renamed] Blur Gradient

Postby UncleJoe » Fri May 17, 2013 7:19 am

I'm interested in creating a depth of field effect with a variable blur and I've created an example (only works in Inkscape - IE10 is supposed to support the background image as the source but I couldn't get it to work). I did it using a blur filter with the rarely used background image as the source and then approximating a gradient with a bunch of rectangles, each with a different blur radius. But there are several problems:

1. Takes time to create the rectangles
2. There's an ugly crease at the borders

Can anyone propose quick solutions to the problems?
Attachments
depth_of_field.svg
(140.32 KiB) Downloaded 354 times

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

Re: [Renamed] Blur Gradient

Postby v1nce » Fri May 17, 2013 9:51 am

UncleJoe wrote:
Can anyone propose quick solutions to the problems?


overlay a white rect with an alpha gradient.
the filter will be applied onto this rect.
backgroundimage * source alpha + (backgroundimage * blur) * (1 -source alpha)

UncleJoe
Posts: 9
Joined: Fri Mar 15, 2013 11:23 pm

Re: [Renamed] Blur Gradient

Postby UncleJoe » Fri May 17, 2013 10:58 pm

v1nce, I've tried your suggestion (single_blur) but it doesn't look very convincing:

single_blur.png
single_blur.png (227.3 KiB) Viewed 9771 times


My alpha ramp was alpha = [0 0 0 0 0.1 0.2 0.4 0.6 0.8 1] (equally spaced steps)
and the blurred image used a radius of 7

Maybe there's a better ramp, but overall, the effect looks more like fog than depth of field.

multiple_blurs.png
multiple_blurs.png (219.8 KiB) Viewed 9771 times


Note that I wasn't able to do your proposed method in Inkscape due to not being familiar with SVG filter composition. Ahh, looks like I'm going to have to just blur the image in Gimp and then import it back into Inkscape as a texture.

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

Re: [Renamed] Blur Gradient

Postby Lazur » Fri May 17, 2013 11:41 pm

To add more depth to that road, change the colours as well.
Usual scenery looks as the light source -Sun- is in the front, and, objects in the distance appear lighter than in the foreground.
That can produce some dramatic looks, like "tunnel of light".

Image

UncleJoe
Posts: 9
Joined: Fri Mar 15, 2013 11:23 pm

Re: [Renamed] Blur Gradient

Postby UncleJoe » Sat May 18, 2013 5:20 am

Right, I had a tunnel of light in one of my comic scenes, but it took a long time to make, unless if I make it fade completely to white.

I also found an example of SVG depth of field here: http://hrum.deviantart.com/art/inkscape-blure-46507939
It's using the same method as proposed by v1nce, but not using filters. Even though that didn't work as good for my floor, it seems it works good enough for the pen since there are no sharp features to recognize.

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: [Renamed] Blur Gradient

Postby BobSongs » Sat May 18, 2013 4:59 pm

~suv wrote:Or do you mean an extension that applies an effect e.g. made of differently masked copies (like in this prove of concept: depth of field) to simulate a 'blur gradient' (maybe similar to the extensions 'Inset/outset Halo' and 'Edge 3d') or a preset filter effect (implementing - if possible - blurred gradients with current available filter effect primitives, to be compatible with other renderers) as hinted at in this comment [1]?

I understand now what I was thinking. I imagined it like this.

Inkscape's current color system for Fill and Stroke are based on #RRGGBB and AA (red / green / blue / alpha).

How I see a blur gradient would be #RRGGBBAAGG: Red / Green / Blue / Alpha / Gaussian blur. An object's fill with #000000FF00 would be black, not transparent or blurred. However, #FFFFFFFF20 would render the object white with no transparency and a gaussian blur of 32 of 255.

Image
My mockup of what it would look like to have Gaussian blur as part of the Hex.

This would also be part of the Line Gradient Tool working and behaving much like how we adjust the Alpha level:

Image
My mockup of adding Gaussian blur to the Line Gradient tool

This would remove the need for working with a mask. The Gaussian blur slider is already part of the Fill and Stroke.

I realize this is not SVG. I'm not suggesting it is. But this would be an interesting approach to using blur: as part of the RGB and Alpha numbers.

Just as the angle of colour and alpha gradients are be set by the :tool_gradient: tool (for both fill and stroke), :tool_gradient: would also determine the direction of the angle of the gaussian blur:

Image

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

Re: [Renamed] Blur Gradient

Postby Lazur » Sat May 18, 2013 10:10 pm

That would be an interesting thing to have for the blur.
Like with that, you could add gradients to the blur levels.

But.
Blurring makes the object's bounding box bigger by default,
which implies that such filter works outside the original object's coordinates as well.
Thus, how could you add it to an object's settings, when those settings are only for the coordinates of the path, and nothing outside of it?
Like there are three recent topics on blur filter cutting off at an edge of a filter.
That may cause trouble for the implementation.

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: [Renamed] Blur Gradient

Postby BobSongs » Sun May 19, 2013 12:45 am

Lazur URH wrote:...Blurring makes the object's bounding box bigger by default...

Currently, yes.

Lazur URH wrote:That may cause trouble for the implementation.

*shrugs*
I was asked how I saw the blur gradient work. I realize my request would require a few things:

  • Adding two zeros to the hex code: from #000000FF to #000000FF00. Two zeros would probably cause more headaches than I could ever imagine. I'm aware of this.
  • Defying SVG specifications to the point where I should be thrown in jail for suggesting it, or beaten for even thinking it. :lol: I'm painfully aware of this too.
  • Jostling the current patchwork of code to the point of where this suggestion would mean too much effort to get it going. I've only recently come to an awareness of this.
Shall I go on?

You will note the date of my original suggestion: July 18, 2010. This idea was never implemented. I don't believe it ever will be. To my surprise this topic resurfaced. As I reviewed it, it dawned on me: the amount of Alpha applied is seen at the end of the hex value, normally RGB (#RRGGBB): #RRGGBBAA. So why not the Gaussian blur? The Blur is the only slider tool in the Fill & Stroke box that doesn't add a value to the object's hex code (forgive my abuse of proper developer terms).

Is the bounding box really an issue? I'd want to hear that directly from a developer. The bounding box may grow, but the object's borders do not (create rectangle, add a Gaussian blur of 25; the objects nodes remain in place and the box's edges are still visible when View > Display Mode > Outline is applied). The line that determines the direction of the blur would still be in relation to the object's borders and not its shifting bounding box. We already see this when we add a colour gradient to an object that has Gaussian blur.
Last edited by BobSongs on Tue May 21, 2013 1:34 pm, edited 2 times in total.

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

Re: [Renamed] Blur Gradient

Postby brynn » Sun May 19, 2013 1:04 am

The bounding box would only grow if the user uses visual bounding box. Geometric bb shouldn't see larger bb....right?


Return to “Inkscape Ideas”