Black Sprite

Blitz3D Forums/Blitz3D Beginners Area/Black Sprite

Xak(Posted 2009) [#1]
Hey guys (and gals?):

I need help with something... rather odd.

I need a light flare-type sprite that's black. Obviously, the normal methods of flare sprite creation won't work due to dark colors being rendered as transparency. And I can't use a masked image because I need the sprite to have a gradient (i.e. a fuzzy edge).

Any thoughts on how I might accomplish this?


Spike314(Posted 2009) [#2]
you can do this by using
EntityBlend sprite,2 

also make sure the texture background is white and the flare is black.

hope that helps.


Ross C(Posted 2009) [#3]
Or, change the alpha on the sprite:

That will let you pass across a colour and change all mask information to that colour.

http://www.blitzbasic.com/codearcs/codearcs.php?code=1013


jfk EO-11110(Posted 2009) [#4]
It may also depend on the graphics app you are using to save the sprite image. Using Photoshop or Gimp will allow you to have transparent areas in the image (where the checkerboard background shines trough). Save them as PNG, this works best for me.

Although, using Alpha for a shadow blob (or similar thing) maybe isn't the best you can do since you should keep the number of alpha stuff low to prevent z-fighting issues. You maybe better use the Multiplying blendmode.


Kryzon(Posted 2009) [#5]
I thought Z-Fighting was about the polygon placement, not blending.

If it's too close it'll suffer Z-Fighting, regardless of Multiply or Alpha blending modes.


jfk EO-11110(Posted 2009) [#6]
I think it is also commonly called z-fighting when some alpha stuff is blinking due to unsorted alpha. Well, both is rather unbearable. While the rounding error z-fighting you mentioned can be solved with the camerarange, unsorted (more kind of randomly sorted) alpha is a bit trickier to fix.