problems with blending

General discussions about Inkscape.
neonic
Posts: 16
Joined: Fri Jun 18, 2010 12:39 am

problems with blending

Postby neonic » Thu Jun 24, 2010 8:22 pm

Hello, I have problems with blending in inkscape

First example:
I have two opaque objects in inkscape on the same layer: a blue sky behind a brown mountain. However, the sky looks as if it's been alpha added on top of the mountain. The mountain turns brightly blue at the parts where the sky sits behind it.

Second example:
I have an opaque blue lightsaber on in a layer on top of a background layer, with multiple objects. The blend mode of the layer with the lightsaber is set to "Lighting".
The light saber is alpha added to the background, but other parts of the background (not behind the lightsaber) also get a strange bright bluish color. When I move the lightsaber around, random parts of the background turn blue around the lightsaber. Some background objects turn blue while others are unaffected by the error.

First I thought these were bugs in inkscape, but I loaded the svg files in the ubuntu image viewer, this gave the same strange results.

Did anyone encounter the same?
Does anyone know how to fix this?

Thanks!

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: problems with blending

Postby tomh » Thu Jun 24, 2010 10:11 pm

I Don't know if this is the problem, but:

It should be stated that In Inkscape there are multiply places to set object opacity/transparency. All of which need to be checked.

1)Object opacity. affects both fill/stoke and groups of objects. Lower left hand corner of Inkscape window
1a) It should be noted that opacity can be set on the object itself, or the group the object is in, so every group would also need to be checked
2)Colour Alpha values: affects individual colours. File and stroke dialogue (Shift+ctrl+F) The A slider should be up to 100
3)layer opacity: Layers dialogue
4)Clips and masks: Clips are on/off, masks will cause objects to become partially transparent (only solid white will make an opaque mask)
5)Filters can make some objects transparent as well, with blurred objects becoming transparent at the edges.

neonic
Posts: 16
Joined: Fri Jun 18, 2010 12:39 am

Re: problems with blending

Postby neonic » Thu Jun 24, 2010 11:19 pm

tomh wrote:I Don't know if this is the problem, but:

It should be stated that In Inkscape there are multiply places to set object opacity/transparency. All of which need to be checked.

1)Object opacity. affects both fill/stoke and groups of objects. Lower left hand corner of Inkscape window
1a) It should be noted that opacity can be set on the object itself, or the group the object is in, so every group would also need to be checked
2)Colour Alpha values: affects individual colours. File and stroke dialogue (Shift+ctrl+F) The A slider should be up to 100
3)layer opacity: Layers dialogue
4)Clips and masks: Clips are on/off, masks will cause objects to become partially transparent (only solid white will make an opaque mask)
5)Filters can make some objects transparent as well, with blurred objects becoming transparent at the edges.


1) The mountain object is 100% opaque and it is not part of a group, it consists of one path
2) The colours of the mountain all have 255 alpha values
3) The layer is 100% opaque, it's no sublayer of anything
4) There are no clips nor masks active, I've clicked Object>Mask>Release and Object>Clip>Release on both the mountain and sky object
5) The blur is set to zero, I didn't apply any filters and the mountain object is not transparent at the edges

Maybe important: I copied the sky and mountain from another inkscape window, that had another file open. The copy has this strange bluish alpha-add effect while the original looks normal.

neonic
Posts: 16
Joined: Fri Jun 18, 2010 12:39 am

Re: problems with blending

Postby neonic » Thu Jun 24, 2010 11:39 pm

New development: there was an xml tag with the word "filther" in the svg file with the mountain, I removed it and now the strange alpha-add effect is gone. I'm surprised it worked, because I know nothing about inkscape syntax.

Anyway, this solves the mountain-sky issue.

But I still have the lightsaber problem. It looks like the object is not correctly alpha-added to some of the objects in the background. Though, this only happens in inkscape, not in the image viewer. So it could be a bug.

The problem is that inkscape also applies this incorrect blending when exporting to png.

vwanweb
Posts: 169
Joined: Sun Jun 06, 2010 1:48 pm

Re: problems with blending

Postby vwanweb » Wed Aug 04, 2010 3:44 am

neonic wrote:New development: there was an xml tag with the word "filther" in the svg file with the mountain, I removed it and now the strange alpha-add effect is gone. I'm surprised it worked, because I know nothing about inkscape syntax.

Anyway, this solves the mountain-sky issue.

But I still have the lightsaber problem. It looks like the object is not correctly alpha-added to some of the objects in the background. Though, this only happens in inkscape, not in the image viewer. So it could be a bug.

The problem is that inkscape also applies this incorrect blending when exporting to png.


Mountain-sky issue:
use the >Filter menu and you can >Remove filters from the selected object, no need to go into the xml editor.

Lightsaber issue, Using the FILTER Blend mode of LIGHTEN work best when::
> Background: mid-to-low Luminess values are used in the background object(s) color i.e., HSL L= <100 (less than or equal to 100)
> Source Object: the Blue color you use would look best if it were a LIGHTER (HSL) L shade of blue
R=0 G=0 B=255 A=255, would not Blend well under the Lighten filter because the L(HSL) Lightness is at a neutral setting, make it lighter.

Ofcourse certain colors work differently black red green blue as less luminess background colored objects work very well, while yellow, aqua and magenta need finer settings in the L channel (HSL). I typyically dont use the Alpha channels, because the filter applies its own Alpha channel setting in the filtered "lightened" object.. hope this all makes sense to you..


Return to “General Discussions”