- Home /
Should I merge my meshes for better performance?
Hi!
I explain my question with examples. What is better for performance: I have a bookshelf with several different sized books. It's all static (so no need to pick up books). Should everything be a single mesh or all the books and shelf be a separate mesh (one object ofc).
The former has more tris, more complex geometry, but the latter has several unconected meshes. Which is better? Is there a performance penalty at all for using separate meshes or could I just model everything as many separated submeshes (like a plain + 4 sticks to form a table instead of extruding the legs from the plane).
Please enlight me, thanks.
EDIT:
One more thing: What about overlapping meshes? are they causing any problem? Let's say I want a dome like thing on my terrain and just merge half of the full sphere into the terrain or into some other object. Or should i cut out the hidden part and thus probably creating more geometry.
Answer by Mortoc · Dec 01, 2013 at 06:41 PM
You should be able to make them all the same mesh without adding tris. In your 3D modeling tool just combine all the meshes in to a single object. For prop-sized objects, that's pretty much the rule of thumb, 1 object and 1 material if possible to keep your draw calls low.
For more info: http://docs.unity3d.com/Documentation/Manual/OptimizingGraphicsPerformance.html
I thought if I combine unconnected parts those still would be multiple meshes and that might cause performance issue. As i wrote i did intend to combine/export them as single object anyway. Unfortunately I don't know too much about materials yet.. how to make everything having a single material (I mean the shelf and books need different textures), but I understand why it is prefered.
1: If you have Unity Pro, no need to combine them. Just turn on Static Batching. 2: To make the shelf and books use one material, make one big texture map and put, the textures of the shelf and books in that one big texture, then apply the same texture / material to the shelf and the books (This is the Atlas Texture).
Your answer
![](https://koobas.hobune.stream/wayback/20220613123156im_/https://answers.unity.com/themes/thub/images/avi.jpg)