Draw calls are adding up fast with asset packs

Hello,

For some time now I have been trying to wrap my head around how to use asset packs properly. What is worrying me are draw calls growing fast with every asset placed in a scene.

From what I remember, adviced draw call limit for mobile platforms is about 50, for PC maybe few hundreds, with general idea being the lower the better.

I have downloaded one of low poly asset packs from Kenney and setup a quick and simple scene, consisting of 18 objects, 1 directional light and 1 point light. Every material has only color set, no textures used. (see image)

This tiny setup is already using 123 batches and 64 draw calls, with more being added with every additional object…

I do know there are many, many ways to reduce draw call count. I could use a single material and apply different colors with shader instancing. I could combine all vertices to single mesh and flatten materials to vertex colors.

However, even if I make everything instanced and drawn with one material only, there is still tens of draw calls made for the purpose of light maps.

But most important thing is, if I am required to modify meshes or materials of ready to use packages I somehow feel I am using them wrong way…
Or maybe if all geometry is so simple it is not a problem to have houndreds of draw calls even for mobile device?

Any tips welcome.
Thanks, Bartosz

Lighting and shadow is likely the largest cause of your draw calls. Two lights casting shadows and interacting with each other is definitely going to cause a performance hit.

If you don’t need the lights to move or change, try baking a lightmap.

Since you are just setting a color and no texture on most objects, I suggest that you use one material for all of them and use vertex colours to change the colours in the start method. All objects with that material will then just produce one draw call. I did make a shader that has vertex colors and also allows for a custom lightmap which in my case is just a lightmap texture baked in blender, if you want I can send you the shader over