Filter effect and blur background
Hi,
Please first take a look at this picture composited in photoshop: http://ftpmerou.free.fr/inkscape/blur-background.png
I tried to reproduce the same effect in inkscape easilly, and i made it by using a copy of the picture, bluring it and applying a mask with a shape to simulate the effect: http://ftpmerou.free.fr/inkscape/blur-background-fakebymask.svg
It's ok now, but I thought about filter effects (background image can be used as a connection link in the filter editor) and saw this: http://www.w3.org/TR/SVG/filters.html#AccessingBackgroundImage
On http://wiki.inkscape.org/wiki/index.php/Filter_Effects there is a note about this property "There's no GUI for setting the enable-background property. This property has to be set on some parent layer of filtered object to make Background Image and Background Alpha input images work."
Does the background image support is implemented? Do you think that the same effect can be achieved with filters by applying the effect on a shape (that will blur its background content)?
I'm not that familiar with filter effects, but I almost got it with this:
1. put your shape over the image 2. add a composite effect (atop) to a filter on the shape with the first input being "background image" and the second being "source graphic" 3. add a gaussian blur to to the filter, input directly from the composite effect
The problem is that the whole rectangular region of the shape is blurred. I'm sure there's an easy way to get just the shape to blur the underlying image which shows through it, but I don't know how. I tried again with a composite effect after the blur, but I didn't get anywhere with that.
Anyone else?
JF
On 03/30/2010 05:15 AM, Yann Papouin wrote:
Hi,
Please first take a look at this picture composited in photoshop: http://ftpmerou.free.fr/inkscape/blur-background.png
I tried to reproduce the same effect in inkscape easilly, and i made it by using a copy of the picture, bluring it and applying a mask with a shape to simulate the effect: http://ftpmerou.free.fr/inkscape/blur-background-fakebymask.svg
It's ok now, but I thought about filter effects (background image can be used as a connection link in the filter editor) and saw this: http://www.w3.org/TR/SVG/filters.html#AccessingBackgroundImage
On http://wiki.inkscape.org/wiki/index.php/Filter_Effects there is a note about this property "There's no GUI for setting the enable-background property. This property has to be set on some parent layer of filtered object to make Background Image and Background Alpha input images work."
Does the background image support is implemented? Do you think that the same effect can be achieved with filters by applying the effect on a shape (that will blur its background content)?
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Here is my proposal. The filter is applied to the layer on top. But unfortunately it remains a lot of artefacts in rendering.
The process is the following :
1° draw your background object
2° add a new layer and turn its blend mode to Multiply
3° draw a white shape inside your layer on top
4° open the Filters editor and modify the filter you see as in my joined file.
ivan
________________________________ De : Joshua Facemyer <jfacemyer@...400...> À : Yann Papouin <yann.papouin@...400...> Cc : Inkscape Devel List inkscape-devel@lists.sourceforge.net Envoyé le : Mar 30 mars 2010, 15 h 50 min 35 s Objet : Re: [Inkscape-devel] Filter effect and blur background
I'm not that familiar with filter effects, but I almost got it with this:
1. put your shape over the image 2. add a composite effect (atop) to a filter on the shape with the first input being "background image" and the second being "source graphic" 3. add a gaussian blur to to the filter, input directly from the composite effect
The problem is that the whole rectangular region of the shape is blurred. I'm sure there's an easy way to get just the shape to blur the underlying image which shows through it, but I don't know how. I tried again with a composite effect after the blur, but I didn't get anywhere with that.
Anyone else?
JF
On 03/30/2010 05:15 AM, Yann Papouin wrote:
Hi,
Please first take a look at this picture composited in photoshop: http://ftpmerou.free.fr/inkscape/blur-background.png
I tried to reproduce the same effect in inkscape easilly, and i made it by using a copy of the picture, bluring it and applying a mask with a shape to simulate the effect: http://ftpmerou.free.fr/inkscape/blur-background-fakebymask.svg
It's ok now, but I thought about filter effects (background image can be used as a connection link in the filter editor) and saw this: http://www.w3.org/TR/SVG/filters.html#AccessingBackgroundImage
On http://wiki.inkscape.org/wiki/index.php/Filter_Effects there is a note about this property "There's no GUI for setting the enable-background property. This property has to be set on some parent layer of filtered object to make Background Image and Background Alpha input images work."
Does the background image support is implemented? Do you think that the same effect can be achieved with filters by applying the effect on a shape (that will blur its background content)?
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
000PS ! Here is another one which only blurs the background image...!
________________________________ De : Joshua Facemyer <jfacemyer@...400...> À : Yann Papouin <yann.papouin@...400...> Cc : Inkscape Devel List inkscape-devel@lists.sourceforge.net Envoyé le : Mar 30 mars 2010, 15 h 50 min 35 s Objet : Re: [Inkscape-devel] Filter effect and blur background
I'm not that familiar with filter effects, but I almost got it with this:
1. put your shape over the image 2. add a composite effect (atop) to a filter on the shape with the first input being "background image" and the second being "source graphic" 3. add a gaussian blur to to the filter, input directly from the composite effect
The problem is that the whole rectangular region of the shape is blurred. I'm sure there's an easy way to get just the shape to blur the underlying image which shows through it, but I don't know how. I tried again with a composite effect after the blur, but I didn't get anywhere with that.
Anyone else?
JF
On 03/30/2010 05:15 AM, Yann Papouin wrote:
Hi,
Please first take a look at this picture composited in photoshop: http://ftpmerou.free.fr/inkscape/blur-background.png
I tried to reproduce the same effect in inkscape easilly, and i made it by using a copy of the picture, bluring it and applying a mask with a shape to simulate the effect: http://ftpmerou.free.fr/inkscape/blur-background-fakebymask.svg
It's ok now, but I thought about filter effects (background image can be used as a connection link in the filter editor) and saw this: http://www.w3.org/TR/SVG/filters.html#AccessingBackgroundImage
On http://wiki.inkscape.org/wiki/index.php/Filter_Effects there is a note about this property "There's no GUI for setting the enable-background property. This property has to be set on some parent layer of filtered object to make Background Image and Background Alpha input images work."
Does the background image support is implemented? Do you think that the same effect can be achieved with filters by applying the effect on a shape (that will blur its background content)?
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Tue, 30 Mar 2010 11:15:26 +0200 Yann Papouin <yann.papouin@...400...> kirjoitti:
On http://wiki.inkscape.org/wiki/index.php/Filter_Effects there is a note about this property "There's no GUI for setting the enable-background property. This property has to be set on some parent layer of filtered object to make Background Image and Background Alpha input images work."
Does the background image support is implemented? Do you think that the same effect can be achieved with filters by applying the effect on a shape (that will blur its background content)?
Seems you've received a couple responses already while I was writing this. however, I'll explain the background here a bit.
The renderer does support background images and can do the effect you are looking for. What that wiki page is trying to tell, the GUI is somewhat incomplete. You'll need to use the XML editor to add the enable-background:new property to a suitable layer or apply a non-default layer blending mode (which will automatically add enable-background:new to the root layer of the document)
Also, shamelessly promoting my own blog posts here ;) http://fedev.blogspot.com/2007/05/its-beginning-to-seem-that-my-planned.html
I created my own version of this filter, too. For the enable-background stuff, take a look at the layer1 in Inkscape XML editor. Anything inside layer1 will now be able to access the background image - but only inside layer1. If you were to place stuff in layer under layer1, that wouldn't be counted as background for filtering purposes.
This should be a simple solution with merge or composite; however there are difficulties with the svg 1.1 spec, which are fixed with svg 1.2 (the background is rendered twice).
Is this something that can be fixed now, or does it need to wait until we are moving on to svg 1.2 support?
JF
On 03/30/2010 11:34 AM, Niko Kiirala wrote:
Tue, 30 Mar 2010 11:15:26 +0200 Yann Papouin<yann.papouin@...400...> kirjoitti:
On http://wiki.inkscape.org/wiki/index.php/Filter_Effects there is a note about this property "There's no GUI for setting the enable-background property. This property has to be set on some parent layer of filtered object to make Background Image and Background Alpha input images work."
Does the background image support is implemented? Do you think that the same effect can be achieved with filters by applying the effect on a shape (that will blur its background content)?
Seems you've received a couple responses already while I was writing this. however, I'll explain the background here a bit.
The renderer does support background images and can do the effect you are looking for. What that wiki page is trying to tell, the GUI is somewhat incomplete. You'll need to use the XML editor to add the enable-background:new property to a suitable layer or apply a non-default layer blending mode (which will automatically add enable-background:new to the root layer of the document)
Also, shamelessly promoting my own blog posts here ;) http://fedev.blogspot.com/2007/05/its-beginning-to-seem-that-my-planned.html
I created my own version of this filter, too. For the enable-background stuff, take a look at the layer1 in Inkscape XML editor. Anything inside layer1 will now be able to access the background image - but only inside layer1. If you were to place stuff in layer under layer1, that wouldn't be counted as background for filtering purposes.
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Thanks for the explanation and the solution !
However I suppose the kind of rendering artefacts seen on the joined png has been noticed a long time before. It occurs with every versions of Inkscape and at every render quality for blur and filters.
________________________________ De : Niko Kiirala <niko@...1267...> À : inkscape-devel@lists.sourceforge.net Envoyé le : Mar 30 mars 2010, 17 h 34 min 37 s Objet : Re: [Inkscape-devel] Filter effect and blur background
Tue, 30 Mar 2010 11:15:26 +0200 Yann Papouin <yann.papouin@...400...> kirjoitti:
On http://wiki.inkscape.org/wiki/index.php/Filter_Effects there is a note about this property "There's no GUI for setting the enable-background property. This property has to be set on some parent layer of filtered object to make Background Image and Background Alpha input images work."
Does the background image support is implemented? Do you think that the same effect can be achieved with filters by applying the effect on a shape (that will blur its background content)?
Seems you've received a couple responses already while I was writing this. however, I'll explain the background here a bit.
The renderer does support background images and can do the effect you are looking for. What that wiki page is trying to tell, the GUI is somewhat incomplete. You'll need to use the XML editor to add the enable-background:new property to a suitable layer or apply a non-default layer blending mode (which will automatically add enable-background:new to the root layer of the document)
Also, shamelessly promoting my own blog posts here ;) http://fedev.blogspot.com/2007/05/its-beginning-to-seem-that-my-planned.html
I created my own version of this filter, too. For the enable-background stuff, take a look at the layer1 in Inkscape XML editor. Anything inside layer1 will now be able to access the background image - but only inside layer1. If you were to place stuff in layer under layer1, that wouldn't be counted as background for filtering purposes.
Thank you Ivan, your template is exactly what I want (but I didn't change the layer blending mode, it must be normal to work properly) See a preview here:
http://ftpmerou.free.fr/inkscape/blurbackground-2.png http://ftpmerou.free.fr/inkscape/blurbackground-2.svg
Artifacts can be annoying but it might be fixed later, maybe they are due to the IIR Filtering method added in 2007?
By the way, the layer with the "background property" cannot be renamed, changes are not made in the svg.
Another window added, note that I had to duplicate the layer with background property to made this picture, because having two objects on the same layer broke blur effect.
http://ftpmerou.free.fr/inkscape/blurbackground-3.png http://ftpmerou.free.fr/inkscape/blurbackground-3.svg
Strangely two objects on the same layer doesn't break blur for me.
________________________________ De : Yann Papouin <yann.papouin@...400...> À : Ivan Louette <ivan_louette@...48...> Cc : Niko Kiirala <niko@...1267...>; inkscape-devel@lists.sourceforge.net Envoyé le : Mer 31 mars 2010, 10 h 17 min 33 s Objet : Re: [Inkscape-devel] Re : Filter effect and blur background
Another window added, note that I had to duplicate the layer with background property to made this picture, because having two objects on the same layer broke blur effect.
http://ftpmerou.free.fr/inkscape/blurbackground-3.png http://ftpmerou.free.fr/inkscape/blurbackground-3.svg
Take a look at:
http://ftpmerou.free.fr/inkscape/blurbackground-2-broken.png http://ftpmerou.free.fr/inkscape/blurbackground-2-broken.svg
2010/3/31 Ivan Louette <ivan_louette@...48...>
Strangely two objects on the same layer doesn't break blur for me
If someone creates a bug report showing one file that does break using and one that doesn't (that otherwise seem to be more or less the same) I'll definitely have a look this weekend. (Be sure to mail me and/or the list the bug id, or simply assign me to the bug.)
I have heard of problems that look a bit like this, but I haven't been able to find any (reproducable) problems for quite a while now, and in one particular case it even turned out not to be a problem with blur at all but rather with path rendering, which was triggered by the increased size of tiles when rendering blur. So any reproducable test cases that really show a problem with a blur are worth their "weight" in gold :)
Ivan Louette wrote:
Strangely two objects on the same layer doesn't break blur for me.
*De :* Yann Papouin <yann.papouin@...400...> *À :* Ivan Louette <ivan_louette@...48...> *Cc :* Niko Kiirala <niko@...1267...>; inkscape-devel@...1850...et *Envoyé le :* Mer 31 mars 2010, 10 h 17 min 33 s *Objet :* Re: [Inkscape-devel] Re : Filter effect and blur background
Another window added, note that I had to duplicate the layer with background property to made this picture, because having two objects on the same layer broke blur effect.
http://ftpmerou.free.fr/inkscape/blurbackground-3.png http://ftpmerou.free.fr/inkscape/blurbackground-3.svg
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
I'm preparing some files to show the problem and I discovered that the "enable-background:accumulate" value is written on ALL shapes, rect, etc. It's normal behaviour ?
Here is another template. I changed the blend to Multiply and added an arithmetic composite to compensate it.
________________________________ De : Yann Papouin <yann.papouin@...400...> À : Ivan Louette <ivan_louette@...48...> Cc : Niko Kiirala <niko@...1267...>; inkscape-devel@lists.sourceforge.net Envoyé le : Mer 31 mars 2010, 10 h 01 min 02 s Objet : Re: [Inkscape-devel] Re : Filter effect and blur background
Thank you Ivan, your template is exactly what I want (but I didn't change the layer blending mode, it must be normal to work properly) See a preview here:
http://ftpmerou.free.fr/inkscape/blurbackground-2.png http://ftpmerou.free.fr/inkscape/blurbackground-2.svg
Artifacts can be annoying but it might be fixed later, maybe they are due to the IIR Filtering method added in 2007?
By the way, the layer with the "background property" cannot be renamed, changes are not made in the svg.
participants (5)
-
Ivan Louette
-
Jasper van de Gronde
-
Joshua Facemyer
-
Niko Kiirala
-
Yann Papouin