Search Unity

Reducing lag for large terrains

Discussion in 'World Building' started by LeadAirBalloonGames, Mar 9, 2021.

  1. LeadAirBalloonGames

    LeadAirBalloonGames

    Joined:
    Jun 4, 2014
    Posts:
    6
    I started a new project recently and I'm using unity's terrain tool and adding more planes to make it larger. I went from having 400fps at 5 planes to 80fps at around 40 or so planes. Is there a way to recude this lag? Or do I just have to hope that when I add lod's for all my game objects that it'll fix it?
     

    Attached Files:

  2. wyattt_

    wyattt_

    Unity Technologies

    Joined:
    May 9, 2018
    Posts:
    424
    You can try enabling instancing on all the Terrain objects. The toggle for this is called "Draw Instanced" in the Settings tab for each Terrain: df97f7cded57adf701ea2eef36a77450.png

    Set it to true and you should get some performance back if it isn't already enabled
     
  3. LeadAirBalloonGames

    LeadAirBalloonGames

    Joined:
    Jun 4, 2014
    Posts:
    6
    I read that somewhere after posting and actually suffered a 20fps loss weirdly enough. Doing lod's for the smaller houses in the scene gave me a 20fps boost, but that's not enough considering I need the terrain to be about 4x this size. If you have any more advice I'd love to hear it! But regardless thank you so much for taking the time out of your day to help, I genuinely appreciate it!!!
     
  4. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,742
    Dont forget about Occlusion Culling...and be careful with LODS, not every object will benefit from LODS. Are you using Static Batching on textures?, How about MipMap support?

    This comes down to optimization...