Transparency problem of NodeMaterial

I have a big mesh and a NodeMaterial to show many trees in the scene, but the transparency rendering is not right. What can I do ?

Hello :slight_smile:

Since your trees appear transparent on my side, I guess your problem is about depth sorting (The fact that a tree from background appears on top of a tree from foreground), right ?

Transparent rendering is a complex subject (have a look at the doc here), and it can be even trickier when it comes to rendering transparent self-overlapping mesh (which is the case here)

There are several ways, but in your case (many trees), I would advice to separate them into instances, instead of rendering one big mesh

2 Likes

You could also not use transparency (by not connecting anything to the FragmentOutput.a input) and use a Discard block instead:

1 Like

Thank you. Using instances is good idea.

Great job!