ugly alpha borders

i created a new image in the image editor and painted into it. first the alpha was 0 everywhere and where i painted it automatically got non-transparent.

in the opengl view the border of the transparency looks very nice and like i expected it but the renderer makes this border very ugly and pixelated. is there anything i can do about it?

do you know what i mean or should i post a screenshot?

EDIT: hm… only seems to happen if i use an image with a white background. with a black background the alpha borders are nice in a render too. but with a black background the multiply drawing mode is useless for me. :frowning:

Have tried turning on preMul for the image?

hm… premul always seems to clear the content of my image.

here is a screenshot of what i mean:

in the opengl view the white borders aren’t there.

i did read that page but i didn’t find anything that helps in my case.

Basically I have not the slightest idea what you have done that it doesn’t work. You may have used a not appropriate method to map the image, you may have chosen the wrong file format, the texture settings may be wrong.

So - post the file and include the image - it is possibly only one or two clicks.

This seems to be a serious bug. I will put it in the bug tracker.


i have uploaded my .blend file: alpha_border_problem.blend
it would be nice if you could have a look!

A: You have used the wrong texture format
B: You have used the wrong method to render the UV texture

Well, nothing that can’t be cured:

  1. Turn off TexFace
  2. Load an Image Texture. We’re going to use the texture one time only for transparency, so in this case Premul is not necessary. And since Premul is buggy with image painting anyway, this is good in this special case.
  3. Activate Use Alpha
  4. Set Map Input to UV, Map To to: Neg Alpha, NoRGB, DVar=1
  5. Set Alpha for the material to 0, ZTransp on.
  6. Add a second texture. This is for the color.
  7. Map Input UV
  8. Load the same image a second time (but now without Use Alpha).
  9. Map to Col


alpha_border_problem.blend (286 KB)

thanks! i didn’t think of using the image 2 times.

This would not be necessary if you’ve used the right image format in the first place. But maybe it’s even better because of the premul bug.

i got it to work now with your method but i still don’t quite get why it doesn’t display correctly as a simple texface? this looks a bit buggy to me too since who would want such borders? :slight_smile:

what do you mean with image format?

and what does premul do actually (if it worked correctly)? simply multiply the color values with the alpha channel?