Search Unity

Shadow performance in dense forests

Discussion in 'General Graphics' started by VictorKs, Oct 5, 2018.

  1. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    146
    I'm developing an RTS with a free Movement Camera Controller so prolem is that when I zoom in a dense forest FPS drops to 40 because of shadows.

    My setup: 1 realtime directional light, No baked or precomputed light. Trees are speedtree but Instanced, so the problem is the shadow casters and the high number of triangles due to shadows.

    Would a shadow baking solution increase performance(I have no practical experience in GI and Baking)?
    Or is there a way to compromise shadow quality for performance I'm not after the perfect shadow
     
  2. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    635
    What if you have lower poly trees that are batched together in groups and set to cast shadows only?
     
  3. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    499
    Baking would perform much better, but would look worse, especially if you have characters or other dynamic objects under the trees. In that case you wouldn't get the look of individual leaves and branches moving and casting shadows. Baked tree shadows just look awful.

    Did you profile to see what's going on? How many draw calls do you have? Speedtree models are notorious for not being very .. speedy.
     
unityunity