0

Hey all I'm trying to make a 3d game in with 2d sprite characters. I'm loading my sprites as plane models from blender with textures already applied.

I'm currently alphablending the sprites but it appears the meshes are only taking the background color and not the color of the sprites behind it. The picture below shows that I'm talking about.

https://www.dropbox.com/s/matk2urmnwtklrs/errors2.jpg

Is there anyway to properly alpha blend my images so that they appear correctly transparent? I'm currently looking up how to do alpha testing instead of alpha blending as I think that may help solve this issue as well; however, I need help on how to do this in code

Charles Haro
  • 1,866
  • 3
  • 22
  • 36

1 Answers1

1

Have a look into the xna example for billboarding wich is the proper term if you need to search for more references. The most difficult part is the proper sorting, because you can't rely on the Z buffer. The example takes care of that You could also try the blend state BlendState.NonPremultiplied

dowhilefor
  • 10,971
  • 3
  • 28
  • 45
  • Your a boss thanks man that was exactly my problem, I was drawling them in the opposite order of what I was trying to do haha. Also the BlendState.NonPremultiplied got rid of the ugly borders like a charm ^.^ thanks again! – Charles Haro Jun 15 '12 at 11:50