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

[Partly Resolved] FPS drop on terrain geometry with sharp edges

Discussion in 'General Graphics' started by OneManBandGames, May 22, 2016.

  1. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    I'm currently building a prototype for a game that utilizes an isometric perspective. I want the gameworld to be rather large, so I seperated the world across multiple unity scenes which are loaded in and out according to the players position:

    setup.PNG

    The settings for the terrain tiles are as follows:

    TerrainSettings.PNG

    This works fine so far, but when I add in the actual terrain geometry, my FPS drops from around 600 (for an empty scene) to 150.

    FPSwithoutcliffs.PNG

    FPSwithcliffs.PNG

    Profiler screenshot:

    ProfilerWithCliffs.PNG

    Is this drop in FPS normal when you add / modify the terrain geometry, or did I create a huge performance bottleneck with this setup? Is there a better approach for rendering a "cliffy terrain with different height levels"?

    150 fps would still be sufficient for the final game, but that is for an empty scene and I fear this will run me into problems once I add in terrain objects, enemies, AI, actual graphics, etc. etc.

    Problem exists in the build version as well.

    Thanks for reading & any potential advice!
     
  2. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    Update: I have experimented a bit more. I used the Gaia terrain creation asset from the asset store to generate "natural" looking terrain from heightmap data onto the tiles. Here the fps drops to around 300 in the same setup. I found this thread that mentions different performance for different terrain geometry, although it is from 2011 and focuses on occlusion culling:

    http://forum.unity3d.com/threads/terrain-culling-performance-canyons-vs-rolling-hills.110220/

    I have not yet added / baked occlusion culling for this terrain because I assumed it would not do much solely for the terrain itself, but maybe I'm wrong. I will give it a try next before resorting to working with smaller terrain tiles.
     
  3. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    Another update: I crossposted about this issue in the official Gaia forum thread, since this issue is terrain related. From the tips I got over there we were able to identify that the edgy, sharp terrain style seems to be the problem. As soon as I start to smooth out the terrain, the framerate improves drastically:

    smooth.PNG

    I think I need to rethink my approach to render this kind of terrain, maybe meshes for the cliffs while keeping a smooth terrain are a better approach.

    Changed the title of the thread to better describe the problem.