Search Unity

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

Feature Request Unity Terrain is still poorly optimized in 2023

Discussion in 'World Building' started by Patrickmol, Jun 30, 2023.

  1. Patrickmol

    Patrickmol

    Joined:
    Nov 12, 2020
    Posts:
    8
    A lot of years have passed and Unity has improved a lot, from render pipelines to lighting, even the ECS and DOTS systems have been added, the Unity team is working really good.
    Have you ever tried to build a game using Unity’s terrain though?
    It is the worse experience ever, the tools are pretty nice, the landscapes you can create awesome, but when we talk about performance, expecially on mobile devices it’s really sad, even if you:
    -Enable Draw Instanced
    -Increase Pixel Error
    -Reduce Base Map Distance (pointless)
    -Disable Terrain Details
    -Disable Realtime Shadows
    All of your attempts are getting crush by the way the terrain is rendering, it should be edited because it’s really bad and it cuts a lot of the features that the egine could provide for mobile developers.
     
    Last edited: Jan 7, 2024
  2. WST

    WST

    Joined:
    Oct 17, 2015
    Posts:
    2
    I understand you perfectly. But I want to add a "small and insignificant" part. Unfortunately the work with terrane remained at the level of Unity version 5. Yes, they added a tool to work with splat map, and layers. The realization of these moments looks like a crutch. For example, if we take URP, then in layers we can insert 4(?) materials that can be at least somehow customized. But if we take HDRP, there is nothing but pain and frustration. Layers, yes. Quantity - as many as you want. Materials into layers - no. Take and insert/change them by hand. At the same time catching errors in the fallen off materials (how they fall off and why the console writes that the material is deleted, God only knows). Everyone advises to use an asset, but I'm tired of fixing errors when changing the version of Unity and think - and whether there will be a conflict, and whether the asset uses another asset on which it is based. In general, the problem with uniti terrane is that there is no terrane and its tools. There is an illusion. In my work, I quite often need a high quality landscape and unfortunately unity is very far behind the unreal engine.
     
  3. Patrickmol

    Patrickmol

    Joined:
    Nov 12, 2020
    Posts:
    8
    Hello WST, are you talking about Micro Splat right?
    I will try to profile the performance with and without it, in order to see if something changes...
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,843
    Yeah it sucks. Luckily there are terrain to mesh tools on github which are good
     
  5. WST

    WST

    Joined:
    Oct 17, 2015
    Posts:
    2
    Hi Patrickmol
    No, I don't mean microsplat. I try not to use other assets. I prefer to work with the tools provided by the engine itself. It eliminates most errors. At least you can study the documentation (yes, there is also documentation for assets, but it does not get rid of problems with code editing when switching to another version of the engine and does not guarantee stable work even in the current version of the engine). I sincerely don't understand why unity won't make universal shaders for different rendering engines. I watched a video about microsplat.... The solution is interesting, but rather cumbersome. Also, I understand that in some cases you have to write your own tools because of the specific approach to implementation. But the main tool of work, in my understanding, should be at least universal and not depend on other factors and certainly not cause a headache with the choice. I'll say it again. In the built-in terrane tool there are 2 types of material that depend on the render engine and works differently. Ideally though, neither I nor you should have to think about the terrane shader when selecting a project on URP or HDRP or any other options

    UPD
    Just downloaded the HDRP demo scene. To say it's horrible is an understatement. Of all the pluses you can name, it's the sun. It looks more or less attractive. The rest of it looks like plastic. The water's like plastic jelly. Textures of the earth as painted plastic and fake tessellation. And the vegetation... What can I say... It's an epic fail.
     

    Attached Files:

    Last edited: Oct 15, 2023
  6. stonstad

    stonstad

    Joined:
    Jan 19, 2018
    Posts:
    647
    Agreed. The performance of building a height map from input data needs to be optimized. Integration with native arrays and the jobs system is needed, as well as a faster method for syncing data back for physics.
     
    Shizola, Rukas90 and DevDunk like this.
  7. oen3

    oen3

    Joined:
    Aug 16, 2021
    Posts:
    13
    This doesnt help much, still need to go through the Terrain for this to be viable. Still limited to 4k res etc
     
  8. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,843
    You can export terrain in chunks, so the resolution can actually be good.
    It depends on your exact setup of course. I think Unity does not recommend using terrain if the size is under 100 x 100 or 1k x 1k units (not sure which one). Unity terrain is for many projects just too slow to use sadly
     
  9. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,011
    Unity's built in terrain system is not up to the task for building a real game. It is only adequate for building small, simple demos.

    If a developer wants to a build a modern game using Unity and HDRP, then the developer needs to build their own systems or use 3rd party assets. This is true for both rendering the materials on the terrain and rendering vegetation on the terrain.

    Game developers can make awesome looking games in Unity, but only in spite of the native Unity tools, not because of them.

    In 2023, why doesn't Unity have something like Microsplat built into the terrain system? And why not have something like Nature Renderer build into the terrain system? Why does Unity require every game developer to solve these things themselves instead of building solid solutions into the engine itself?

    Compare the terrain situation with Unity right now with UE5. The contrast has never been more stark, and Unity appears to have completely given up on this.
     
  10. Patrickmol

    Patrickmol

    Joined:
    Nov 12, 2020
    Posts:
    8
    Update:
    -I tried to use MicroSplat as rendering shader instead of the default Unity terrain's one
    -I carefully searched up for the best performance settings of the shader

    Did the framerate improve?
    No, it is still running really slow on my mid-end phone.

    I will try to bake the terrain into a mesh and see if that does improve the performance.

    Happy new year everyone!
     
    DevDunk likes this.
  11. stonstad

    stonstad

    Joined:
    Jan 19, 2018
    Posts:
    647
    Preach on, brother. I feel this pain.

    I had someone say to me, "I thought your game was built in Unreal Engine". I took it as a huge compliment.
     
    ShilohGames and DevDunk like this.
  12. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,244
  13. Patrickmol

    Patrickmol

    Joined:
    Nov 12, 2020
    Posts:
    8
  14. ssd

    ssd

    Joined:
    Jul 2, 2014
    Posts:
    5
  15. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,582
    Lol i just asked about a bug that has months xD it is hilarious because today i wanted to give unity one chance and:
    https://unity3d.atlassian.net/servicedesk/customer/portal/2/IN-54298

    https://forum.unity.com/threads/terrain-visualization-not-working.1487829/