Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by MasterJocWiil · Aug 20, 2021 at 02:48 AM · optimizationlow poly

How to optimize a low poly forest planet with 500+ trees?

I am making my first game with small low poly planets that have some nature on them that is scaled up to be seen from about 10 units away. I have Grass planets with a few (about 25 - 40) trees. Desert planets with a few (also about 25 - 40) cacti. I just placed 108 trees on my Forest planet and they only cover 1/4 of the planet. Most of the trees are tall low poly pine trees (100) with a few oak trees (8) to mix it up a little. The Pine tree has 74 total polygons and the oaks have 220 polygons.

So my question is this: Is just placing 100 - 500 tree objects the most optimized method or is there another way?

I don't care for dev speed improvements just runtime lag prevention. As I want about 500 trees per forest planet and about 5 - 20 forest planets. And 74 x 500 is 37,000 polygons for just the trees alone on one planet and 37,000 x 20 is 740,000 polygons pre galaxy.

New info: The game will spawn in 30 to 100 planets to form a map. Some of the spawn planets will be the densely packed forest planets that are the optimization issue of this question.

Thank you in advance.

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Acdia · Aug 20, 2021 at 06:51 AM 1
Share

First easy improve would be to enable GPUInstancing on the used Material. Some slightly more complicated optimisation is LevelOfDetail. It simply swaps the mesh with an even lower poly mesh if its far away. docs.unity3d.com/Manual/LevelOfDetail.html

avatar image jinoh · Aug 20, 2021 at 10:32 AM 0
Share

should you show player 20 planet and every trees on planet at once?

avatar image MasterJocWiil jinoh · Aug 20, 2021 at 08:56 PM 0
Share

No, not all 20 forest planets with 500+ trees will be seen at once, but based on how the player moves the camera a few (0 - 6) will be seen. All I really want is a tree-optimized low poly Kashyyyk-like planet that can be randomly spawned in to make a map.

avatar image jinoh MasterJocWiil · Aug 22, 2021 at 02:54 PM 0
Share

only if 0~6 trees are seen in camera at once, you don't need to worry about performance because unity will not draw trees which is outside of camera view but if you still concerning performance lod(level of detail) system is one possible optimization as other people mentioned

3 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by ster1203 · Aug 20, 2021 at 09:38 PM

One way to optimize for this is LODS, Here is the documentation from unity

You will basically have 3 models in one game object, the first model would be (for example) your oak tree with 220 polygons. The second model within that will have for example 80 polygons and the third with have 20. Depending on the distance the camera will be able to transition between them freeing up rendering memory and reducing load on the gpu.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by Pangamini · Aug 24, 2021 at 10:48 PM

You could create a single mesh that contains all trees from some region, low-poly, and use that as a shared low LOD. Tree chunks close to the camera would render as individual objects, applying standard LOD per tree. Tree chunks far away from the camera would be rendered as a single mesh. Depending on your implementation, you could have hundreds of thousands of trees. But one drawback is that there's no out of the box solution in Unity.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by joan_stark · Aug 24, 2021 at 07:17 PM

As @ster1203 said, LOD's is a good option. Also, i recommend you look for Occlusion culling and Frustum Culling

Occlusion culling makes things stop rendering if are behind other objects, so if you don't see a tree because it's behind another tree, it will stop rendering.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

133 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

3D Meshes: how to minimize error during reduction of order? 0 Answers

Cheap options for making diffuse-lit objects "interesting" 1 Answer

Sharing materials in unity 1 Answer

Is it possible to not allow unity optimise my code? 1 Answer

A question of optimization: use a script with variables or use the object name? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges