Skip to main content
added 93 characters in body
Source Link
user82991
user82991

ADD1: This elementary transparency thing isn't the cause, see ADD2.

Dropping linearly = increase transparency linearly. You expect that at some point, say at 50% point of the slope the brightness should be full 100 % if there's in the same place also a 50% point of the lower light layer.

But it isn't. If the lower layer is also 50% transparent there can be seen some black through. The total brightness is only 75%.

See this image which has black in the bottom and 2 full white layers:

enter image description here

The top layer was made by duplicating Layer 2. The layer masks of the top layer was inverted after it. In the middle there's a darker zone because brightness isn't 100%, no matter the sum of white layer opacities is everywhere 100%.

Blending modes are = normal. Changing them to Add cause nothing as you can calculate if you want.

Your lights should be opaque gradients from bright color to black. Then they would work with blending mode Add as you expect. See this example:

enter image description here

The top and mid layers have both blending mode= Add. Both layers are opaque. The top layer = the mid layer inverted.

ADDADD2: Your edited demo starts to work properly in Photoshop if you change to 32 bit/channel color mode. See the next screenshot:

enter image description here

GIMP with default settings works also like expected, no dark zone problem occurs.

A little resembling case with Photoshop gave an idea that "gamma" has some role also in this case. Experiments with Krita brought the light. I found that theThe problem really is caused by the gamma property of the used RGB color space. Color mixing with the usual non-linear gamma generates darker results than one expects. Linear gamma (=1.0) hasn't that problem.

In Krita you have plenty of options to select from. You can select a version of sRGB with linear gamma. Krita recommends to use also 16bit color depth for acceptably dense set of available colors; 8bit integer/channel with linear gamma can cause banding in well visible colors.

In the next image a copy is made of your layer 2 and it's placed on the top of the layer 1, blending is Addition. The image is converted to linear gamma RGB color space with 16 bit/channel depth. The problem vanished.

enter image description here

In your program you should calculate the color mixing in linear gamma colorspace. I am not a competent mathematician, so I cannot give any ready to use equations. Sorry. I guess you should convert the compensated RGB numbers before the weighted addition with high enough calculation accuracy to avoid generating artifacts.

Dropping linearly = increase transparency linearly. You expect that at some point, say at 50% point of the slope the brightness should be full 100 % if there's in the same place also a 50% point of the lower light layer.

But it isn't. If the lower layer is also 50% transparent there can be seen some black through. The total brightness is only 75%.

See this image which has black in the bottom and 2 full white layers:

enter image description here

The top layer was made by duplicating Layer 2. The layer masks of the top layer was inverted after it. In the middle there's a darker zone because brightness isn't 100%, no matter the sum of white layer opacities is everywhere 100%.

Blending modes are = normal. Changing them to Add cause nothing as you can calculate if you want.

Your lights should be opaque gradients from bright color to black. Then they would work with blending mode Add as you expect. See this example:

enter image description here

The top and mid layers have both blending mode= Add. Both layers are opaque. The top layer = the mid layer inverted.

ADD: Your edited demo starts to work properly in Photoshop if you change to 32 bit/channel color mode. See the next screenshot:

enter image description here

GIMP with default settings works also like expected, no dark zone problem occurs.

Experiments with Krita brought the light. I found that the problem is caused by the gamma property of the used RGB color space. Color mixing with the usual non-linear gamma generates darker results than one expects. Linear gamma (=1.0) hasn't that problem.

In Krita you have plenty of options to select from. You can select a version of sRGB with linear gamma. Krita recommends to use also 16bit color depth for acceptably dense set of available colors; 8bit integer/channel with linear gamma can cause banding in well visible colors.

In the next image a copy is made of your layer 2 and it's placed on the top of the layer 1, blending is Addition. The image is converted to linear gamma RGB color space with 16 bit/channel depth. The problem vanished.

enter image description here

In your program you should calculate the color mixing in linear gamma colorspace. I am not a competent mathematician, so I cannot give any ready to use equations. Sorry. I guess you should convert the compensated RGB numbers before the weighted addition with high enough calculation accuracy to avoid generating artifacts.

ADD1: This elementary transparency thing isn't the cause, see ADD2.

Dropping linearly = increase transparency linearly. You expect that at some point, say at 50% point of the slope the brightness should be full 100 % if there's in the same place also a 50% point of the lower light layer.

But it isn't. If the lower layer is also 50% transparent there can be seen some black through. The total brightness is only 75%.

See this image which has black in the bottom and 2 full white layers:

enter image description here

The top layer was made by duplicating Layer 2. The layer masks of the top layer was inverted after it. In the middle there's a darker zone because brightness isn't 100%, no matter the sum of white layer opacities is everywhere 100%.

Blending modes are = normal. Changing them to Add cause nothing as you can calculate if you want.

Your lights should be opaque gradients from bright color to black. Then they would work with blending mode Add as you expect. See this example:

enter image description here

The top and mid layers have both blending mode= Add. Both layers are opaque. The top layer = the mid layer inverted.

ADD2: Your edited demo starts to work properly in Photoshop if you change to 32 bit/channel color mode. See the next screenshot:

enter image description here

GIMP with default settings works also like expected, no dark zone problem occurs.

A little resembling case with Photoshop gave an idea that "gamma" has some role also in this case. Experiments with Krita brought the light. The problem really is caused by the gamma property of the used RGB color space. Color mixing with the usual non-linear gamma generates darker results than one expects. Linear gamma (=1.0) hasn't that problem.

In Krita you have plenty of options to select from. You can select a version of sRGB with linear gamma. Krita recommends to use also 16bit color depth for acceptably dense set of available colors; 8bit integer/channel with linear gamma can cause banding in well visible colors.

In the next image a copy is made of your layer 2 and it's placed on the top of the layer 1, blending is Addition. The image is converted to linear gamma RGB color space with 16 bit/channel depth. The problem vanished.

enter image description here

In your program you should calculate the color mixing in linear gamma colorspace. I am not a competent mathematician, so I cannot give any ready to use equations. Sorry. I guess you should convert the compensated RGB numbers before the weighted addition with high enough calculation accuracy to avoid generating artifacts.

added 943 characters in body
Source Link
user82991
user82991

Dropping linearly = increase transparency linearly. You expect that at some point, say at 50% point of the slope the brightness should be full 100 % if there's in the same place also a 50% point of the lower light layer.

But it isn't. If the lower layer is also 50% transparent there can be seen some black through. The total brightness is only 75%.

See this image which has black in the bottom and 2 full white layers:

enter image description here

The top layer was made by duplicating Layer 2. The layer masks of the top layer was inverted after it. In the middle there's a darker zone because brightness isn't 100%, no matter the sum of white layer opacities is everywhere 100%.

Blending modes are = normal. Changing them to Add cause nothing as you can calculate if you want.

Your lights should be opaque gradients from bright color to black. Then they would work with blending mode Add as you expect. See this example:

enter image description here

The top and mid layers have both blending mode= Add. Both layers are opaque. The top layer = the mid layer inverted.

ADD: Your edited demo starts to work properly in Photoshop if you change to 32 bit/channel color mode. See the next screenshot:

enter image description here

GIMP with default settings works also like expected, no dark zone problem occurs.

Experiments with Krita brought the light. I found that the problem is caused by the gamma property of the used RGB color space. Color mixing with the usual non-linear gamma generates darker results than one expects. Linear gamma (=1.0) hasn't that problem.

In Krita you have plenty of options to select from. You can select a version of sRGB with linear gamma. Krita recommends to use also 16bit color depth for acceptably dense set of available colors; 8bit integer/channel with linear gamma can cause banding in well visible colors.

In the next image a copy is made of your layer 2 and it's placed on the top of the layer 1, blending is Addition. The image is converted to linear gamma RGB color space with 16 bit/channel depth. The problem vanished.

enter image description here

In your program you should calculate the color mixing in linear gamma colorspace. I am not a computer graphicscompetent mathematician, so I cannot give any ready to use equations. Sorry. I guess you should convert the compensated RGB numbers before the weighted addition with high enough calculation accuracy to avoid generating artifacts.

Dropping linearly = increase transparency linearly. You expect that at some point, say at 50% point of the slope the brightness should be full 100 % if there's in the same place also a 50% point of the lower light layer.

But it isn't. If the lower layer is also 50% transparent there can be seen some black through. The total brightness is only 75%.

See this image which has black in the bottom and 2 full white layers:

enter image description here

The top layer was made by duplicating Layer 2. The layer masks of the top layer was inverted after it. In the middle there's a darker zone because brightness isn't 100%, no matter the sum of white layer opacities is everywhere 100%.

Blending modes are = normal. Changing them to Add cause nothing as you can calculate if you want.

Your lights should be opaque gradients from bright color to black. Then they would work with blending mode Add as you expect. See this example:

enter image description here

The top and mid layers have both blending mode= Add. Both layers are opaque. The top layer = the mid layer inverted.

ADD: Your edited demo starts to work properly in Photoshop if you change to 32 bit/channel color mode. See the next screenshot:

enter image description here

GIMP with default settings works also like expected, no dark zone problem occurs.

Experiments with Krita brought the light. I found that the problem is caused by the gamma property of the used RGB color space. Color mixing with the usual non-linear gamma generates darker results than one expects. Linear gamma (=1.0) hasn't that problem.

In Krita you have plenty of options to select from. You can select a version of sRGB with linear gamma. Krita recommends to use also 16bit color depth for acceptably dense set of available colors; 8bit integer/channel with linear gamma can cause banding in well visible colors.

In the next image a copy is made of your layer 2 and it's placed on the top of the layer 1, blending is Addition. The image is converted to linear gamma RGB color space with 16 bit/channel depth. The problem vanished.

enter image description here

In your program you should calculate the color mixing in linear gamma colorspace. I am not a computer graphics mathematician, so I cannot give any ready to use equations. Sorry. I guess you should convert the compensated RGB numbers before the weighted addition with high enough calculation accuracy to avoid generating artifacts.

Dropping linearly = increase transparency linearly. You expect that at some point, say at 50% point of the slope the brightness should be full 100 % if there's in the same place also a 50% point of the lower light layer.

But it isn't. If the lower layer is also 50% transparent there can be seen some black through. The total brightness is only 75%.

See this image which has black in the bottom and 2 full white layers:

enter image description here

The top layer was made by duplicating Layer 2. The layer masks of the top layer was inverted after it. In the middle there's a darker zone because brightness isn't 100%, no matter the sum of white layer opacities is everywhere 100%.

Blending modes are = normal. Changing them to Add cause nothing as you can calculate if you want.

Your lights should be opaque gradients from bright color to black. Then they would work with blending mode Add as you expect. See this example:

enter image description here

The top and mid layers have both blending mode= Add. Both layers are opaque. The top layer = the mid layer inverted.

ADD: Your edited demo starts to work properly in Photoshop if you change to 32 bit/channel color mode. See the next screenshot:

enter image description here

GIMP with default settings works also like expected, no dark zone problem occurs.

Experiments with Krita brought the light. I found that the problem is caused by the gamma property of the used RGB color space. Color mixing with the usual non-linear gamma generates darker results than one expects. Linear gamma (=1.0) hasn't that problem.

In Krita you have plenty of options to select from. You can select a version of sRGB with linear gamma. Krita recommends to use also 16bit color depth for acceptably dense set of available colors; 8bit integer/channel with linear gamma can cause banding in well visible colors.

In the next image a copy is made of your layer 2 and it's placed on the top of the layer 1, blending is Addition. The image is converted to linear gamma RGB color space with 16 bit/channel depth. The problem vanished.

enter image description here

In your program you should calculate the color mixing in linear gamma colorspace. I am not a competent mathematician, so I cannot give any ready to use equations. Sorry. I guess you should convert the compensated RGB numbers before the weighted addition with high enough calculation accuracy to avoid generating artifacts.

added 943 characters in body
Source Link
user82991
user82991

Dropping linearly = increase transparency linearly. You expect that at some point, say at 50% point of the slope the brightness should be full 100 % if there's in the same place also a 50% point of the lower light layer.

But it isn't. If the lower layer is also 50% transparent there can be seen some black through. The total brightness is only 75%.

See this image which has black in the bottom and 2 full white layers:

enter image description here

The top layer was made by duplicating Layer 2. The layer masks of the top layer was inverted after it. In the middle there's a darker zone because brightness isn't 100%, no matter the sum of white layer opacities is everywhere 100%.

Blending modes are = normal. Changing them to Add cause nothing as you can calculate if you want.

Your lights should be opaque gradients from bright color to black. Then they would work with blending mode Add as you expect. See this example:

enter image description here

The top and mid layers have both blending mode= Add. Both layers are opaque. The top layer = the mid layer inverted.

ADD: Your edited demo starts to work properly in Photoshop if you change to 32 bit/channel color mode. See the next screenshot:

enter image description here

No idea what actually happened butGIMP with default settings works also like expected, no dark zone problem occurs.

Experiments with Krita brought the light. I guess floating point mathfound that the problem is taken into use andcaused by the gamma property of the used RGB color space. Color mixing with the usual non-linear gamma generates darker results than one expects. Linear gamma (=1.0) hasn't that stops all rounding and clipping problemsproblem. What rounding or clipping problems do occur is unfortunately beyond my knowledge

In Krita you have plenty of options to select from. As I saidYou can select a version of sRGB with linear gamma. Krita recommends to use also 16bit color depth for acceptably dense set of available colors; 8bit integer/channel with linear gamma can cause banding in my commentwell visible colors.

In the next image a copy is made of your layer 2 and it's placed on the top of the layer 1, nowblending is neededAddition. The image is converted to linear gamma RGB color space with 16 bit/channel depth. The problem vanished.

enter image description here

In your program you should calculate the color mixing in linear gamma colorspace. I am not a person who really knows howcomputer graphics mathematician, so I cannot give any ready to use equations. Sorry. I guess you should convert the actual shown colors are calculatedcompensated RGB numbers before the weighted addition with high enough calculation accuracy to avoid generating artifacts.

Dropping linearly = increase transparency linearly. You expect that at some point, say at 50% point of the slope the brightness should be full 100 % if there's in the same place also a 50% point of the lower light layer.

But it isn't. If the lower layer is also 50% transparent there can be seen some black through. The total brightness is only 75%.

See this image which has black in the bottom and 2 full white layers:

enter image description here

The top layer was made by duplicating Layer 2. The layer masks of the top layer was inverted after it. In the middle there's a darker zone because brightness isn't 100%, no matter the sum of white layer opacities is everywhere 100%.

Blending modes are = normal. Changing them to Add cause nothing as you can calculate if you want.

Your lights should be opaque gradients from bright color to black. Then they would work with blending mode Add as you expect. See this example:

enter image description here

The top and mid layers have both blending mode= Add. Both layers are opaque. The top layer = the mid layer inverted.

ADD: Your edited demo starts to work properly in Photoshop if you change to 32 bit/channel color mode. See the next screenshot:

enter image description here

No idea what actually happened but I guess floating point math is taken into use and that stops all rounding and clipping problems. What rounding or clipping problems do occur is unfortunately beyond my knowledge. As I said in my comment, now is needed a person who really knows how the actual shown colors are calculated.

Dropping linearly = increase transparency linearly. You expect that at some point, say at 50% point of the slope the brightness should be full 100 % if there's in the same place also a 50% point of the lower light layer.

But it isn't. If the lower layer is also 50% transparent there can be seen some black through. The total brightness is only 75%.

See this image which has black in the bottom and 2 full white layers:

enter image description here

The top layer was made by duplicating Layer 2. The layer masks of the top layer was inverted after it. In the middle there's a darker zone because brightness isn't 100%, no matter the sum of white layer opacities is everywhere 100%.

Blending modes are = normal. Changing them to Add cause nothing as you can calculate if you want.

Your lights should be opaque gradients from bright color to black. Then they would work with blending mode Add as you expect. See this example:

enter image description here

The top and mid layers have both blending mode= Add. Both layers are opaque. The top layer = the mid layer inverted.

ADD: Your edited demo starts to work properly in Photoshop if you change to 32 bit/channel color mode. See the next screenshot:

enter image description here

GIMP with default settings works also like expected, no dark zone problem occurs.

Experiments with Krita brought the light. I found that the problem is caused by the gamma property of the used RGB color space. Color mixing with the usual non-linear gamma generates darker results than one expects. Linear gamma (=1.0) hasn't that problem.

In Krita you have plenty of options to select from. You can select a version of sRGB with linear gamma. Krita recommends to use also 16bit color depth for acceptably dense set of available colors; 8bit integer/channel with linear gamma can cause banding in well visible colors.

In the next image a copy is made of your layer 2 and it's placed on the top of the layer 1, blending is Addition. The image is converted to linear gamma RGB color space with 16 bit/channel depth. The problem vanished.

enter image description here

In your program you should calculate the color mixing in linear gamma colorspace. I am not a computer graphics mathematician, so I cannot give any ready to use equations. Sorry. I guess you should convert the compensated RGB numbers before the weighted addition with high enough calculation accuracy to avoid generating artifacts.

added 191 characters in body
Source Link
user82991
user82991
Loading
added 359 characters in body
Source Link
user82991
user82991
Loading
added 120 characters in body
Source Link
user82991
user82991
Loading
added 736 characters in body
Source Link
user82991
user82991
Loading
Source Link
user82991
user82991
Loading