Alpha colour outline around graphics
Hello all, I am still fairly knew to game programming and in my latest demo I decided to no longer use a solid back ground, so now I am running into a problem where the graphic has a white(Or whatever my alpha colour is) outlining around it. I am wondering is there a way to fix this programmatically or is it strictly (or more importantly easier) to correct it in the graphics editing software such as GIMP or Photoshop?
Thank you.
Thank you.
Hello all, I am still fairly knew to game programming and in my latest demo I decided to no longer use a solid back ground, so now I am running into a problem where the graphic has a white(Or whatever my alpha colour is) outlining around it. I am wondering is there a way to fix this programmatically or is it strictly (or more importantly easier) to correct it in the graphics editing software such as GIMP or Photoshop?
Thank you.
Which Graphics library / Engine are you using?
In directx you can set a colorkey to be a transparent color when loading a texture such as:
D3DCOLOR colorkey = 0xFFFF00FF;
Use pre-multiplied alpha!
http://blogs.msdn.com/b/shawnhar/archive/2009/11/06/premultiplied-alpha.aspx
http://blogs.msdn.com/b/shawnhar/archive/2009/11/06/premultiplied-alpha.aspx
Sorry forgot to mention that, I am using XNA 4.0. I know the reason I get the outlining is because the colour is actually a light grey between the white background and image, because of Anti aliasing in the graphics program. I set the colour key to 255,255,255,255 and it gets rid of the back ground correctly it is just the out line that I cannot seem to fix. Like I said it makes sense why it doesn't work because it isn't actually white but I am wondering is there a way to apply a second colour mask or is it up to the artist to make sure the images are not AA'd?
Thanks.
Thanks.
I don't think he is talking about alpha blending. I think he took a non-RGBA image and made everything white alpha 0 to add an alpha channel, then it left all the gray from the anti-aliased image edges. Depending on the software your artist used, he should have a non-AAed version of the art that you can add the alpha channel to.
I think it is this problem.
I think it is this problem.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement