Transparency-One more Quick Question
Blitz3D Forums/Blitz3D Beginners Area/Transparency-One more Quick Question
| ||
I'm using blitz3d. And i'd like to know how to set the color for transparency. When in 3d graphics how can i set for example 128,128,128 as transparent? It doesn't seem to assume 0,0,0 is transparent. The reason- I'd like to creat e a 3d graph. Say 100x100x100. By using CreateCube. and would like to texture the cube(s) with a transparent color except for the outline of the cube. I could do this with faces/vertexes, etc. Oh well, no drawline x,y,z,-x,y,z either. |
| ||
You're right, it does't assume transparency. In 3D mode you have to turn transparency on by using the flag 4, "masked," when loading the texture. |
| ||
MaskImage handle,red,green,blue The above command allows you to set to transparent a color other than 0,0,0 |
| ||
Or you need to load your texture with flag 2 - Alpha and use "WritePixelFast" to write alpha information to the texture. It works well, but you may have some z-buffering issues. |
| ||
Black is the mask color when using this method. Something else you may be interested in is EntityFx 16 which will disable backface culling so you will be able to see the box edges on the other side. (The cubes will appear almost wireframe if used with an appropriate texture). |