sprites blend issue

Blitz3D Forums/Blitz3D Beginners Area/sprites blend issue

ZT(Posted 2004) [#1]
I'm creating essentially 2D puzzle game in 3D Mode, so that the game has a 3D look to it.

I'm using sprites to display "start level" messages in front of other sprites and meshes with textures. These "start level" sprites have black areas to allow the sprites behind to show through.

The problem is that the foreground sprites in default setting allow everything behind to show through, i.e. they appear to be translucent (semi-transparent) over the whole sprite, similar to if I'd set the alphablend level to 0.5.

According to the manual, the default blend setting for sprites is 1 (Alpha), but it's not. If I manually set the blendmode to 1, then nothing shows through and they appear solid, even where they are black. However, I want the background to show through, only where the sprite has a pixel colour of black. If I set the blendmode manually back to 3 (Add) which actually appears to be the default, then the background shows through but the sprite appears translucent again.

Any ideas, how to get the sprite to behave as I'd expect and only show behind items through in the black area.

I'm using 8bit or 24 bit png's created in photoshop.

Thanks
ZT


WolRon(Posted 2004) [#2]
Sounds like you want to use masked images.

LoadSprite("image.bmp", 4)


ZT(Posted 2004) [#3]
spot on!

thanks for that!