Alpha channel problem
Blitz3D Forums/Blitz3D Programming/Alpha channel problem
| ||
Hello everyone, I am new to Blitz3D. I have been using DarkBasic Pro but have decided to try this product instead. I have been building a scene that contains a plane for the terrain with sections of it transparent. It is a TGA (Targa) file. It is part of the world model I created that is a .X file being loaded for my scene. However, the transparent part is not working in Blitz3D. Should I be using a different file format (instead of TGA)? Also, RGB(0,0,0) is treated as transparent in DBP, so I use RGB(1,1,1) to prevent transparency on entities that need to appear as black. What would be the rule in Blitz3D for the color? |
| ||
I don't use .X format It depends on the parameters you apply to the material rather than the type of image you import. Play with: EntityFX() TextureFilter() TextureBlend() Btw u better use the .b3d exporter http://www.onigirl.com/pipeline/ |
| ||
Thanks I'll check it out. I'm actually using a product called 'AC3D' to create the world. It exports to a variety of formats, but not B3D. It's much easier than 3dsMax (I have version 9). |
| ||
Make sure the texture is being loaded with the alpha flag too. Black is generally treated as alphaed or masked areas is blitz, upon loading a texture with no alpha information. You can change the colour of the mask or alpha on a texture, in blitz though. |
| ||
Thanks Ross.. I explore the other ways to create the alpha channel. I'm using .PNG and .TGA for my output texture from Photoshop. But, not getting the result I want in Blitz, but I am in AC3D. |
| ||
For masked textures you best use the fileformat DDS/DXT5, there are export plugins for ps and gimp. It interpolates the outline, where masked BMPs etc simply follow the texel contours, kind of stairs onscreen. In order to set your matte color right you do this: clone the original layer and blur the underlying of these 2 layers, then set it to 2% opacy. Masks and Alpha require to use "unpainted areas" on a 24 Bit RGB image to work correctly (this is when the checkerboard background patter is shining trough). Using a 4rth channel for Alpha is not the right way. You maybe need a utility that allows to edit the properties of a Mesh, eg. to replace a texture, load 3ds and save as B3D or something like that. Maybe UltimateUnwrap3D is a musthave. |
| ||
Gile[s] could also do this too, and it's free. Although, it can't load .dds textures, the version 1 anyway. |
| ||
You can however patch the exported file to make it load the dds instead of eg. the original TGA texture. But I'd suggest to use a filename of the same length. |
| ||
What i did, was to tag the entity name, with some data, so when the code loaded it, it read the name and used a .dds texture. A long road for a shortcut, but it did fit in with what i was doing anyway. Good idea though. |