Author Topic: Color blending seems to be broken  (Read 2954 times)

Hi there,

Where I work we've recently found out what it looks to be a very strange issue (SPainter v. 2.5.3 ).
Long short story, the "normal" blending between layers that use a mask seems to be off, with painter heavily desaturating transparent pixels on bright backgrounds.
Please note that in Designer this blending mode ("copy") works as expected, exactly like in photoshop.

Here a picture showing the issue:


In the picture above, I've used the exact same color and the exact same mask in all the applications.

Please note that, if the background was perfectly black instead of white, the result would have been correct.
The more the background is bright, the more transparent pixels get desaturated.

I personally consider this a bug, not only because its behaviour is different from its twin app Substance Designer, but also because this is the most basic blending mode.

Hope this helps.

Cheers,
M.
Last Edit: April 28, 2017, 03:42:16 pm

I have had a blending mode problem with masking as detailed in this thread I made back in March...  https://forum.allegorithmic.com/index.php/topic,15732.msg67952

The problem appeared as soon as I updated to 2.5x    Although not exactly the same as the issue you have encountered, I wouldn't be surprised if it had the same root cause.  Unfortunately,  I have had no luck in finding a solution.

Hi Groovy Patrol, thank you for your reply.

I just checked at home, where I have installed the older Substance Painter 2.3.0, and the problem is there as well.

I wonder if it has always been like that.

Another test I made, was to paint in a regular paint layer, no mask, with a big soft red brush over a white background.
The brush preview seems to be correct, but as soon as I make a stroke, I get the same ugly desaturated result.

I hope that the devs can look into it :)

Humor me.  Take your mask into photoshop and add a levels to it.  Move the middle slider to 2.2, and reimport that to painter and see if it matches the other programs.

Nope, the issue doesn't seem to be related to wrong gamma.
If I try to do as you suggest, the result will still be heavily desaturated.
For some reason, colors with transparent pixel loose their saturation, but I can't understand why.

This is due to the fact that the mask in Painter is calculated in linear space while Photoshop does all of its calculations in sRGB. We are looking at how we could potentially let users decide in which color space they want their blending to happen in the future if they want their blending to perfectly match Photoshop's, stay tuned.

Thank you Jeremie for your reply.
Having a perfect match with photoshop blending would be great indeed.

Still, for my own knowledge, I would be curious to know how Photoshop and Designer retain their saturation with transparent pixels, or the actual formula used by Painter.

In my mind, if I just convert the mask from linear to srgb in Painter, the only difference I can imagine between Designer and Painter should only be in the falloff of the mask... but pixels should keep their saturation.

For example, I tried to do as beneoff suggested a couple of posts above, and the result is still heavily desaturated.
I suppose there is just some math that I am ignoring at the moment, that doesn't let me understand what is actually happening.

Thanks,
M.