- Home /
How to show 3000+ Trees(generator) without getting Memory overflow (no terrain generator)
Hi to all Helper,
i try to render 2000 up to 5000 Trees generated with the Unity Tree Generator. All Trees are put as clone gameobject in the hierarchy list. One tree is about 350kb and rais the Memory up to 1,5xx Gb. Now i have to draw some stones.. grass... and many other objects.. Result is a memory overflow at 3GB ...
At the beginning i started with C# + Direct X ... i had one Tree and i could draw him endless times with different positions and i had only one tree in the memory...
How can i do something like this in Unity? It must be possible to have only one Gameobject which i draw on any positions... I doesnt use the Terrain generator because i have to place them on a Sphere.
Thanks for your help :)
using c# and direct X you were generating actual 3D trees? or it was 2D?
There are some techniques you can use to improve memory usage:
_ Render only the trees (or any objects) in a certain field of view (basic)
_ decrease pixel rate propotionally to the distance of the game objects
_ Use a clever sprite system and a dynamic 2D to 3D rendering process (https://www.youtube.com/watch?v=4Ghulpp6CPw)
$$anonymous$$h if anyone has other solutions I am also interested...
Your answer
Follow this Question
Related Questions
Extents of a Compound GameObject (C#) 2 Answers
Multiple Cars not working 1 Answer
Game object with animations 0 Answers
Mesh.CombineMeshes does not work when mergeSubMeshes=false 2 Answers