Game Development Community

Tree problem?

by Kevin Mitchell · in Torque 3D Professional · 05/04/2009 (1:57 pm) · 4 replies

Is anyone else having problems with tree leaves transparency and leaf shadows?

#1
05/04/2009 (1:59 pm)
No not I. Are you having issue with the trees in the Warrior Camp or from stuff that you are adding yourself?
#2
05/04/2009 (2:02 pm)
I'm using the trees from the FPS Environment Pack from the store. None of the leaves are casting shadow and the leaves are see through.
#3
05/04/2009 (2:33 pm)
Here is a sample material from the Warrior Camp demo...

new Material(material_autumntree_branch)
{
   mapTo = "autumntree_branch.png";
   diffuseMap[0] = "autumntree_branch.png";
   translucentZWrite = true;
   translucent = true;
   translucentBlendOp = None;
   alphaTest = true;  // default value
   alphaRef = 150;   // alpha less than 128 in brightness (255 is max) will not be rendered
};

AlphaTest is the flag that tells the engine that this object should cast a shadow based on pixel transparency. Without it defined translucent shapes cast no shadows.
#4
05/04/2009 (2:33 pm)
I noticed that problem with some of the trees from the environment packs but I was getting the transparency problem in TGEA 1.8.1.