- Home /
How to make rendering quicker
So basically i have an environment with many (more than 1x10^23) objects and it takes forever to render..is there a way i can keep so many objects and make it render quickly? thanks
You need to subdivide your world into chunks which can be loaded and unloaded as you approach/leave them. If they all need to be on screen or active at once. You're basically screwed.
@khada good point - though of course if he split it into 1,000,000 chunks each one would contain 100,000,000,000,000,000 objects.
So I guess the question becomes: whydoit?
(badum tish) I'll be here all week, thanks.
Unity can't actually use anything beyond ~65$$anonymous$$ separate objects anyway, last I checked. Even then, it's very slow. Computers have limited CPU power, so once you get done with various optimizations, the only real answer is "use fewer objects". (Or invent CPUs with infinite processing abilities.)
As a thought, if you don't need these objects to move, start connecting meshes in your modeling program of choice. Unity would much rather render 10 objects with 100,000 triangles than 100,000 objects of 10 triangles.
Answer by whydoidoit · Sep 18, 2012 at 06:55 PM
:) That's a lot... Err no I would say. There are things like occlusion culling, LOD levels etc if you have Pro. Clipping planes on the camera. But no - not much will help with that many objects.
Answer by aldonaletto · Sep 19, 2012 at 01:10 AM
You definitely can't handle so many objects! If each object occupied a single byte, you would need about 10^14 gigabytes just to store them... but you couldn't see the objects anyway, since even a big 2560x2048 display has only about 5 mega pixels! You should handle only the objects you can see - maybe the 1000 objects nearest to the camera, or even less. Study the spatial distribution of the objects, and create only the necessary ones. If the objects may be destroyed and replaced by others, don't actually use Destroy and Instantiate: just set a "destroyed" object's position and rotation to the position and rotation of the "new" object - recycling is a must nowadays!
Your answer
Follow this Question
Related Questions
Playing Game Outside Unity 2 Answers
Choppy Game Screen 3 Answers
How to get script components in multiple gameobjects C# 2 Answers
Why is my model being rendered this way? 1 Answer
How do you activate a script upon play? 3 Answers