Transition edge by using alpha channel of PNG

   1721   2   1
User Avatar
Member
11 posts
Joined: July 2018
Offline
Hey there,
I use the alpha channel of a PNG to layer materials. However, you can see an edge in the fall off to transparency. In an image editor it's fine; there is a clean transition to the background. The arrow in the picture points on how it should look like. I know, when I make a second version with a white background, then on white you don't see an edge. But I hope there is a more flexible solution.
Edited by Lorenz25 - April 1, 2019 17:29:47

Attachments:
color_blob_with_rim.jpg (72.9 KB)

User Avatar
Member
1755 posts
Joined: March 2014
Offline
The .png you make with your image editor premultiplies the alpha transparency with the background layer/color. You should either save the .png with a straight alpha (unmultiplied) if the editor allows you or with a white background. Not sure what you mean with “a more flexible solution”.
User Avatar
Member
11 posts
Joined: July 2018
Offline
Oops, my bad. I forgot that I had a texture set in the shader. There you get problems with pre-multiplication. Plugged in like shown in the picture all is working fine now. (I could also plug in the PNG directly, as the alpha is ignored.)
Thank you for your answer. Made me confront myself with the topic of pre-multiplication.

Attachments:
PNG-and-Layermix.gif (69.9 KB)

  • Quick Links