Sign in to follow this  
mysockshurt

transparency and xna?(Alphablending What am i doing wrong)

Recommended Posts

mysockshurt    133
I was trying to make some of my sprites transparent but when I was doing one of the alphablending tutorials it seemed not to provide the desired effect. I filled in the areas I wanted in magenta 255,0,255(I used paint.net) and started spritebatch alphablending , but all i saw was some magenta areas instead of transparent ones. I tried several different options but still i just had magenta ones. Instead I used microsofts DirectX texture tool and it worked, but the magenta method seemed much more effective. Doing the magenta method seemed much simpler though. What can I do? I tried ms paint but when I added magenta I get some small splotches of transparency and still most of it was magenta. What can I do or what steps can I take to make a sprite transparent with magenta or should I just stick with the dx texture tool? Thanks

Share this post


Link to post
Share on other sites
PKLoki    1492
Personally I'd just stick to an image format that supports an alpha channel, then you can have variable transparency encoded into your texture. I tend to find png to be a simple enough format for this, though I'm no texturing expert by any means so maybe someone who is can suggest the best alternative.

L
-

Share this post


Link to post
Share on other sites
ZeroSum    234
Have you made sure that the colour is actually 255/0/255?

I had some sprites not working after doing them in paint because paint's default magenta isn't actually 255/0/255 (at least on mine). After drawing the magenta in PS it worked fine.

Edit: Also some editors (like Xara Xtreme) Anti-Alias the drawings so colours might not actually be what you used.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this