Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity Trees - Tree Soft Occlusion shader still necessary?

Discussion in 'World Building' started by JanetRGilbert, Jun 14, 2021.

  1. JanetRGilbert

    JanetRGilbert

    Joined:
    Sep 25, 2017
    Posts:
    8
    I'm experimenting with the standard Unity trees.

    When you first create them the shaders they use are "Hidden/Nature/Tree Creator Leaves Optimized" and "Hidden/Nature/Tree Creator Bark Optimized" but this causes error messages to be displayed informing you that the trees need to use the "Nature/Tree Soft Occlusion Bark" and "Nature/Tree Soft Occlusion Leaves." But when I use these shaders the trees turn extremely dark, even when I move them to the "Ambient-Occlusion" folder and reimport them (as instructed in the documentation.) See attached image.

    I have also noticed that the Hidden/Nature shaders have a "Enable GPU Instancing" checkbox, but do not allow GPU instancing. I messed around with these shaders to enable GPU instancing and managed to increase the performance but it's still pretty poor. Is this normal for trees? Do you need to use Speedtree or an Asset store system to get a nice lush forest?
     

    Attached Files:

  2. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    So to me it looks like Tree Creator shaders are used for Tree Creator models. SpeedTree 7 and 8 shaders are only for coresponding trees made with SpeedTree. Soft occlusion shaders are generic and can be used for trees modeled and imported from other software, like Blender. See my video for Soft Occlusion shader and how I imported basic Blender tree with it:


    Also play with Soft Occlusion shader parameters on material to get lighting which works best for you.
     
  3. JanetRGilbert

    JanetRGilbert

    Joined:
    Sep 25, 2017
    Posts:
    8
    The soft occlusion shader parameters look terrible no matter how they set them. I don't mean "artistically off a bit" - literally black bark.

    I'm trying to make the trees entirely in Unity without using any other packages because I'm a coder not an artist and I'm really doing this to learn about shaders etc.
     
  4. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    I am sorry to hear that you are unable to set up your trees for SO shaders. As far as I tried it worked with various external assets, such as Book of the Dead trees (screenshots in https://forum.unity.com/threads/case-1227083-tree-nature-soft-occlusion-shader-in-urp.825825/).
     
  5. JanetRGilbert

    JanetRGilbert

    Joined:
    Sep 25, 2017
    Posts:
    8
    So are the built-in Unity trees basically abandoned? The response to every question about them seems to be "use these trees from somewhere else"

    It might be worth mentioning I'm just using the standard pipeline, not the URP.
     
    Last edited: Jun 14, 2021
    Tanaka_C and chanfort like this.
  6. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,694
    The Unity trees are not abandoned. First of all, you dont have to only use the SO shader. There are plenty of shaders out there that are far better, and there are better trees out there too. You can use a different shader for bark, or leaves, your choice. Just look at your pic, clearly the alpha cutoff is wrong, the color is wrong, etc. You can use a different shader for bark, or leaves, your choice.

    My personal fav is CTI, great foliage shaders, with lots of control/options.