- Home /
Dynamic Batching, Combine Meshes?
I dont understand how that dynamic batching or combine meshes stuff works. In our game we use many small meshes (arround 200 verts each) as tiles to design the environment. The environment consists mainly of appartment blocks. They share all the same texture and material. Collision is done on a seperate layer made of simple boxes. When I play there are about 500 draw calls. How can I combine the meshes to reduce the draw calls? Would it be worthwhile to arrange the tiles in our 3D modeling software and export the buildings as single big meshes with arround 20000 verts each? Or can I combine the tiles to a single mesh in Unity?
We use the free Unity version. So pro features are not available.
Here is a link to our game: http://goo.gl/CY1V4
Answer by syclamoth · Oct 30, 2011 at 02:48 AM
You can combine your meshes at runtime using Mesh.CombineMeshes. However, if you are using Unity Pro, you would be better served to just use Unity's inbuilt static batching (so long as you mark all your buildings as static). I recently tried to do exactly what you are talking about here, and it ended up being absurdly inefficient. If possible, try to make the buildings only render the outside of the building if you are outside it, and only render the inside floors/lighting if the player is actually inside. You can do this with occlusion culling, if you have access to that feature.
No pro features are available to us. So putting a $$anonymous$$esh.Combine$$anonymous$$eshes script on the parent will combine them to one mesh and reduce the draw calls?
Your answer
Follow this Question
Related Questions
optimizing ipad performance with draw calls 1 Answer
Dynamic batching slows down? 0 Answers
Is there anyway to get Unity GUI to cache an image? 1 Answer
Can an animated object become static again? 1 Answer
How to optimize with a lot of objects 0 Answers