On combining two objects to reduce draw calls ...

Imagine you have two objects. Say, two different green sheds.

1 2 3 - They already use the same, identical, material. They are physically near each other. They never move or twist in relation to each other.

You think to yourself, “I’ll go combine the meshes for optimisation.”

In these circumstances, IS IT ALWAYS a good idea to manually remake it as one mesh? ie, to combine the meshes?

I guess I’ve always assumed the answer is yes. But …? Any downsides to manually combining meshes in the example?

Note – assume target is mobile, so probably just plain old Vertex Lit. If you are using fancy lighting, there is a gotchya described here … RenderTech-ForwardRendering.html … where it can be better to use mesh of smaller physical extent. Ignore that issue. In this question I mean only in ordinary, single-light situations.

Note 2 – in the art of culling (whether camera, or occlusion) the shapes of your objects can be critical. I’m not referring to that issue here.

So in a sentence …

Is there ANY REASON AT ALL to not combine mesh (manually I mean), where you can?

So for example …for all I know, the renderer prefers mesh of a certain size (just a wild example…) or maybe there is a difference on mobile, something relating to a shader or fog … some aspect of rendering … who knows?

Cheers!

If you never use them separately… Ever, then I don’t see a reason why you shouldn’t. The only downside I can think of is that your texture will expand in dimensions, but if you use the same material with different uv, that is not a problem at all.

Yes I think you could do it. I do this by script in one of my project on an entire land cause this slice the draw call drastically if lot of separate static mesh use the same material/texture. The only way you mustn’t is if your meshes are really large or if they are push them apart. In this second case, the engine gonna compute triangles which are not in the screen because for him it’s the same mesh.

You could contrive a scenario where the camera will frequently only see one of them at a time. In that case it makes sense to keep them separate, because the engine would be able to cull the shed that isn’t in view.

Other wise it would end up processing the geometry for the hidden shed no matter what, until it knew it could discard the fragments.

But like I said, that’s a contrived case.