Transparent DTS, help.
by Claude-Alain Fournier · in Torque Game Engine Advanced · 12/31/2006 (2:10 am) · 11 replies
Hi,
I have the problem with a dts shape :
See this thread you will get a download of that shape :
www.garagegames.com/mg/forums/result.thread.php?qt=24707
I can't find any reason why that tree does not show. It render properly in ShowTool. But in game (I am using TSE HEAD) it just do not want to render.
The shape is there, if I remove the material, I get the "No Material" Texture and collision is there.
I have many other tree working with same material configuration but that one is impossible, and I tried every single trick I know. So what I suggested to Matthew is that the problem is with how the shape has been exported but my experience with these is null.
Any suggestion would be appreciated.
I have the problem with a dts shape :
See this thread you will get a download of that shape :
www.garagegames.com/mg/forums/result.thread.php?qt=24707
I can't find any reason why that tree does not show. It render properly in ShowTool. But in game (I am using TSE HEAD) it just do not want to render.
The shape is there, if I remove the material, I get the "No Material" Texture and collision is there.
I have many other tree working with same material configuration but that one is impossible, and I tried every single trick I know. So what I suggested to Matthew is that the problem is with how the shape has been exported but my experience with these is null.
Any suggestion would be appreciated.
#2
So I don't think that's anything related to the material itself.
01/03/2007 (10:34 am)
Thanks for the proposal, but I have about 30 trees that work perfectly, only that particular one does not. So I don't think that's anything related to the material itself.
#3
And sorted :)
Seems that using the SORT:: suffix in the objects name for Max export (for Z sorting),
prevents objects using textures w/ alpha channel being drawn in TSE.
Works in TGE though.
A bug perhaps ?
03/01/2007 (2:47 am)
Bumped into the same problem.And sorted :)
Seems that using the SORT:: suffix in the objects name for Max export (for Z sorting),
prevents objects using textures w/ alpha channel being drawn in TSE.
Works in TGE though.
A bug perhaps ?
#4
03/07/2007 (2:31 pm)
Can u perhaps post a tree that has translucency and the material.cs for it.
#5
TGEA handles alpha a little different and does not try to do it the "brute force" way of TGE.
As it uses shader it just splits the rendering part of normal material and translucent (translucent is the last thing rendered, the normal material is rendered long before that point. See RenderInstMgr.h in RenderInstance folder for the order)
the thing that could be seen as bug is that TGEA does not ignore the SORT part in the name.
03/07/2007 (4:33 pm)
Don't think its a bug.TGEA handles alpha a little different and does not try to do it the "brute force" way of TGE.
As it uses shader it just splits the rendering part of normal material and translucent (translucent is the last thing rendered, the normal material is rendered long before that point. See RenderInstMgr.h in RenderInstance folder for the order)
the thing that could be seen as bug is that TGEA does not ignore the SORT part in the name.
#6
the suffix SORT:: is not needed anymore with the TGEA.
It would have been MUCH faster process if someone would kindly have updated that part of the
translucency & TGEA tutorial.
Grrrrr.
But it works now.
Here's my foliage snippet.
new Material(MyFoliage)
{
baseTex[0] = "Foliage";
translucent = true;
translucentZWrite = true;
translucentBlendOp = LerpAlpha;
alphaTest = true;
alphaRef = 128;
emissive = true;
};
03/07/2007 (5:04 pm)
Yes, and it only took about on hour to figure out that the suffix SORT:: is not needed anymore with the TGEA.
It would have been MUCH faster process if someone would kindly have updated that part of the
translucency & TGEA tutorial.
Grrrrr.
But it works now.
Here's my foliage snippet.
new Material(MyFoliage)
{
baseTex[0] = "Foliage";
translucent = true;
translucentZWrite = true;
translucentBlendOp = LerpAlpha;
alphaTest = true;
alphaRef = 128;
emissive = true;
};
#9
The foilage texture you refering to Petteri, is that a PNG-8, with 128 colours, and transparency in last index? What else do I need to set to get transluncy?
03/08/2007 (12:12 pm)
Okay... im still doing something wrong here...The foilage texture you refering to Petteri, is that a PNG-8, with 128 colours, and transparency in last index? What else do I need to set to get transluncy?
#10
From which *.PNG is the most resource hungry, so I'll strongly recommend *.DDS (dtx3/dtx5).
The alphaRef syntax means that it checks from the alpha channel from greyscale 0-255,
that which part are drawn and which are not.
But that is syntax is only for performance optimizing.
03/08/2007 (12:29 pm)
Nope, the texture format is either *.DDS w/alphachannel or *.PNG w/alphachannel (Super PNG 32 bit.).From which *.PNG is the most resource hungry, so I'll strongly recommend *.DDS (dtx3/dtx5).
The alphaRef syntax means that it checks from the alpha channel from greyscale 0-255,
that which part are drawn and which are not.
But that is syntax is only for performance optimizing.
#11
03/09/2007 (12:27 am)
Thanx for the help... Will give it a try over the weekend.
Torque Owner Adam Beer
Ignition Games Inc.
new Material(tree_tex)
{
baseTex[0] = "tree_tex";
translucent = true;
translucentZWrite = true;
};
Where tree_tex is put the texture:
new Material(white_pine)
{
baseTex[0] = "WhitPine_Main";
translucent = true;
translucentZWrite = true;
};
Hope this helps.