Search Unity

Broken SpeedTree batching (With reproducible example scene)

Discussion in 'General Graphics' started by Riaan-Walters, Nov 20, 2016.

  1. Riaan-Walters

    Riaan-Walters

    Joined:
    Apr 11, 2014
    Posts:
    36
    Hi There,

    I have a problem with speedtree's not batching at all.

    I have included an example scene (project actually) which very clearly highlights the problem

    Current issue :
    Each tree in the scene causes 25! drawcalls, with 0 'saved by batching'
    I have switched off Smooth LOD and stripped out litterally everything else, the scene only contains 3 LOD0's and a light+camera

    Total Draw calls : 91 ! with only 3 trees !


    The example project can be found here : http://paradoxforge.com/temp/SpeedTreeBatching.zip (16mb, it was over the 4mb limit of the forum)

    Any idea's how to get these drawcalls to a reasonable amount per tree ?

    Unity 5.4.2f2
     
    Last edited: Nov 22, 2016
  2. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    Welcome to SpeedTree!
    Seriously though there seems to be endless problems with SpeedTree.
    some of those drawcalls could be do to you having shadows turned on?
     
  3. Riaan-Walters

    Riaan-Walters

    Joined:
    Apr 11, 2014
    Posts:
    36
    Of course turning off shadows reduces draw calls.

    Then it only has 5 drawcalls per tree, which is still ridiculous

    Are there any actual fixes for this behavior when it comes to speedtree?

    (This is also why i supplied a example scene)
     
  4. teutonicus

    teutonicus

    Joined:
    Jul 4, 2012
    Posts:
    70
    I just quickly loaded your example project in 5.5.0f1, duped your LOD0 tree until there were 100 instances all in camera frustum - 66 batches, 1250 saved by batching. Testing with SpeedTree objects gave similar results, the numbers being slightly higher depending on how many LOD levels are visible. So try the beta release candidate or wait a week or two until they get 5.5 out :)
     
  5. Riaan-Walters

    Riaan-Walters

    Joined:
    Apr 11, 2014
    Posts:
    36
    teutonicus i love you long time.

    After duplicating the objects myself, thousands of times... I only had 600 or so batches with over 24,000 batches saved!

    Problem solved, Unity Team, keep up the good work!
     
    teutonicus likes this.