Translucency issues with trees
by QSquid · in Torque Game Engine Advanced · 04/17/2007 (12:53 pm) · 1 replies
I'm having some trouble getting transparency correct when using it for trees. I'm assuming it's something to do with the z-buffer. I can get the leaves transparent, and two sided, but when viewed from a low angle (anything below straight on) there is a halo of transparency around each set of leaves. This halo allows you to see through any other leaves behind it. When viewed from a top-down view, everything looks fine. I'm using TGEA and here's my material code:
new Material(firbranch)
{
mapTo = "firbranch.png";
baseTex[0] = "~/data/textures/color/firbranch256.png";
translucent = true;
translucentBlendOp = LerpAlpha;
translucentZWrite = true;
alphaRef = 1;
};
Any help you could offer would be appreciated. Thanks.
new Material(firbranch)
{
mapTo = "firbranch.png";
baseTex[0] = "~/data/textures/color/firbranch256.png";
translucent = true;
translucentBlendOp = LerpAlpha;
translucentZWrite = true;
alphaRef = 1;
};
Any help you could offer would be appreciated. Thanks.
Associate Tom Spilman
Sickhead Games