Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Terrain optimization similar to Valley Benchmark?

Discussion in 'World Building' started by NIKIF0R, Jun 18, 2020.

  1. NIKIF0R

    NIKIF0R

    Joined:
    Sep 27, 2015
    Posts:
    6
  2. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    390
  3. crysicle

    crysicle

    Joined:
    Oct 24, 2018
    Posts:
    95
    Unity is using a chunked quadtree LOD algorithm which doesn't use tessellation for transitioning between different LOD levels. The LOD of a terrain node inside the tree is based on the node's height, distance from the camera and the neighbouring node's current LOD level. I'm not sure if it takes into consideration additional parameters such as camera's FOV. It has an additional parameter "PixelError" which allows to degrade the level of detail for performance.

    From what's happening in the video, it looks like it's also using a chunked quadtree without tessellation, but the algorithm is a bit different. First, it's calculating LOD for tiles based on distance. It doesn't take into consideration the height of each tile, because of this, there's a lot of poppin when transitioning between the LOD levels.
    Second, the fix for removing gaps between a tile neighbouring lower/higher LOD tiles is different. It uses a different mesh pattern than to what Unity is doing. Whether this is better or worse than what Unity is doing I can't tell. Nevertheless, a minor deviation.

    To answer your question, yes, Unity does have it. You can see the algorythm in motion by creating a terrain, creating some height distortion on the heightmap and going into wireframe view.
     
    NIKIF0R likes this.