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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

What is the best way to have many objects (trees, etc)

Discussion in 'General Graphics' started by delinx32, Apr 15, 2015.

  1. delinx32

    delinx32

    Joined:
    Apr 20, 2012
    Posts:
    417
    If i want to put 5000 trees on my terrain mesh what would be the best approach?

    Combine them all into a single mesh and ignore occlusion/lod capabilities?

    Make 5000 game objects? I've experimented with making many game objects and the performance was sub-optimal so I don't really think this is a great approach.

    How does the unity terrain handle trees?

    Is there a way to do instancing without a game object for each instance? Like multiple meshes on the same game object?
     
  2. dualcarbon

    dualcarbon

    Joined:
    Jan 7, 2014
    Posts:
    30
    Combining them into one object is not a good option, then Unity will be calculating the entire object regardless if the camera only sees a tiny part.

    on the other hand, if you have a lot of objects then it might strain the performance especially with real-time lights and shadows.