I've just noticed that the draw calls are being affected by the material IDs in a strange way.
I did some quick tests using a single mesh with a Multi/Sub-Object Material assigned to it, which only uses one standard material.
First test:- Material ID set to 1 and all polygons using ID 1.
Result:Draw calls: 1
Package memory footprint in MB: 0.
Second test:- Material ID set to 1000 and all polygons using ID 1000.
Result:Draw calls: 1000
Package memory footprint in MB: 2.
I've also tested with more than one sub-material, but always the draw calls equals to the highest Material ID number. There can be five sub-materials, but if one of them have the ID set to 37 for example, then there will be 37 draw calls.
Maybe the above isn't very practical, so here is a real situation:
I create a Multi/Sub-Object Material which has 17 standard materials.
I assign it to the main mesh which uses all 17 materials. This mesh will use 17 draw calls, so it's OK.
The problem comes now. I assign this Multi/Sub-Object Material to another mesh, but this mesh only uses the material IDs 5, 8, 9 and 11.
Once in Outerra, it uses 11 draw calls instead of only 4.
Is this behavior intentional, is it just a bug, or I am missing something?