Paint Layers with alpha show light pixels around edges - Eevee

I’m finding Paint Layers with alpha show light pixels around edges when painting / previewing in Eevee.

I took the layer into an image editor but they did not show, and I found they did not show if I changed my renderer to Cycles.

Has anybody else found this?

My node setup is below with screen grabs of the painting.

Are your textures with alpha premultiplied?

Do you mean ‘multiplied’?

If so, yes, I tried changing the Mix Node blending mode to Multiply, the light fringing disappeared but all the colours also changed, as they do in Photoshop when you change a layer to multiply.

I have followed tutorials and painted this way before, noticing a slight lightening around the the edges but not seen it this clearly on pixels (this is a 720x720 texture).

I actually tried to deleted my previous post as I misread the problem. Basically what I tought was happening was that if you multiply your alpha channel with the RGB channel it makes all the areas that are invisible black. If you use don’t use premultiplied alphas then the parts of the images that are transparent still have their original color. Depends on how you then mix the image with something else you can have bright edges around the areas that transition to transparent. The effect might be made worse by mip mapping.

If you’re creating the textures in blender that’s most likely not the case, so I don’t have a good guess what’s happening there. Still might be worth to try out starting from a black background on the image layers if you aren’t.

The image textures I’m using to paint on were created in Blender and were created with a transparent alpha.

I will try what you suggest and create an image texture to paint on that is solid black to use in the Mix node.

EDIT:
There is no light fringing when I paint on a texture image layer with a black background (and in Mix mode in the Mix node), but the colours appear differently on the model - if I paint red it appears orange on the model, if I paint dark green it almost does not show

Multiplying with alpha channel seems to fix it.

Not sure if this is 100% correct color mixing, but it seems good enough. I haven’t used blenders painting tools enough to get a harder test case without frustration.

I think I have set it up like your picture but I am still getting a light 1 pixel fringe. The texture map is 720x720 and the strokes are only a couple of pixels wide.

I can’t replicate it.

These are the settings I used for the second layer:
image

I then added a 100% alpha channel fill with the painting tools and started painting.

Damn.

Thanks for testing

Is that the same as creating a new image texture and making the Alpha 0%?

I think this may be a display (platform?) issue.

I see a difference in my viewports when swapping between Eevee and Cycles, where Cycles does not show a fringe.

I know sometimes the fringe can be more evident between complimentary colours but it is less noticeable in Cycles.

I have also swapped between CPU and GPU support but there is not much difference here on my iMac (Retina 5K, 27-inch, 2017) with Radeon Pro 580 8 GB graphics card.

Technically it should be the same, it still has black as the transparent bg color.

I can’t replicate it on windows on a nvidia GPU so I have to agree that it’s probably OS issue as Mac has never had good 3D support (opengl is deprecated on mac also), blender userbase on it is smaller so there might be more unreported bugs.

The ‘Layer Paint 001’ layer has a transparent background, no colour. This is how I have set up all the ‘paint layers’.

It has black, it’s just transparent if you create it with those settings. Painting on it will add both alpha and color to it. If you only add alpha you’ll get the original color.

Just for a test could you send a file with the edge problem so we could check for 100% it’s a issue related to the hardware/OS.

Yeah okay.

I’ve attached my tank model from the CGCookie course and was doing it for hand painting experience.

Tank_texturePaint_05.blend (761.6 KB)

There’s no textures packed into the blend.

Oops. Sorry.

Tank_texturePaint_05.blend (1.9 MB)

Okay, I think I got what’s happening.


You have colors in the transparent areas (completly normal for texture painting). If you paint over them alpha gets added back in and the underlying color gets mixed around the edge due to texture filtering. Using closest (no filtering) there’s no bleeding with the colors. Unfortunately I can’t think of a good fix. You could bake textures with Cycles after you’re finished with painting. If it handles texture filtering differently you’ll probably end up with a clean texture.

Yeah, I think I get that.

So I got rid of the image texture and image texture node that I was painting onto with two colours.

Then created a separate image texture and texture node for each colour and there is no bleed between the two.