alpha images -> white outline ?


if i render images with alpha channels i always get a white outline around it like on the screenshot. where does this come from? there is no white in my image. the image is black at those areas. why doesn’t the alpha channel fade to black? i experimented a lot but didn’t find a way to get rid of this.

Have you tried changing your alpha type? (From straight to premul, or vice versa…)

Yes, you have to set your texture to “premultiplied” in the texture-panel.

What a mad coincidence, was just about to post a new thread about this problem and there is this one on top of the list. I therefore ad it to this thread.

White lines in alpha channel, a bug?

Hello,
I am experiencing something strange with my alpha channel. What are those white lines around the bee? They are not around the Moai character on the right and the have the same settings. I have checkt it out in photoshop and the PNG file does not show those white lines in front of a red background so I guess the problem is within blender. I have been looking if there is somewhere where I can change the anti alias settings in materials but can not find nothing.

Does anyone know what may causes this problem and how to solve it?



Where would you change the alpha type? I had a look in Materials and Render settings but did not find it even though i am pretty sure that I did have seen it before somewhere. But where was it?

Thank you for your help

Sebastian, we must have posted this at the same time for now I can see your suggestion and yes, great that solved the problem.

Thank you very much for your help I owe you a drink or two if we ever meet.

it’s there:
http://img.skitch.com/20101122-bp8eg3mdm6ctppw6tx7nynkhke.png

lol, we must be posting simultaneously! :smiley:

i did use premultiply though. the white lines are there with and without premultiply. without premultiply i get many white dots everywhere. i think they get called fireflies.

hm… what else could be the reason?

edit:
in the opengl viewports i don’t get the white lines. it works perfectly there. this is really weird. by the way, how do i turn on “clip alpha” for textures in 2.55? i didn’t find it but it would be great for avoiding sorting errors in the viewports.

Premultiply is usually done over black (that is, the image is cut out over black BEFORE you cut it out with the alpha, thus the premultiply prevents the edges from being too dark). However, you can create a premultiplied alpha channel with a different color, such as white. In After Effects, for instance, you can select what color you’re premultiplying over. I don’t see an option for that in Blender, though you might want to try opening your image in AE, PS, or Gimp and re-save it, maybe as a different filetype, to see if that corrects the problem. (screenshot of AE where you can choose what color the source image is premultiplying with)


Kakapo in case you are still stuck with this problem, compare your settings with mine.



Hope you are able to read it.
Good luck mate

wow, thank you very much! :slight_smile: this did help indeed…

the problem was that i used the texture twice. once for color, and once for alpha. i was under the impression that this is necessary. was this necessary in older blender versions?

in your screenshot i saw that you have color and alpha enabled in a single texture. once i did this and removed the second texture slot, the white outlines were gone.

i wasted a lot of time with this. tediously making the alpha channel narrower in photoshop and such experiments. :slight_smile: