Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Shadow performance in dense forests

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

  1. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    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:
    639
    What if you have lower poly trees that are batched together in groups and set to cast shadows only?
     
    VictorKs likes this.
  3. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    699
    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.
     
    VictorKs likes this.
  4. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    Necroposting but yeah I resolved this with shadow proxy meshes I was GPU bound because of too many vertices (and having a low-end GPU :D)