Search Unity

Trees, bushes and all that green stuff

Discussion in 'Game Design' started by Mehd, Dec 14, 2017.

  1. Mehd

    Mehd

    Joined:
    Apr 29, 2016
    Posts:
    91
    Hello,

    As indicates the title, I've been wondering how to manage trees, bushes... Is a 700 hundred faces tree + 2k faces for the leaves costly ? How much is it possible to add in a scene before running into a performance problem ?
    More generally, I always wanted to figure out whether having lots of objects in the scene makes it heavy, even though these objets are inanimated.

    Any tips, recipe, resources, ideas, papers ?

    Thanks a lot !
     
  2. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Vegetation Studios. It works perfectly for managing a lot of trees and vegetation while optimizing for performance. I highly recommend. You can find it on the asset store.
     
    JoeStrout likes this.
  3. Mehd

    Mehd

    Joined:
    Apr 29, 2016
    Posts:
    91
    Thanks for your answer, but I was thinking more something like some sort of rule of thumb. How many faces or vertices can you add in a scene before it starts getting laggy ?
    I have a mid-specs laptop: i7 3.5Ghz, 8Go of RAM, GTX 850m
     
  4. verybinary

    verybinary

    Joined:
    Sep 23, 2015
    Posts:
    373
    120 verts
    That's a joke. There isn't any real rule of thumb. Build a project that will run on your target device. That's the closest anyone can get to a number.
     
  5. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    Low end mobile can mean all trees, bushes and such would need to be 2d billboards facing the camera.

    High end pc can mean high poly with nice textures and bump maps an whatnot.

    It all depends where your targeting really.
     
  6. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Oops, misread.

    We had an i7 laptop, GTX 850 and it struggled with my heavy scenes. Scenes with trees, not too many, but enough, made with my old 970 GTX desktop did not run well on the GTX 850. This is before Vegetation Studio.

    So, the question really is how many trees will you have in the scene? I am pretty sure my trees are probably higher in polys/tris than the number you mention.

    What sort of density do you want for the trees? Are you placing a few trees around a scene or are you making a forest? How large is the terrain? What is your viewing distance before the trees turn to billboards...or are you not using billboards?

    What about grass? Are you looking for thick lush grass, or a few billboard patches here and there?

    What is your fps goal? 30 fps or 60 fps?

    Are you putting a lot of other objects in the scene?

    In my experience, grass destroys my fps the most, billboard grass too. So if you are sparse on grass, that would help. I use Speedtrees with a decent density, not covering the entire terrain but in patches. I do remove all colliders but the trunk and mess with the prefabs to get them to be be a bit more optimized. I turn off wind in the background and use billboards. My fps tends to be okay, even on the 970 GTX computer.

    But...really cannot play it on the editor in the 850 GTX. You may have better luck. Like folks above said, it really depends on so much that you must test it and see what you get. Even the same two graphics cards can have different results because really, the way we make our scenes can be extremely different.
     
  7. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I think a more helpful question would be: "Exactly how do I want my game to look." And then, "What is the best I can do to meet that goal on my targeted platform."
     
    Martin_H and TonyLi like this.
  8. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    One thing I did, was:
    Look at the Forest stage, in Dead or Alive 3, DOA 4 or DOA 5.
    And that helped me understand, how Tecmo was able to pull off a forest stage
    filled with trees and leaves.

    The same thing with Metroid Prime 1, on the nintendo gamecube.
    Check out the rainy Tallon Overworld stage.
    It's amazing, how in both games, DOA and Metroid, they were able to make, large forested stages, on such low powered gaming hardware.

    The branches with leaves, seem to be, a large flat rectangle plane
    with a leaves alpha texture, placed onto it.
    Some of these rectangle planes, were then bent, or arched in half, like an upside down V shaped roof. Or, like a U arc like shape. Or an upside down U arc shape.
    Then, the branch was duplicated many times and placed all over the stage/scene.
    Creating a large forest stage/scene to fight in.

    After 15 years, gamers still find these stages, to be graphical wonders. :D
     
    Last edited: Jan 1, 2018