Blur effect on vector-layers.

I’m having issues with blur effects and vector layers. Look at the following images:

I’m using this star shape with some lines above for testing. Basic vector shapes.

Now look at this image where I’ve added a blur effect. The lines are blurred when they’re directly over the star shape but not blurred outside the shape. Also the outline of the star is not blurred. (there is a small blur, but much less than within the star).

It’s much more obvious in this image where I’ve encasuled the star, line and blur and then added a blue backgroud with the same colour as the star. This is unaffected by the blur and the star/line is unaffected by the colour-layer.

Now I’ve exported the unblurred star and reimported it as an image layer and applied the blur to this. Now the effect behaves as it should, whole shape is blurred, even when above alpha. (This is again on a blue background but the setup is the same as previous one and the effect the same if I render with alpha instead of blue BG.)

So, what is going on? Is the blur effects broken?

Tested using both 0.62 and 0.62.01.

Hi rylleman,
when I documented the blur layer I got a lot of confusion for the same problem you mention. I also noticed that the highest the blur size is, the lower the achieved blur effect achieved. The wiki page needs updates
The cause of this behavior is that the blur layer is not a distortion layer but a “composite” layer. See its inheritance diagram
This is how blur works:
Blur evaluates the context and calculates a blurred version of the context and then it composites the result with the context (without replacing it). To get a proper blur effect it is needed to change its blend method to “Straight” and it will look how it uses to look in other raster edition programs.
Unfortunately there is a bug in the Blend Method entry that makes impossible to change the Blend method to Stragiht using the drop down method. It seems to happen only to the Blur layer :open_mouth: :frowning:
The workaround is convert the blend method parameter to scale and set the link subparameter to 1.
-G
blur.sifz (1.18 KB)
blurstraight.png
blurcomposite.png

Thank’s Genete!
You’ve got answers to everything!
Strange bug indeed…
Wouldn’t it be useful if the blend method of blur is set to straight as default?

Yes! good idea. Not a big deal really :slight_smile:
-G

Hmmm, seems that it is not as easy as call the constructor overriding the default values. The toolbox’s default values overrides finally any blend method during layer creation. It needs a deeper looking and smarter coding.
-G

I can override the toolbox default blend method if the layer in creation is a blur layer. But I think that perform that always (regardless what default blend method the user choose from the toolbox’s defaults) is a bit weird and unuseful.
What about to add a new entry in the default blend method drop down list called: “Default by Layer”? It means that the user would accept the default blend method the layer decides to apply by itself based on the kind of layer. For Geometry layers it will be Composite and for other layers, like blur layer it can be Straight or other based on layer’s behavior. In case that the user selects other toolbox’s default blend method during layer creation it will be apply to the new layer.
-G

Sounds fine to me, but wouldn’t it be a bit confusing? Will you see the actual blend type or just “Default by layer” as value?

No, only the Toolbox’s default blend method drop down menu will show the “Default by layer” entry. When the layer is created (by a tool or with the menu action) it will display the only valid default method (Composite in most of the layers or Straight in others)
I think that there are some layers that really will look much reasonable well if they use the straight method:
Noise Distort
Blur
Radial Blur
-G

I’ve added this feature to the master branch. Now if the user selects the “By Layer Default” default blend method in the toolbox’s defaults widget, then each new created layer (by New Layer or tool action result) will use the default blend method defined by the layer itself.
By default all layers (that have blend method in its parameters) have Composite as default blend method. The layers that have specific blend method are:
Blur: Straight
Radial Blur: Straight
Noise Distort: Straight
Shade: Behind
Bevel: Onto
Any other layer with different blend method than composite?

-G
Defaults.png

Great!
Thanks Genete, an improvement to workflow! :slight_smile:

(Can’t think of any other layers that would need different blend mode right now)