Transparent .tga texture
by Nmuta Jones · in Artist Corner · 06/29/2008 (3:58 pm) · 24 replies
I have a tree... a beautiful palm tree, in 3ds Max.
It had leaf planes with a transparent .tga textures. If you open the .tga texture in Photoshop, it looks like it has a green background, but there is an alpha channel and the leaves have alpha.
At one point in time, I remember having the palm in TGE with the alpha transparency for the leaves. I DID NOT use black/white alpha channel. I remember using the .tga for transparency.
I simply CANNOT seem to remember how I did it.... how I got the alpha to show up. But I do remember I was using either .tga in torque or .png. Regardless, the alpha is not showing up. Anyone have any ideas?
I am using exporter Pro for 3ds Max 9.
Torque 1.5.2
It had leaf planes with a transparent .tga textures. If you open the .tga texture in Photoshop, it looks like it has a green background, but there is an alpha channel and the leaves have alpha.
At one point in time, I remember having the palm in TGE with the alpha transparency for the leaves. I DID NOT use black/white alpha channel. I remember using the .tga for transparency.
I simply CANNOT seem to remember how I did it.... how I got the alpha to show up. But I do remember I was using either .tga in torque or .png. Regardless, the alpha is not showing up. Anyone have any ideas?
I am using exporter Pro for 3ds Max 9.
Torque 1.5.2
About the author
Lead Developer for MediaBreeze Multimedia
#2
http://tdn.garagegames.com/wiki/DTS/3dsmax/Advanced_Materials#Alpha_Opacity
06/30/2008 (8:45 am)
By the way, I did follow the instructions on TDN verbatim:http://tdn.garagegames.com/wiki/DTS/3dsmax/Advanced_Materials#Alpha_Opacity
#3
I could not keep the beautiful .tga textures that I had. For some reason the .dts exporter was not picking up the alpha channel in the .tga files.
I had to use two .png maps
diffuse = the textured leaf WITH alpha transparency for all areas that are not on the leaf
opacity = a black and white version of the leaf, with alpha trans. Black where leaf is, transparent elsewhere. *******************
that's the only thing that worked. It's a "compromise" because the fine details between the palm leaves don't come out as well as they did in the original .tga files and would require some serious detailed photoshop work. But what I have works so far. If anyone wants me to send them the original .tga file I'm talking about I would be happy to do so.
The other odd thing about all of this is that the Photoshop exported .png files had alpha channel problems and I ended up having to use .png files exported from Fireworks.
06/30/2008 (5:34 pm)
Well, with some compromises I was able to get it working. I could not keep the beautiful .tga textures that I had. For some reason the .dts exporter was not picking up the alpha channel in the .tga files.
I had to use two .png maps
diffuse = the textured leaf WITH alpha transparency for all areas that are not on the leaf
opacity = a black and white version of the leaf, with alpha trans. Black where leaf is, transparent elsewhere. *******************
that's the only thing that worked. It's a "compromise" because the fine details between the palm leaves don't come out as well as they did in the original .tga files and would require some serious detailed photoshop work. But what I have works so far. If anyone wants me to send them the original .tga file I'm talking about I would be happy to do so.
The other odd thing about all of this is that the Photoshop exported .png files had alpha channel problems and I ended up having to use .png files exported from Fireworks.
#4
http://tdn.garagegames.com/wiki/Image:Tools_AlphaChannel_SuperPNG.zip
07/01/2008 (8:43 am)
Try to save images as superpng.http://tdn.garagegames.com/wiki/Image:Tools_AlphaChannel_SuperPNG.zip
#5
Photoshop does not support alpha transparency with PNG otherwise? No wonder it worked in Fireworks and not in Photoshop.
But I am using Photoshop CS3. I would have thought it would be included by now.
07/01/2008 (8:59 am)
Thanks for the superPNG link. Photoshop does not support alpha transparency with PNG otherwise? No wonder it worked in Fireworks and not in Photoshop.
But I am using Photoshop CS3. I would have thought it would be included by now.
#6
07/01/2008 (9:30 am)
Photoshop CS3 does... FILE-> Save for Web & Devices... , then make sure the preset is .png and that transparency is checked.
#7
07/01/2008 (11:23 am)
Photoshop does not support transparency for TGA files. They dropped that in Photoshop 7.
#8
Alpha channels in TGA files work just fine with photoshop (if Torque work with TGA files at all is to me unknown though, I would have guessed not).
PNG on the other hand photoshop doesn't handle correctly, it saves "transparency", which kinda works for some cases but it doesn't leave the background matte so you usually get a nasty white outline around your edges. SuperPNG does work. (the old version that you can get on TDN, the latest version of SuperPNG doesn't work either, it saves stuff the same way photoshop does).
It will save a proper alpha channel (you have to actually create it as an alpha channel in photoshop though, and not just mask off your layer(s)).
Make sure you disable the standard PNG-plugin (just move the file out of the the photoshop folder) when you install SuperPNG or "Strange Things"(tm) will happen.
The other option is to save your diffuse as "whatever.jpg" and your alpha as "whatever.alpha.jpg".
07/01/2008 (12:23 pm)
Stefan; that's not entirely correct.Alpha channels in TGA files work just fine with photoshop (if Torque work with TGA files at all is to me unknown though, I would have guessed not).
PNG on the other hand photoshop doesn't handle correctly, it saves "transparency", which kinda works for some cases but it doesn't leave the background matte so you usually get a nasty white outline around your edges. SuperPNG does work. (the old version that you can get on TDN, the latest version of SuperPNG doesn't work either, it saves stuff the same way photoshop does).
It will save a proper alpha channel (you have to actually create it as an alpha channel in photoshop though, and not just mask off your layer(s)).
Make sure you disable the standard PNG-plugin (just move the file out of the the photoshop folder) when you install SuperPNG or "Strange Things"(tm) will happen.
The other option is to save your diffuse as "whatever.jpg" and your alpha as "whatever.alpha.jpg".
#9
Adobe fixed it, but didn't realize people were used to using it the old way. The plugin from PS6 is the first revision, and so is the plugin in 7.1, should anyone be interested in retaining it.
07/01/2008 (1:19 pm)
The Targa file specification defines that the fourth RGB channel should be opened as transparency, and not as an alpha channel. They make a clear distinction between the two, and although the data in the fourth channel is still available, it is used slightly differently, hence the naming difference.Adobe fixed it, but didn't realize people were used to using it the old way. The plugin from PS6 is the first revision, and so is the plugin in 7.1, should anyone be interested in retaining it.
#10
The image looks flat but I know the alpha is present in the .tga because in Max the leaves look perfect with perfect transparency when the .tga is placed in the opacity map slot. I can use the same .tga in diffuse and opacity and the leaf comes out perfect.
Here is the leaf:
http://www.atrwheels.com/leaf.tga
www.atrwheels.com/leaf.tga
07/01/2008 (2:12 pm)
Ok, thanks Stefan and everyone for very insightful stuff. Great to be a part of this forum. So my BIG question right now would be how can I separate out the alpha channel from my other channels in my .tga file in Photoshop? The image looks flat but I know the alpha is present in the .tga because in Max the leaves look perfect with perfect transparency when the .tga is placed in the opacity map slot. I can use the same .tga in diffuse and opacity and the leaf comes out perfect.
Here is the leaf:
http://www.atrwheels.com/leaf.tga
www.atrwheels.com/leaf.tga
#11
This freeware application that can nicely convert any of your original Targa file to "correct" (for Torque) PNG file (even a whole folder, it does support batch converting).
Or, you can choose to save it as DDS in case you use TGEA (or TGE+DDS support).
Hope this helps.
P.S. Using this way of converting stuff from MAX exported TGA files (with transparency) to PNG for own project with no problems so far.
edit: spl
07/01/2008 (4:04 pm)
Nmuta, you can use "The Compressonator" from ATI. I found it as a best way to move originally "transparent" targa to PNG.This freeware application that can nicely convert any of your original Targa file to "correct" (for Torque) PNG file (even a whole folder, it does support batch converting).
Or, you can choose to save it as DDS in case you use TGEA (or TGE+DDS support).
Hope this helps.
P.S. Using this way of converting stuff from MAX exported TGA files (with transparency) to PNG for own project with no problems so far.
edit: spl
#13
this tool is awesome
("The Compressonator")
For anyone else who needs this (and I doubt it, given its such a rare need for this..... however it's a thing where if you need it, you REALLY need it)...
Download The Compressonator here:
developer.amd.com/gpu/compressonator/Pages/default.aspx
1. load a texture using file --> open
2. hit "compress"
3. It will generate three textures.
4. Save whichever you want. I do "save original" and it lets you save the original .tga as a .png ....complete with alpha channels as long as you designated that in the dialog boxes that pop up along the way.
5. The saved .png file will have alpha in it.
6. you're done!
Thanks again to bank.
07/01/2008 (5:42 pm)
NO, seriously, bank..... this tool is awesome
("The Compressonator")
For anyone else who needs this (and I doubt it, given its such a rare need for this..... however it's a thing where if you need it, you REALLY need it)...
Download The Compressonator here:
developer.amd.com/gpu/compressonator/Pages/default.aspx
1. load a texture using file --> open
2. hit "compress"
3. It will generate three textures.
4. Save whichever you want. I do "save original" and it lets you save the original .tga as a .png ....complete with alpha channels as long as you designated that in the dialog boxes that pop up along the way.
5. The saved .png file will have alpha in it.
6. you're done!
Thanks again to bank.
#14
Texture compression is very important in game design, needless to say. (P.S. ... if there are any Blitz3D users out there, Blitz3D now supports texture compression...I think using the .dds format. You may want to pick up this tool).
07/01/2008 (6:04 pm)
I should add that this tool is good for games in general, and much more than just my issue.Texture compression is very important in game design, needless to say. (P.S. ... if there are any Blitz3D users out there, Blitz3D now supports texture compression...I think using the .dds format. You may want to pick up this tool).
#15
1. on the channel window select alpha channel and select black area, then select rgb channels.
2. double click on background layer to convert it to a free layer.
3. hit Delete on keyboard.
4. save as superpng.
07/14/2008 (9:09 am)
For converting an alpha channel to PNG trancparency in Photoshop:1. on the channel window select alpha channel and select black area, then select rgb channels.
2. double click on background layer to convert it to a free layer.
3. hit Delete on keyboard.
4. save as superpng.
#16
07/14/2008 (10:04 am)
Holy crap...that was cool. i got on the forum to find and answer to this exact problem, and it was the first topic listed! nice! i'm going to try this "the compensator" fix and report back how/if it worked! thanks all!
#17
I've been a member of several dedicated, software-based real time 3d communities and I've been a licensed member of all them them:
Blitz3D, Shockwave3D, WildTangent, Virtools (educational license), and Quest3D.
and all have had great communities, especially Blitz3D, but GG is the most mature, most knowledgeable, and most responsive one I've ever been a part of.
07/14/2008 (10:14 am)
Garage Games forums are simply awesome.I've been a member of several dedicated, software-based real time 3d communities and I've been a licensed member of all them them:
Blitz3D, Shockwave3D, WildTangent, Virtools (educational license), and Quest3D.
and all have had great communities, especially Blitz3D, but GG is the most mature, most knowledgeable, and most responsive one I've ever been a part of.
#18
They're no longer strangely transparent. Unfortunately, now all I have are strange vertical black and white lines as a material for the model...
All of my mats sizes are powers of 2. They are also all in the player folder. Aside from that I'm not sure what could be wrong.
Any suggestions?
Thanks!
07/15/2008 (7:40 am)
Hmmm - ok, so i tried this method...in Max, the model looks great. I applied the new bmp mats (made bmps by default so i just went with it) to the model, it renders just fine, so i exported the DTS. They're no longer strangely transparent. Unfortunately, now all I have are strange vertical black and white lines as a material for the model...
All of my mats sizes are powers of 2. They are also all in the player folder. Aside from that I'm not sure what could be wrong.
Any suggestions?
Thanks!
#19
They're no longer strangely transparent. Unfortunately, now all I have are strange vertical black and white lines as a material for the model...
All of my mats sizes are powers of 2. They are also all in the player folder. Aside from that I'm not sure what could be wrong.
Any suggestions?
Thanks!
07/15/2008 (7:41 am)
Hmmm - ok, so i tried this method...in Max, the model looks great. I applied the new bmp mats (made bmps by default so i just went with it) to the model, it renders just fine, so i exported the DTS. They're no longer strangely transparent. Unfortunately, now all I have are strange vertical black and white lines as a material for the model...
All of my mats sizes are powers of 2. They are also all in the player folder. Aside from that I'm not sure what could be wrong.
Any suggestions?
Thanks!
#20
Are you using a transparency map? what kind of map is this?
How does it look in show tool pro? same vertical black and white lines?
07/15/2008 (8:13 am)
Be more specific....what is your diffuse map? is it a jpg, a png, etc? Are you using a transparency map? what kind of map is this?
How does it look in show tool pro? same vertical black and white lines?
Torque Owner Nmuta Jones
Can anyone help with this? I am using the Exporter Pro inside of 3ds max 9, and viewing the final tree in Show Tool Pro.
I cannot get ANY alpha working on any of the textures.
I have tried ..............
.jpg diffuse & png opacity map with alpha channel
png diffuse & png opacity map with alpha channel
png diffuse with alpha channel only
.tga diffuse & png opacity map with alpha channel
.tga diffuse with alpha channel only
.tga diffuse & .tga acity map with alpha channel
playing with opacity map options in the material editor
and EVERY seemable permutation/ combination of things. Clearly there is something I'm doing wrong. I've done this before with a previous version of 3ds Max and a previous exporter (neither of which I have anymore).
WHAT COULD I BE DOING WRONG???????????? this is basic. I can't seem to get it to work.