Search Unity

A HUGE amount of draw calls from my Unity Terrain grass. What gives?

Discussion in 'General Graphics' started by KnifeMedia, Nov 13, 2016.

  1. KnifeMedia

    KnifeMedia

    Joined:
    Jun 15, 2015
    Posts:
    108
    I've got an issue. Typically Unity Terrain grass batches quite nicely. However, my terrain is producing THOUSANDS of draw calls from a small clump of grass objects. Any ideas? I'm using RTP and the terrain is located inside a gameobject. Shouldn't it be something around the 100 draw call mark? Pics below:


     
  2. KnifeMedia

    KnifeMedia

    Joined:
    Jun 15, 2015
    Posts:
    108
    OK I fixed it! I'm gonna explain how for future reference by others.

    1. I had a more advanced water shader in the environment that was utilising a second camera with a far draw distance. That about halved the calls.

    2. I changed my detail patch resolution to 128 (bigger = less calls) and made the overall detail resolution of the terrain 128. Draw calls are around 100 now :)
     
    fffMalzbier likes this.
  3. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Good catches! I have found a large performance improvement in terrain overall by using the lowest heightmap resolution I can while still getting the detail I want.

    PS - Those water systems also dynamically spawn those reflection cameras too, so it's not always obvious to find them and troubleshoot!
     
  4. MaxEnders

    MaxEnders

    Joined:
    Apr 9, 2019
    Posts:
    10
    In case someone sees this in the future
     
    wuzhouu3d and c0d3_m0nk3y like this.