Maya2dts and transparency
by Shay Casey · in Torque Game Engine · 04/09/2004 (5:15 am) · 7 replies
Anyone have any luck with maya2dts and transparency. The problem that Im having is that Maya uses .tga files with alpha by default, but I dont believe that is supported in TGE. Can anyone confirm that?
All of the TGE samples I have seen use .png files which work fine from Max. Problem is that Maya cannot display them and they dont appear to come into TGE with the .dts. Any ideas on a workaround for this.
Transparency (clip maps specifically) will really help keep some of our objects low poly. eg. I have a truss that is 3 rectangles, triangulated, but it would take hundreds of polys and thousands of faces to make this work without clipping and still look good.
thx
All of the TGE samples I have seen use .png files which work fine from Max. Problem is that Maya cannot display them and they dont appear to come into TGE with the .dts. Any ideas on a workaround for this.
Transparency (clip maps specifically) will really help keep some of our objects low poly. eg. I have a truss that is 3 rectangles, triangulated, but it would take hundreds of polys and thousands of faces to make this work without clipping and still look good.
thx
About the author
#2
should I not use diffuse texture at all then? Or do I need to stack up both a .jpg and a .png on the material as well as have both available in my TGE shapes folder?
04/09/2004 (8:50 am)
Awesome - DN to the rescue one more time. Thanks!should I not use diffuse texture at all then? Or do I need to stack up both a .jpg and a .png on the material as well as have both available in my TGE shapes folder?
#3
04/09/2004 (9:54 am)
You only need a single PNG with an alpha channel. That one PNG file should be connected to the Color and Translucency attributes of the material.
#4
04/09/2004 (10:30 am)
Cool. I will check it out when I get home.
#5
Maya does not even read (import) .png files so you have to trick it into using them.
1. create a .jpg texture (no alpha)
2. create a .png texture (w/ alpha)
3. apply .jpg texture to model color and translucence channels
4. set up your scene for export with the DTSUtility
5. rename the material channel attributes to end with the .png extension
6. export
7. move the .dts model and only the .png texture to your TGE folder
8. load your mission and enjoy
9. rinse and repeat as needed!
One thing to note is the way TGE handles polygon faces and transparency. I seems that TGE does not show back geometry faces if the model was built as a polygon primitive. ie. 1 whole surface mesh. The best way to build it then would be to use single faces and arrange them into the correct shape, then combine them and delete history and freeze transforms.
I have not tested this last theory yet. But it makes sense if you look at a poly primitve with transparency in TGE.
Thanks for your help Danny.
04/10/2004 (6:35 am)
Okay heres the actual process.Maya does not even read (import) .png files so you have to trick it into using them.
1. create a .jpg texture (no alpha)
2. create a .png texture (w/ alpha)
3. apply .jpg texture to model color and translucence channels
4. set up your scene for export with the DTSUtility
5. rename the material channel attributes to end with the .png extension
6. export
7. move the .dts model and only the .png texture to your TGE folder
8. load your mission and enjoy
9. rinse and repeat as needed!
One thing to note is the way TGE handles polygon faces and transparency. I seems that TGE does not show back geometry faces if the model was built as a polygon primitive. ie. 1 whole surface mesh. The best way to build it then would be to use single faces and arrange them into the correct shape, then combine them and delete history and freeze transforms.
I have not tested this last theory yet. But it makes sense if you look at a poly primitve with transparency in TGE.
Thanks for your help Danny.
#6
TGE supports back faces just fine via double-sided materials. However, the Maya2DTS exporter does not export that data at this time. It is on Clark's to-do list, which isn't small by any means. :)
04/10/2004 (1:16 pm)
Shay, no need to do that workaround. Maya can load PNGs by using the plugin posted in the Resource section. See the link in my post above, or do a search for "maya png" in the Resources section.TGE supports back faces just fine via double-sided materials. However, the Maya2DTS exporter does not export that data at this time. It is on Clark's to-do list, which isn't small by any means. :)
#7
I will just build and export the models single-sided and re-export them when Clark has a new version.
Thx for expaining what that resource does - I just glossed right over it yesterday. Works great!
04/11/2004 (6:11 am)
Yeah, I noticed the same thing. I was able to duplicate the faces, flip them 180 so the normals are going the opposite direction and it then shows both side. In reality tho, I was trying to use this to reduce geometry but the workaround may not actual help rendering speeds at all.I will just build and export the models single-sided and re-export them when Clark has a new version.
Thx for expaining what that resource does - I just glossed right over it yesterday. Works great!
Torque Owner Danny Ngan
Presently, in order to use tranparency, you must map the PNG to the material's Translucency attribute rather than the Transparency attribute which is what Maya's users are accustomed to using. I've talked to Clark about this already, and I believe that the Transparency attribute will be used in a future version of the exporter instead of Translucency. For now, use the Translucency channel.
Also, it is important to note that double-sided materials do not work at this time.