Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Terrain Tree Distance Not Working?

Discussion in 'General Graphics' started by Treasureman, Mar 20, 2021.

  1. Treasureman

    Treasureman

    Joined:
    Jul 5, 2014
    Posts:
    563
    Hi! I've recently put together a quick forest scene that has a lot of grass and trees. I'm getting into the optimization stage, but I'm running into some issues. The grass is what's causing most of the performance issues (they're LODs painted onto the terrain as tree prefabs). I'd like to shorten the draw distance on them, but the tree distance slider in my terrain isn't doing anything. Whether I have it set to 1 or 2000, the grass all stays at any distance. If I set it to 0, it all disappears. It's basically forcing me into an all or nothing state with my grass.

    Also, as a side note, Occlusion Culling doesn't seem to be working properly for me. I have get an overall framerate drop when using it, so I'm not sure what's going on there.

    Let me know if you need any more information, and thank you in advance for the help!
     
  2. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,793
  3. BuzzKirill

    BuzzKirill

    Joined:
    Nov 14, 2017
    Posts:
    42
    I've noticed that too, if your trees have a LOD component then they don't seem affected by Tree Distance (they're either on at 1 or off at 0). In my case the problem was solved by removing my custom LODs as I was fine with Unity's handling of my trees
     
  4. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,644
    "Also, as a side note, Occlusion Culling doesn't seem to be working properly for me. I have get an overall framerate drop when using it, so I'm not sure what's going on there."

    I can honestly say that many of us have run into that problem, its been talked about many times. OC doesnt always work correctly in certain situations, sometimes due to wrong static tags selected (occluder, occludee, etc.), or too many objects in scene, not sure of the root cause.

    Example, in my game Jurassic Extinction i have 9 levels/scenes, and OC is set up correctly, but really doesnt help much at all, in some scenes it actually makes things (fps/ms) worse. So i ended up not using it at all. So unless you have things set wrong, its just the nature of the beast.
     
  5. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,793
    OC makes lags on mobile devices, you can use per layer camera clipping instead ,to have the best performance
     
    warthos3399 likes this.