More tree problems...

Blitz3D Forums/Blitz3D Programming/More tree problems...

fall_x(Posted 2005) [#1]


This tree contains of a trunk made in TreeMagicG2, and 6 squares (sqhaused boxes so they have two sides) for the leaves, which is added in milkshape3d.
Both the trunk and the leaves share the same texture in order to reduce the number of surfaces. This texture is a png with alpha (the leaf part has only 50% alpha so you can see trough it). This texture has _trans in the filename, and I use TextureFilter "_trans",2 to make this transparant.
The problem is at the trunk. If you look at it, you can see that the branches that should be hidden by the trunk are still visible, you can see them trough the trunk.
If I don't use the texturefilter, the leaves have white boxes around them for the parts where they should be transparant, and the alpha is gone too.

So I have two questions :

- How do I fix this?
- I noticed that when I create a full tree with leaves in treemagic using preset leaf texture, this texture does not need the _trans in it's filename nor the texturefilter, and they are still transparant - how can I do that?


wizzlefish(Posted 2005) [#2]
Z-ordering?


Ross C(Posted 2005) [#3]
Looks like a single surface problem. The triangles are being drawn in the order they were created. This happens when you use alpha. I'm afradi though, i'm not 100% sure how to fix this... Have two surfaces probably. one for the trunk and one for the leaves. And don't give the trunk any alpha. :o)