Search Unity

Why does this happen with foliage and how do you fix it.

Discussion in 'Editor & General Support' started by DivergenceOnline, Jun 6, 2015.

  1. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    It's been happening since the very beginning, but seeing as we didn't start using unity's internal foliage system until recently, it never mattered. Now, it does matter, and I can't figure out what's causing it.

    It's almost as if there is a maximum amount of foliage items the system is willing to show and when you go above that somehow, it starts hiding (not deleting) other ones. This isn't even a crazy amount of foliage so I'm just stumped and need to figure out how to fix it asap.

    Thanks in advance.


    Unity 4.6 Pro. All versions from April 2013 to current have the same result. All textures. All terrain settings. Nothing makes a difference.
     
  2. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    Terrain has a setting "detail density".
    Have you tried changing it? I have never seen that behavior...
     
  3. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    I've tried changing that, as with all values, up and down many times with no visible affect. At any rate, this looks like something buggy.
     
  4. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    Can you export a demoscene?
     
  5. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Since the game is over 7gb in size, that isn't possible. Even then, this is in-editor it has nothing to do with the game, it has to do with either how unity handles terrain, or it's own detail maps, or something like that.
     
  6. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    Just export a new scene with a terrain and one or two grass types with the problem, that should not be more than 60mb. I never had those problems and I normally use 9 terrains at once any time.

    Are you using a special terrain tool? Your tool thingy is a blue sphere, I never had that either.
     
  7. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Then I don't know what editor you're using, because those are the standard Unity tools.
     
  8. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    I am using just the standard editor Tools and I only have a blue circle, not the transparent sphere you have in your video. Neither in my projects nor in a new one, Unity 4.6 and 5
     
  9. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    If you're talking about the blue circle around the character, that's the sky-dome that contains the main camera. It doesn't have anything to do with anything other that projecting a sky in the background of the main camera.
     
  10. yuanxing_cai

    yuanxing_cai

    Unity Technologies

    Joined:
    Sep 26, 2014
    Posts:
    335
    Hi,

    While I don't have your repro scene and can't be 100% sure, I'm almost certain the cause for this effect is that the combined number of vertices in a single grass patch has reached the limit we set. This is done to confine the patch in a single Unity mesh, which uses 16-bit indices and has a hard vertex number limit of 65K. While we can't break that limit, in 5.2 you will see a warning message in the Console window when this happens, so people don't have to guess anymore.

    To workaround this issue, you can try decreasing detail density or detail resolution per patch:
    Capture.JPG
     
    vamosfa, heynewt and msmoyle like this.
  11. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    That was it. Thanks for your help man!
     
  12. heynewt

    heynewt

    Joined:
    Jul 30, 2017
    Posts:
    13
    Thanks! This solved my issue.
     
  13. Jwizzy

    Jwizzy

    Joined:
    Sep 15, 2019
    Posts:
    1
    How do I change the terain density in unity