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

Started by
2 comments, last by mysockshurt 16 years ago
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
Advertisement
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
-

Visit http://www.mugsgames.com

Stroids, a retro style mini-game for Windows PC. http://barryskellern.itch.io/stroids

Mugs Games on Twitter: [twitter]MugsGames[/twitter] and Facebook: www.facebook.com/mugsgames

Me on Twitter [twitter]BarrySkellern[/twitter]

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.
Thanks guys, Not sure what I was doing wrong but after my last try it works.

This topic is closed to new replies.

Advertisement