Transparent textures dont look good from afar

Hello everyone,

I have this wonderful little tree over here, which looks fine:

However, when I view the tree from a distance, it almost seems like the transparent parts of the leaves textures are taking over:

The more distance, the less leaves.

Now I am aware, that LOD and Billboards kinda will solve the problem when I have them, but I wonder if there is something I can do in order to change the way far textures are rendered.
I don’t care if the opaque pixels dominate the transparent ones, because then you’ll at least recognize it as a tree.

Here ist the Material I use at the moment:
Material My Material : Common/MatDefs/Light/Lighting.j3md {
MaterialParameters {
DiffuseMap : Flip Repeat Textures/tree_leaves_transparent.png
AlphaDiscardThreshold: 0.5
}
AdditionalRenderState {
FaceCull Off
}
}

Any suggestions?

Sorry, I totally forgot to highlight the material code:

Material My Material : Common/MatDefs/Light/Lighting.j3md {
    MaterialParameters {
        DiffuseMap : Flip Repeat Textures/tree_leaves_transparent.png
        AlphaDiscardThreshold: 0.5
    }
    AdditionalRenderState {
        FaceCull Off
    }
}

Apparently there is no ‘edit’ button for the first post. :expressionless:

Do you really need AlphaDiscardThreshold so high? Try putting it to 0.05 or so and see if it helps (this is assuming that your transparent alpha is around zero).

2 Likes
@abies said: Do you really need AlphaDiscardThreshold so high? Try putting it to 0.05 or so and see if it helps (this is assuming that your transparent alpha is around zero).

Oh man, it was totally my mistake:
I did try that, but I did it on the wrong material!

Of course you are right. :slight_smile:
While the transparent alpha is sadly not around zero at all, setting the threshold to 0.4 or 0.3 helps tremendously.
Even tough the effect is the same, it is now barely noticeable even over far distances. So consider it fixed :wink: