Texture alpha

Blitz3D Forums/Blitz3D Programming/Texture alpha

Ferret(Posted 2005) [#1]
Hi,

I have a exported tree.x model , the leaf textures are .png and have transparant areas.
Why are the trasparant areas black when i load the model?

Is there a way to have transparant areas without manualy loading the texture with flag 4?


jfk EO-11110(Posted 2005) [#2]
when your texture is using the alpha channel (32 Bit png or tga) you can use the alpha flag to load it. When you wish to load the model without to load the texture manually, I'd suggest to:

Cleartexturefilters
Texturefilter "",9 or 2
m=loadmesh("tree.x")
texturefilter "",9

Tho this will use the alpha flag for all textures that are used by the mesh.

For Leaf you maybe rather should use the Mask mode (flag 4 instead of 2). Masked areas have to be black in the rgb channel.


Ferret(Posted 2005) [#3]
Texturefilter 2 works fine, than you for the help ;)


jfk EO-11110(Posted 2005) [#4]
note: 9 is default, when you don't use (2 OR 9) that's actually 11, mipmapping will be deactivated and it will slow down rendering.


FredMe(Posted 2006) [#5]
Ok Cool, it answer one of my post !