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 Detail resolution patch size problem / bug?

Discussion in 'Editor & General Support' started by JDMulti, Dec 14, 2012.

  1. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    I'm working on a project where I have to make a landscape op 6 by 4km in size with heightmap data, detail with grass and flowers and lot of trees. The resolution of this terrain is set that I can archieve 0.5m detail in the landscape for small rivers and such that are really there.

    However, the amount of drawcalls has been increased to 1500 for several reasons which I try to reduce. One of this settings I can tweak to reduce the amount of drawcalls is the: Detail resolution patch size.

    I changed it from 8 to 32, and it works fine. I can paint details everywhere and see it appear correctly. However when I change it to 64, It would be logical that the patch size increases and I should not see a huge difference in appearance of the terrain details, else then it would load details in bigger buckets. However, I noticed something weird of which I can't find a logical solution or work around.

    As images tell more then a long story:

    Detail resolution patch size 32


    Detail resolution patch size 64


    As you can see, when I have patch size set to 64, some details won't even show, while there are terrain details painted on that place. When I change to size 32, it does appear.
    In my oppinion, no matter what size I choose, those patches should always form a nice connected grid. But in this cause, it doesn't. When I choose patch size 128, it's even worse, I have complete gaps in my terrain details, like there are complete patches missing in a grid :O

    I hope someone could help me fix this problem somehow or find something I've done wrong. I've been googling around and not find anyone with the same problem I'm using Unity 4.0 Pro
     
    afshin_a_1 likes this.
  2. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    No one has any idea what's happening here? I tried about everything, changing detail resolution map and such, but I'm clueless. Or shouldn't I touch the patch size of terrain detail?
     
  3. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    I've searched a bit more on the internet and tried to ask on few other places, but I can't seem to fix this problem. I hoped someone could help me out with this, maybe I'm doing something wrong, but I'm clueless.
     
  4. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    While strugling for a couple of hours / days with this problem and even asking people in reallife with experience of Unity. There seams to be no one who could help me out with this strange issue.

    I recon this is a bug in the terrain system, or a maximum amount of details to be painted on a single terrain?

    I also saw that when I continue painting details on the terrain, that randomly lines of details are erased from my terrain. When I set my patch size back to 16, those lines disappear and details are shown again.
    It isn't a limitation of my pc, since my co-workers have this same issue. We are working with machine having 8 cores multi threaded, 32gm of ram and one of the best graphics cards at the market. It's a real pain in the butt, since we have to paint 24 terrains while working around this issue.

    Maybe someone from the Unity team could comment what's happening here. Or am I the first person creating a realtime enviroment with 24 terrains of size 2048 and seeing this happening?

    Thanks in advance for someone solving this.
     
  5. Darkhazard

    Darkhazard

    Joined:
    Oct 4, 2010
    Posts:
    105
    What is your detail resolution set at?
     
  6. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Not sure if what you are seeing is what I have seen in the past. I've been painting grass/details...and suddenly, it "removes" them from other areas. It's almost like Unity has a limit on the number of details it will show. You would think it would enforce this by only showing the closer ones, but instead it just shows weird gaps.

    The weird thing is...I haven't seen this with procedural placed stuff, only when painting by hand.
    I'm using 3.6 by the way.
     
    Last edited: Dec 19, 2012
  7. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    By detail resolution is set to 1024. Here a screenshot of the settings I have on my terrain.



    It does indeed remove detail when I continue painting. However if I set the terrain patch size from 32 to 16, it doesn't remove detail. It seams it isn't a max detail amount or something. Because with path 16 it has smaller patches but does show more detail. While patch size 32 is bigger patches and shows less detail and even removes it at certain places.

    What I could think of is that when you have smaller patches, it loads in memory more patches with each smaller amount of details. While big patches have more detail per patch. So it could somehow hit the maximum shown. However I would think that when I choose bigger patches, it never should show patches without detail on them because a limit has reached. At least nog patches you're standing on or are close to the camera.

    To fix it, I could just set back the patch size to 16. But on a terrain this big, it would add about 200 / 300 drawcalls, while no extra new textures are shown, just same grass, same terrain and same textures but smaller patch size.
     
  8. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    Afther a long periode of testing and finding a fix for this issue, I gave up. I've asked it to some reallife persons close to me what could cause this patch size increase to remove details from my terrain in edit and game mode. The only explanation I have is that there is a maximum reached of the amount of details withing a patch.

    However I would at least aspect that when dealing with an AAA engine as Unity does it's promotion, it wouldn't show these details being removed this hard edged in view but soft on the background. I was forced to lower the patch size on the terrain and increase my drawcalls by about a few hunderd, where I would have hoped to decrease it.

    Another issue I ran into, is that with 24 terrains with these settings, Unity builds a web version, but it will instantly crash on loading in the webbrowser on all machines I tested on. Decreasing a few terrains there resolution fixed this issue. I recon I hit the maximum terrain load for Unity in this project.

    But to get some feedback, I would ask some advice of experienced Unity users. How would you create a terrain of 6 by 4km big, with a terrain resolution to archive detail on the mesh of 0.5m, full of grass and trees? I can't procedural sculpt the terrain, since it's an existing terrain I need to recreate.
    It's a huge load for the machine rendering this realtime, +- 2500 drawcalls in birdflight. I can't lightbake, since Unity will create a temp file of over 4gb and crashes. When trying to reopen the project, it hangs forever until I manually delete the beast lightmap directory inside the project.
     
  9. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,704
    Hello,

    painted 24 Terrains by hand? You must have spend hours and hours. I recommend you to use TerrainComposer, will take all the workload away as it will do it for you with a few clicks.

    www.terraincomposer.com

    Unity terrain with lots of grass and multi terrain, you have to be carefull as it's eating memory and makes Unity instable. Unity uses memory very insufficient when it comes to terrain. I know about the issue, and there seems te be indeed a max that can be rendered per patch. The way to resolve this is to set a lower grass density when setting the patch per detail higher.
     
  10. Aidenharker

    Aidenharker

    Joined:
    Mar 31, 2014
    Posts:
    2
    i am getting same error here exactly!
     
  11. afshin_a_1

    afshin_a_1

    Joined:
    Apr 26, 2015
    Posts:
    48
    i have exactly the same issue with terrain using unity 2018.4
    width = 600
    length = 1000
    detail resolution per patch = 64
    detail resolution = 256
    changing detail resolution per patch will cause removing some details while painting. hope they fix it in unity 2019 or at least somehow show us a better tips or something.
     
  12. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    77
    I know this is a super old thread, but I accidentally changed my terrains detail per patch to be the same as my detail resolution (lol) and now even changing it back to how I had it it won't paint correctly. Completely unfixable as far as I can tell. It's nuts.
     
  13. mat108

    mat108

    Joined:
    Aug 24, 2018
    Posts:
    126
    Still an issue. Unity is truly amazing. 8 years later. Un effing believable.
     
    Joshdbb likes this.
  14. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    192
    Hi, 3 years later : Solution is simple : Resolution Per Patch must be >= 8:
     
  15. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,739
    No.
    I think you misunderstood the issue. In fact, the resolution per patch cannot be lower than 8, that was not even an issue.

    This is not solved in 2023. I guess is another one of those things that we will forever see as a bug.
     
    deXter_969 and UnityGISTech like this.