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 mark24 · Aug 15, 2012 at 04:31 PM · terrainmemorytreefatal error

Can I have 500,000+ trees?

My game lets the user run a simulation of environment over many years. The problem is that the environmental model will sometimes generate a year will 500,000+ trees, sometimes almost 1,000,000! While you can still click on the trees, I am not using colliders (which would cap me at ~65,000). When I try and render a environmental model, I am getting the following error: "Fatal Error - Out of Memory". It works during years with <~500,000 trees.

My guess is that Unity is just unhappy with the amount of rendering that is being requested. Is this correct? Also, are trees being rendered even if they are not in the camera's line of site (hidden by terrain or behind camera). Is there someway to further optimize the billboarding of trees in the far distance? I was thinking maybe there is some way to dynamically apply a different texture to the most distant terrain instead of drawing the trees? I would like to preserve the visual effect I have in the below picture (that is about 200,000 trees in terrian). alt text

quabbinview.jpg (419.3 kB)
Comment
Add comment
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

3 Replies

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

Answer by Screenhog · Aug 15, 2012 at 04:37 PM

Yes, 500,000 trees is too many.

Can you actually visit those far-away areas? Or do you just like the effect of having that many trees, without the need to actually go there?

If you don't need to go there, then there are many possible ways to cheat it. If you do need to go there... well, it still can be cheated, but you have to be more creative about it.

Comment
Add comment · Show 2 · 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 mark24 · Aug 15, 2012 at 04:44 PM 0
Share

Unfortunately, client is still requesting to be able to travel to all those areas. It is a 4sq km model of the Quabbin Reservoir in $$anonymous$$assachusetts http://goo.gl/maps/98uot . Any ideas about how to be more creative? :)

avatar image Screenhog · Aug 15, 2012 at 04:52 PM 0
Share

Ah, O$$anonymous$$... geographical accuracy is required.

Well, many games with large open worlds will divide a scene into multiple levels that are loaded as needed. LoadLevelAdditive (http://docs.unity3d.com/Documentation/ScriptReference/Application.LoadLevelAdditive.html) and LoadLevelAdditiveAsync are created for this purpose.

Some games, like the 3D Zeldas, will do this by having levels divided by some kind of corridor... the only purpose of the corridor is to give the game enough time to load what's on the other side of it.

In an open environment like yours, this may be more difficult. However, you might be able to have low polygon versions of entire islands in the background that convert to high polygon versions when you get closer. I don't know how well that will work with the terrain system, though.

avatar image
1

Answer by Nabeel Saleem · Dec 02, 2013 at 07:32 PM

do occlusion culling.

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 fabmagic · Aug 16, 2012 at 04:08 AM

You can do it with lod level of detail You can have 3 kind of same tree low medium and high res The closer to the cam they switch by themselves Also with occlusion culling Also have just planes with picture of tree billboard technique Just some suggestions Cheers

Comment
Add comment · Show 1 · 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 Screenhog · Aug 16, 2012 at 05:59 AM 0
Share

I'm not sure you realize the scale of this. He's already using the terrain system, which makes billboards of far away trees, but when you have 500,000 trees, that's a million polygons even if each tree is a 2 triangle plane. That can be a lot to deal with.

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

11 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

Related Questions

Trees - Lightning bug 1 Answer

Trees not lighting properly 0 Answers

Dynamic Lightmaps? 1 Answer

Max mesh trees for terrain does not work. 1 Answer

Tree batching inside of terrain 0 Answers


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