I'm only going to go into BundleMeshes for now since StaticMeshes is another story which I might go into another time but for now will just over complicate things.
Types of Transparency
Firstly there are two types of Transparency in BF2, "Alpha Blend" & "Alpha Test".
Alpha Blend
Alpha Blend is the most common type of transparency seen on Bundle Meshes and it allows for not only fully opaque or fully transparent, but also anything in between, which is what you need for things like dirt glass windows, that you can mostly see though, but isn't totally clear, like the rear passenger window on the Technical, where the driver window and windscreen are smashed but still bits of semi-transparent glass remain in them.

Alpha Test
Alpha Test is not that commonly seen on BundleMeshes but this is mainly because its not so known about, but also because it only allows for either fully opaque or fully transparent, transparency, and nothing in-between, so you can't do semi-transplant things like glass. On the plus side thou this can be what you want on some things like a wire mesh where you only want your texture to be fully opaque where the wire is, and fully transplant in-between the wire, like for example on this SideNet Radar:


In theroy it is also easier for GPUs to render this type of transparency (so better performance) than it is for "Alpha Blend", but I've got no solid evidence to support that.
Transparency Shader Techniques
"Shader Techniques" determine how the Shader will use the textures its being asked to load for each material, for example in which texture, and which channel of that texture, it needs to look for the opacity map and then how it will use that opacity map and so on. I'm only going to give examples/info of Shader Techniques related to Transparency here since there are lots of different combinations of Shader Technique and each behaves slightly differently.
Alpha Blend Shader Techniques
All the following Shader Techniques use the "Alpha Blend" type of opacity, meaning they are capable of having semi-transplant materials. Read the "Types of Transparency" segment above for more details.
Alpha
This is the most basic "Alpha Blend" Shader Technique and it loads the Opacity (Transparency) map from the "*_c.dds" alpha channel, and the Specularity (Spec) map from the "*_b.dds" alpha channel, if a "*_b.dds" texture is loaded and if not, no spec is used.
Spoiler for Examples:
AlphaEnvMap
This Shader Technique is basically the same as the "Alpha" technique above, with the slight exception that it also allows for an ENV Reflection on it, which is really good to have on many types of glass as it makes it look more life like and many types of vehicle and scope glass textures use this material as a result.
Spoiler for Examples:
Alpha Test Shader Techniques
All the following Shader Techniques use the "Alpha Test" type of opacity, meaning they are NOT capable of having semi-transplant materials and can only be fully transparent, or fully opaque. Read the "Types of Transparency" segment above for more details.
Alpha_Test
This Shader Technique loads the Opacity Map from the "*_c.dds" Texture's Alpha Channel and if a "*_b.dds" texture is loaded, it loads the Spec Map from the "*_b.dds" Texture's Alpha Channel.
Spoiler for Examples:
Alpha_TestColorMapGloss
This is a really interesting Shader Technique since depending on what textures are loaded, it can behave very differently, so I'm going to split this one into two parts; with and without "*_b.dds".
Alpha_TestColorMapGloss - WITH "*_b.dds"
This Shader Technique, with it loading a "*_b.dds" Normal Map, loads its Opacity Map from the "*_b.dds" Normal Map's Alpha channel, and the Spec map from the "*_c.dds"
Spoiler for Examples:
Alpha_TestColorMapGloss - withOUT "*_b.dds"
This Shader Technique, withOUT it loading a "*_b.dds" Normal Map, loads its opacity from the RGB channels of the "*_c.dds" texture. To be more specific, it looks for any areas on the texture that is on the faces of the material that have this material applied to it, for any 100% black areas and anything that is 100% black (or close to it), becomes fully transplant, where anything that has any other colour on it, is fully opaque. At the same time it loads the Spec Map from the "*_c.dds" Alpha channel. This material is really good for saving on texture memory since you do not need any specialised Opacity Map and its simply just integrated into the main Diffuse/Colour texture. On the down side however, you naturally can't have any Normal maps but that might not be so much of a big deal to have this material simply not load them even if the rest of your model loads a DXT1 normal map.
Spoiler for Examples:
Exporting with Transparent Materials
This section is really (mostly) covered in my "Working With Multi/Sub-Object Materials" Tutorial under the "Part 1. Multi/Sub-Object Material Setup" & "Part 3. Transparent Materials" section and it also only fully works if you totally use the Multi/Sub-Object Materials since only then can you name more than one (sub) material with the same name, if they are in the same Multi/Sub-Object Material so while you can do the rest of it outside of a Multi/Sub-Object Material, you can only have one material named "AlphaEnvMap" for example.
More info here: https://www.realitymod.com/forum/f189-m ... rials.html















