Batching on Mobile = Bad? Your experience.

Hello there

We’re working on a 3D game for iOS and Android and made a striking discovery today. In short: It improved our performance significantly to turn off batching.

In our game, there are long, side-scrolling 3D levels with somewhere between 150k-200k triangles each. The scenes are built in a modular fashion: consisting of about 500-1000 single objects that share one or two materials. We’re using static batching on the whole scene to reduce drawcalls and really got it down to 3-8 drawcalls (in the editor). Still, we were experiencing performance troubles on not-so-new hardware (iPhone4, Samsung Galaxy S & S II).

After turning off static batching for all objects in one scene, we improved performance on Galaxy S II from about 20-25 fps to a stable 60 fps! And looking in the editor, there is no dynamic batching happening on the level objects either. It shows between 40-90 drawcalls in each frame.

Now, we are really confused. This seems run against most things that we have read AND experienced so far in terms of optimizing for mobile. How can this work? I thought drawcalls are extremely critical on mobile?

I would be really curious about your practice and experience in this regard.

Thanks!

Batching is not bad, but like any other optimization you must apply when its needed, with a profile test :stuck_out_tongue:

Batching “merge” all meshes and draw in a single draw call. So you is always drawing a very big mesh, it is very good to reduce draw calls. Because you already create a scene in a modular fashion you are drawing very few triangles each time, but with more draw calls.

Create modular meshes with controllable triangles disposed in scene to have a average draw call is a very good way to create optimized sceneries. But it gives much more work that place hundred of objects and apply static batch.