Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Frustum Culling is not working properly with terrain details and trees

Discussion in 'General Graphics' started by ahmethamdi487, Sep 10, 2023.

  1. ahmethamdi487

    ahmethamdi487

    Joined:
    Dec 10, 2021
    Posts:
    7
    I was trying to optimize my grass for a long time and I was not worried about frustum culling because was thinking unity does it already, untill I rotated my camera to the sky and saw that a million verts were still being rendered...
    upload_2023-9-10_22-3-22.png

    I am not using weird detail settings. everything is default. GPU instancing and Occlusion culling are enabled, working properly.
     

    Attached Files:

    iDerp69 likes this.
  2. iDerp69

    iDerp69

    Joined:
    Oct 27, 2018
    Posts:
    49
    I also am observing no obvious signs of frustum culling on Unity Terrains in 2022.3 using HDRP. I turn off a bunch of terrains (just the component, leaving collider enabled) that are not in frustum and my performance skyrockets.
     
  3. tw00275

    tw00275

    Joined:
    Oct 19, 2018
    Posts:
    65
    @iDerp69
    I posted my terrain details settings in another thread, so please try these and let me know if it helps:
    https://forum.unity.com/threads/extreme-lag-with-grass.1514063/#post-9458867

    When I look straight down:
    Batches: 85, Verts: 31.3k, 3.7ms

    Straight forward:
    Batches: 192, Verts: 883.2k, 4.1ms

    Straight up:
    Batches: 52, Verts: 6.2k, 3.8ms

    I'm using URP instead of HDRP, but as long as you have your terrain and terrain details set up to use "Instance Count Mode" then it shouldn't draw more terrain details than necessary.