Translucency problem
by Leslie Young · in Game Design and Creative Issues · 06/08/2008 (4:30 am) · 6 replies
I'm getting this weird effect on trees in my mission. It only appear when viewing the leaves against the sky.
Check the branch near the player's hand in screenshot. Clearly there should be foilage behind it and not sky in that outline around the branch. Is there a way to get rid of this effect?
This is in TGEA 1.7

Check the branch near the player's hand in screenshot. Clearly there should be foilage behind it and not sky in that outline around the branch. Is there a way to get rid of this effect?
This is in TGEA 1.7

About the author
#2
07/03/2008 (8:23 am)
Anyone got another suggestion to get this to look better?
#3
07/03/2008 (8:40 am)
Try translucentBlendOp = None;
#4
I made a character with great looking hairs on TGE, he looks like crap on TGEA. At best, I can set the alphaRef, but it defeats the whole point of having translucency.
07/03/2008 (6:43 pm)
Why the alpha is not sorted like it is in TGE? Without proper support of manual sorting no much things can be done :/I made a character with great looking hairs on TGE, he looks like crap on TGEA. At best, I can set the alphaRef, but it defeats the whole point of having translucency.
#5
07/03/2008 (10:02 pm)
I have to chime in on this one too. Trees are an important part of my game. My trees are all nicely rigged and are animted in realtime with the tree replicator resource. It kinda kills the realism effect when you see outlines around the leaves.
#6
It probably doesn't handle semi-transparent so good but it helped remove the edge overlap from my leaves.
07/15/2008 (6:26 pm)
Try setting the alpharef to 255 and see how it comes out then.new Material(foliage1)
{
mapTo = "foliage1";
basetex[0] = "foliage1";
translucent = true;
translucentBlendOp = none;
translucentZWrite = true;
alphaRef = 255; // anything below this number is not visible and is not written to zbuffer
};It probably doesn't handle semi-transparent so good but it helped remove the edge overlap from my leaves.
Torque Owner Leslie Young
just ealised that I might have to specify a material after posting this :p
ok, so I'll leave it here incase someone else get this problem and searches the forums.
Solution: Create materials if your gonna work in TGEA and specify translucent = true; if you have translucency.
new Material(MAT_SomeTranslucentTexture)
{
mapTo = "SomeTranslucentTexture";
baseTex[0] = "SomeTranslucentTexture";
translucent = true;
};
that will fix it,, kinda.. but now you will have messed up sorting.
So add translucentZWrite = true; which will bring back the outline.. yeah :(
but by adding alphaRef = 128; I at least got the outline to be much finer and not that noticable. I'm guesing that the leaves texture should not have tranclucency and totally opaque and totally transparent areas only.
finally my material looks like this (still needa add bump and maybe some specular to it)
new Material(MAT_SomeTranslucentTexture)
{
mapTo = "SomeTranslucentTexture";
baseTex[0] = "SomeTranslucentTexture";
Translucent = true;
translucentZWrite = true;
translucentBlendOp = LerpAlpha;
alphaRef = 128;
}