Reducing draw calls on multiple material, flat shaded meshes?

I’m working on a game where I’m going for a retro 3D look. Think early entries in the Sega Virtua series, like Virtua Fighter 1:2395-virtuafightersaturn_1.jpg

In other words, a faceted, “flat shaded” look, without texture mapping. With the help of the forums, I was able to figure out how to get Blender to export models with the look I want (with the Edge Split modifier), and I’ve been assigning materials to individual faces within Blender. Everything looks just as I want it.

I’m targeting iOS, so I’m trying to pay attention to draw calls. I noticed that my character model, with 9 different materials, is taking – guess what – 9 draw calls to render. My question is: Is there anything clever I can do to reduce this?

I’ve done some quick tests where I’ve tried assigning all the material slots to the same material, but it still takes 9 draw calls – one for each material slot. If it were possible, it seems an acceptable solution would be to use a single material, and then assign individual colors to the faces via the inspector or in code, but this test makes it seem that won’t work.

What do you guys think? By going for an old school look, have I paradoxically chosen a more expensive rendering style? Should I just bite the bullet and try to achieve a similar look with textures?

Thanks in advance.

default answer

first of all, one submesh will take 1 draw call, your model have 9 submeshes, so it will take 9 draw calls. if you use same material, only built-in unity batching system can decrease it. read about it here

but the best way is to use one submesh for whole model. then it will draw in one drawcall (with a single-pass shader of course)

now the issue is how to paint a graphic on one submesh. this can be single texture for whole model with a painting or vertex colors that can color whole triangles with color or gradients without any texture. so here’s your solution.

if it’s impossible, explain why do you need 9 submeshes?

a programmer solution

leave your model with 9 submeshes as is. now, you need a not very big script that will do the following:
  • it will take each submesh and paint all submesh vertices to color that can be customized at runtime separately for each submesh (like materials you use now)
  • then, all submeshes are combined to one single submesh.
  • and now use a single material to draw whole model with 9 different colored surfaces. this is one drawcall.

texture also can be used here if needed