On a first screenshot in 1 occasion tree branches is ok, but as you can see on 2 occasion, thin branches disappears and branch crossings looks like big knot, and in a distance this effect intensifies until only very thick branches and intersections remain visible.
I understand, that in real life for eye it is harder to see thin branch on a distance, but it is true if this branch is single. If there is many branches they looks like dark blurry web, but not disappears. This effect also appears with trees in leaves, while in real life dense tree with leaves in a distance still is a dense green ball, not a fish skeleton with remains of meat!
Look at next screenshot:
So, how can I make trees looks good in not so far distance (like on a figure 2 and 3 on first screenshot) without billboard?
Thanks, I checked MipMapsPreserveCoverage and decreased alpha cutoff in tree settings, it helps to make trees with leaves looks good in a distance. But trees without leaves became solid black in a distance, I think, that to solve this I need to write special shader.
So I purchased one of the ready-made speedtrees from the asset store to see if it worked better, and it dosen’t. The branches still have that extremely pixellated look and start to vanish as you move outwards: (Speedtree one is on the right, other two are tree creator trees)
It should help a lot though. But it somewhat depends on what is causing your unwanted effect, geometry or textures.
Something else you could try to minimize it, if it’s texture related is disabling mipmaps on the affected textures (will probably result in other unwanted visual artefacts) and enabling/increasing multisampling if it’s geometry related.
Or lastly if nothing helps, just create a version with artificially expanded geometry and dilated textures and use that as the far-LOD (which is similar to the technique described in the video).
It really bothers me that this seems to be the default, for all trees in the engine. I’m convinced it’s something more to do with the engine itself or maybe my GPU, probably some setting I need to check/uncheck somewhere.
I just find it hard to believe that this is just how trees in Unity are, especially ones you get off the asset store.
So after fiddling with the branch texture and the AA the speed tree (on the right) kind of looks… alright, not as great as I would have liked but it may be the best I can achieve:
My opinion is that the problem comes from using textures and is trigger by Mip Maps in the alpha transparency value.
I have the same problem. And I try to balance the alpha grey texture. I have different textures for every LOD. I set up my GPU to max quality.
A (bad?) different solution can be to make leaves using mesh instead of transparent texture. and adding a very simple super fast shader for the compensating increasing rendering time. If you m make a test and compare result let us know.
So, this is a problem I’ve come across a few times over the years with Unity, and I still have no idea how to really fix it. One of the more recent things I read about was that a common trick is to do two rendering passes
The first render pass is a bit odd. Normally, when two items are drawn on the same pixel, the one that’s closer to the camera wins. For this pass, we want it to be the other way around. The pixels that are further away from the camera are going to win. And, due to the transparences, we are going to want to render the leaves and branches front to back. To top things, off, we are also going to want to set the clipping value to half of what we normally would. This cuts down on leaves being clipped away.
Then, on the second rendering pass, we just render the leaves and branches normally. The first rendering pass is fill out the tree, and this second one is to make it look normal(ish). This is still a hack, but it helps get around the over clipping that happens when the tree leaves don’t take up enough pixels.
Now, I don’t see why I couldn’t write a Unity Surface shader that does this. It would take me a bit of time because I haven’t written one in the last two and half years, but I could do it. My issue is, I have no idea how I would create something like this in shader graph. I’ve been doing a lot of HDRP development these last two months, and one of the issues is the tree leaves. They just get too sparse when they’re at a distance, and being forced to use shader graph doesn’t really help matters.