Search Unity

Too much grass? Assertion failed on expression: 'triangleCount == totalTriangleCount'

Discussion in 'World Building' started by protopop, Feb 2, 2020.

  1. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,560
    I notice if I have grass too dense I get this error message

    Assertion failed on expression: 'triangleCount == totalTriangleCount'

    And also in my mobile build some grass types don't show up.

    Ive decreased the detail amount but id like to find out what this message means.

    Does it mean Unity is creating some kind of mesh batch out of grass patches, and there is some kind of vertex limit?
     
  2. betaFlux

    betaFlux

    Joined:
    Jan 7, 2013
    Posts:
    112
    Anyone?
     
  3. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,560
    I didn't find out details but basically it means too much grass generated. I reduced the density of the grass and also the details per patch amount and the error goes away
     
  4. betaFlux

    betaFlux

    Joined:
    Jan 7, 2013
    Posts:
    112
    @protopop Thanks for the tip. I also played around with these values but I end up with very few details until the error goes away. I'm using a 2000x2000 terrain and the only way to have dense grass and keep the vertex count low enough is to reduce the Detail Distance.
     
  5. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,560
    Yeah grass distance and detail is the main thing that causes apps to crash - it's very intense. You could also try using 4 500 size terrains instead - the size of the detail map has a big effect on how dense you can get the grass safely and on smaller terrains it can be denser, but I'm not sure if the exact inter relationships here -