It's me again, I want to use on sphere trees optimiaztion technlogies like in the Terrain class. I ve got some planets. So, I need to place grass and trees on them, but it's possible to paint them only on Terrain, that is always flat. I tried a lot of doing various things, but my methods are not so well optimized, and it does not look so good as on Terrain. How to recreate Terrain painting for spherical surface?
Why this question voted down? What's wrong? Maybe it's too difficult to answer, so I've never got here good answers to my questions, only emptyness or "minus". People angry of their incompetence, looks funny. Vote down your knowledge first, and then my questions.
If you're hoping for less minuses on your questions, that comment wasn't the way to do it.
Answer by Common_Horse
Jun 08, 2012 at 10:07 AM
Unfortunately, there is no way to instantiate trees so that they will automatically LOD like the ones in the terrain generator, however what you might be able to do is modify the "LOD Quality" of the tree so that it will lower when the camera gets further away.
Other than that, you may be able to find scripts that other have made, as this is a very frequent community request!
Hope this helps!
The problem is not in LOD. Trees can be even not rendered, they can even be just empty objects. FPS gets down to 2, if I place a lot of them. But if I do it on terrain using painting trees tool, I can place much more trees, and FPS stays high. I just want such tree optimization as in Terrain class.
The trees from the generator are instanced, which means they are in the memory only one time. If you place hundreds of individual objects (if they are actually "individual", in terms of geometry, is not the point, the point is if the engine considers them as individual) each one of them is allocated seperatly in the memory, which will eat up performance like there is no tomorrow. If you did instance your trees I would take a look @ the polycount and the size of your assigned textures as well as the used shaders. Other then that there is the LOD left to consider, as pointed out here. Especially the billboard function will help you to place huge masses of trees.
Answer by cwperkins83
Dec 07, 2012 at 10:13 PM
Perhaps you can create a few tree prefabs in a modelling program and then program them to instantiate in random places on the sphere mesh?
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users post good questions and use the site effectively we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
7 People are following this question.
Texture and Texture2D for GUI (simple question)
Prefab Instances all have separate Scales?
Distance Calculation vs OnTriggerStay
Transfered from Android to IOS. Why is the game play jerky now?
Performance issues with GetComponent/gameObject.Find in different functions