Transparent Areas on models
Blitz3D Forums/Blitz3D Programming/Transparent Areas on models
I have seen some posts relating to this but have not been able to sort it out.
heres the question..
I have a .b3d model created and exported from milkshape..
I want the black areas of the texture to appear transparent when loaded. The texture is loaded from a single bmp file associated and exported with the model, therefore it is mot actually loaded in the game separately from the loadmesh command.
I don't know if this will work or not, but you *could* reload the texture and reapply it - then you can try out the texture flags to see if they give you the transparency. I've never tried this so I don't know if it works or not.
M
Don't apply the textures in your modeeler, and then load them in using the mask or alpha flag, as mearinn says. That should work :)
you can always use the Texturefilter, also with Textures which are loaded automaticly. try this:
CLearTexturefilters
texturefilter "",2 or 9
load whatever you need to load with alphaflag on
cleartexturefilters
texturefilter "",9 ; reset to default mode
Perfet JFK thanks
Or even Perfect....
Thanks Jfk
N/P
Now heres another related question...
Using blitz itself I am using texturefilter,4 to make black transparent. Works fine without any modification to the alpha mapping on the model.
Now, without changing the model in any way, is there a way to tell blitz to use another colour rather than black to make transparent.
Like I said a value of 4 defaults to black transparent. can this be changed ?
You need to write this using readpixel/write pixel. Read the colour from the texture pixels, then write them back, putting the alpha colour in as well.