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

Why after adding grass with LOD causes drop fps?

Discussion in 'High Definition Render Pipeline' started by KrYlu, Apr 29, 2021.

  1. KrYlu

    KrYlu

    Joined:
    Sep 28, 2015
    Posts:
    12
  2. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    I can't really say if Unity is to blame for bad performance or just your machine can't handle this, you could try something like nature render from asset store and also, you should have FPS counter present in the video as both the scenario looks pretty slow in the recording
     
  3. KrYlu

    KrYlu

    Joined:
    Sep 28, 2015
    Posts:
    12
    I have gtx 1060/16gb/ryzen 5 1600
    Mean as the grass becomes invisible(culled) the fps continue to fall.
    Even if you look in the other direction and can't see the grass, the fps goes down,
    changing the distance of trees and grass in the terrain does not help either.
     
  4. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,728
    Are you sure its the grass causing this? Start narrowing it down by shutting off or removing things till you find the root cause...
     
  5. KrYlu

    KrYlu

    Joined:
    Sep 28, 2015
    Posts:
    12
    Yes, I am convinced that it is grass because there is a problem after adding grass.
    I mean as the grass becomes invisible(culled) the fps continue to fall
    if i add grass as prefab, fps is good.Only i add grass to terrain tools causes drop fps.
     
  6. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,728
    You can also use a grass prefab, and use it with the tree painter.. Prefabs are usually the best to use.
     
  7. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    I really don't think so, we have terrain detail support for a reason, it's much more performant than thousands of prefabs placed in the scene
     
    warthos3399 likes this.
  8. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    648
    What version of Unity?

    I know a while back in HDRP there was a bug that caused trees to still increase batch calls or something even when off screen. I honestly don't remember what it was, but I was asking around about it until I discovered it was a known bug and Unity fixed it. I knew something was weird when looking at the sky, I still had whatever the stats were as when I was looking at my vegetation.

    So no idea, but yeah ... there could very well be a bug. I've hit stuff like that before myself.
     
  9. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    We would be able to give actual useful info if you showed us the profiler and showed us what's consuming time. Should be easy to see what's causing the FPS hit rather then guessing and questioning, or at least get a clue.
     
  10. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I did a bunch of tests with built-in RP, and objects look better and perform next to as good or better with a few tricks.
    If you combine the gameobjects using a cell system (with LOD) and combine shadow casts, it reduces draw calls by a *ton*. The performance boost is crazy.

    PS: if you're not using the alpha version, the next unity update will bring grass mesh detail support to HDRP.
     
    Last edited: May 6, 2021
  11. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Lod is for hero assets. Grass will typically use something custom made for the purpose. It is very normal to have a massive slowdown if you treat grass like a tree or other asset designed for lods but low amounts on screen.

    You need to go custom for grass.