making materials transparent according to alpha channel?

Hey all,

I seem to be having some trouble in making materials transparent according to the alpha channel in the assigned texture. I added an alpha channel in photoshop and saved as bmp, as I read somewhere that png doesn't actually support an alpha channel. I saved them as DDS as well, for later use in P3D. However, when I assign the texture to the material, they don't actually make the material transparent. My feeling is that the alpha is read properly, and it seems the textures are made to be transparent on top of the material, but the material itself does not become transparent at the necessary places. When I click "view alpha" in the texture pane, it does show the alpha, and I can toggle the alpha on or off which changes how the texture in the viewport looks. Hence I'm pretty sure the texture is becoming transparent where required - but the material is not. See the attached shot for what I'm seeing in the viewport. The lines are all red due to the materiel being assigned a solid red color so I can easily identify it in MCX, but I don't actually want to see it while I'm working on these things in Blender.

transparency_issue.PNG

So I'm a little confused. Am I trying to do something that can't actually be done, or am I simply doing something wrong? Any help would be appreciated!
 

Pyscen

Resource contributor
Hello....

I take it from your explanation that you are using the red line to identify the texture, but you don't wish for it to show in the final texture? If this is the case, then the red line needs to be transparent also. The only way to identify a texture, is by name, nothing within the texture should be used as such (especially if it needs to not be there in the final texture). Black within the Alpha Channel will make the material fully transparent, otherwise it will be visible.

PSD files as well as PNG can have an alpha channel. Though, depending how they are saved and read, by some applications, they may not be read correctly. Actually, DDS files can be read within Blender also, you might try that.

Hopefully that clears up the confusion...
 
Hi Doug, it sounds like there is a second alpha channel that is specific to the material? I assumed that the alpha channel of the texture would also affect the material, but it sounds like this is not the case. I did end up finding a tutorial that explained having to turn on Z-transparency on the materials tab, and then enable the Alpha option in the Diffuse section of the Texture tab. Doing that I did get the transparency I needed and now things appear mostly well :) Though not entirely quite yet... Active objects appear fine, but as soon as an object becomes inactive, the object material seems to somehow darken, making the transparency somewhat less. Not sue if that makes any sense?
 

Pyscen

Resource contributor
Hello...

Each layer can have It's own areas of transparency, but it is not classified as the alpha channel. Layers are stacked onto each other, each representating a part of the whole imagine or texture. Any layer(s) that is above the other(s), that uses any pixel(s) previously drawn upon, will be over written, so to speak. An Alpha Channel within a texture or image will control all layers opacity/transparency.

I'm not sure of your meaning of active objects or inactive objects in this context. Maybe, if you can show an example of this?
 
Hey all,

I added an alpha channel in photoshop and saved as bmp, as I read somewhere that png doesn't actually support an alpha channel.
Incorrect fundamental assumption. Once you saved as .bmp, you wiped out the alpha. The correct format is .png (well, one of many), or just convert to .dds directly from your graphics software (if possible).

David
 
Thanks for the additional replies. So indeed when I saved as a PNG and enabled the Alpha in the texture's preview pane, it did show up, but the transparency as I had already achieved it is gone now, such that the solid material assigned to the material, in this case red, shows up again. It would be helpful is somebody could list the settings required to achieve transparency with a png?

As for the dds, I do have it, but it's vertically flipped so that P3D will be able to use it - in which case I can't really use it in Blender. So I simply make two versions of the tetxure, one for Blender and one dds ready for use P3D. I think the Blender texture cna be any format... As long as I can get it to show up properly so that I know what to expect from it in the sim.
 

Pyscen

Resource contributor
All Alpha Channels in a given file type are really the same. It would be easier to show the image here what you are seeing,... and explain again what you are trying to achieve.

Yes, the vertical flip does create a problem within Blender,... and 2 versions is a simple solution and unfortunately can cause confusion (the same texture name being used for both versions). What I suggest in this case to prevent confusion is to not vertical flip any of your DDS until you are ready to view within FSX or P3D. The only reason for flipping in the first place is because of the simulator itself (the final results). Within MCX, there is an option within to not flip or to flip (blah, blah). Just remember that you set it unlike myself fairly recently :D).
 
Last edited:
Top