White fringe around DYI Alpha Mask

I have rendered a BW image (a logo) using an Emission node that I would like to use as an Alpha Mask for a specific color (it’s a decal).

So in Compositor I made a Set Alpha-node where I put the desired color. In the Alpha-input I put the rendered BW image. When I check the result in Compositor, it looks great, but as soon as I render I get a white fringe around the render (???). Can anybody please help me out here?

Many thanks in advance!

Did you check convert Pre mult? or try changing the Premul Number?

Where should I check that? The Set Alpha-node doesn’t have these options :wink:
Or do you think I should add an Alpha Over-node to the mix? If so, how?

Sorry I was thinking about the Alpha over node.
\What render engine did you use? Eevee or Cycles?
Can you post an image of the node set up? And have you opened up the image in Photshop/GImp etc to see what the alpha looks like? I’ve seen the issue mentioned a few times in the blender stack exchange but that was in relation to rendering.

No problem! :wink:

I used Cycles for this. Since it concerns a international company, I can’t give you the render.

This is the setup in Compositor though:

  • A Set Alpha node goes to a File Output node.
  • In the ‘Color’ of Set Alpha goes a color (e.g. blue)
  • In the Alpha’ of Set Alpha goes a Render Layer node which contains a rendered BW image I want to use as Mask. To generate the BW image, I used an Emission node on an object.

I opened the Mask in Photoshop and saw it was too ‘thick’, hence the white fringe I guess.

Try adding an alpha-convert node following the set-alpha node, and set its mode to “straight to premul”. (Generally you should always do this with the set-alpha node unless the input image was already black)

Not Sure if this is what you are trying to do. Set Transparency on under Film to get the alpha channel for the render. Added an RGB node to flood fill the render Using the alpha channel. I noticed a thin white 1 pixel line around the render so I added a Alpha Convert set to Straight premult and and 2 pixel blur afterwards to get it to blend better. That got rid of the white fringing.