Jump to content
  • Advertisement
Sign in to follow this  
XXChester

Alpha colour outline around graphics

This topic is 2694 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement

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;

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Figured out how to do it via the art. I was already doing the premultiplied alpha stuff. I found an easy way to do it in GIMP...just make my whole first layer transparent and than duplicate and draw from there.

Thanks,

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!