Calvin Bell

Howdy,

Just a quick question for everyone. I have 2 64X64 textures that I want to use. One of them will be on top of the other one. For this I have a different draw height as the last parameter in the SpriteBatch.Draw function. If I change the first to 1 and the second 2 to I can see one of them. If I switch heights I can see the other one. I would like to see THROUGH the top one (except for the solid part) and still see the bottom one. I am making my textures with a magenta background and in SpriteBatch.Draw I am putting SpriteBlendMode to AlphaBlend. I thought this was supposed to make the magenta part of the texture transparent. Silly me! Anyways, if anyone could help me out on what im doing wrong I'd appreciate it. Thanks.

PS: To sum it up, I need any magenta part of my top texture to be see-through so I can see the bottom texture.

-Calvin



Re: XNA Game Studio Express Little 2d help

Glenn Wilson

I personally use a Drawing program that draws the transperant layer in my sprites... and do not use the mag' color for transperancy.






Re: XNA Game Studio Express Little 2d help

Shawn Hargreaves - MSFT

If you do use magenta, you have to make sure that it is exactly the right color. Red = 255, green = 0, blue = 255. Even slightly off that and it won't be recognised as the right magic value.





Re: XNA Game Studio Express Little 2d help

Calvin Bell

I did make sure it was 255,255,0. By the way I am just using paint for right now until I do my better graphics. The image shows in my file folder as the model surrounded by magenta. Is that correct, also Do I need to tell XNA that my transparent color is magenta I looked at a few tutorials but they only said to make the part you want transparent magenta.

Thanks,
-Cal





Re: XNA Game Studio Express Little 2d help

Calvin Bell

Topic Closed!

I just put them to the same height (last parameter in draw) and it worked even though I could have sworn I had tried that. Thanks to Ziggy on the IRC channel!





Re: XNA Game Studio Express Little 2d help

Ely

Theres an irc channel   what is it

 

 






Re: XNA Game Studio Express Little 2d help

Jim Perry

irc.efnet.org #xna channel