Mesh alpha map

Blitz3D Forums/Blitz3D Programming/Mesh alpha map

Picklesworth(Posted 2004) [#1]
Is there a way to apply a texture onto a mesh that makes it (the mesh itself) transparent in spots?


AntonyWells(Posted 2004) [#2]
In theory, set your initial mesh(or entity if using non-vertex mode coloring) to 0,0,0,0(I.e alpha zero)

Then, convert your texture into a png alpha map, load it and use additive blending, and set it at texture 0. Since the mesh's initial alpha/color is 0,0,0,0 it will be the texture supplying the alpha in effect that is blended with the destination(I.e screen pixel)

That's if dx is the same as gl, but i'd be shocked if not.

Oh, and don't forget the alpha flag when you load the texture....I think you may need that, as I think blitz ignores the png alpha data otherwise, additive blending or not.