Download

1 material (texture atlas) vs 4 materials (more drawcalls). I want to know the truth

I know that using a unique material means less drawcalls and this is good. Or depends?

I did a test with 1024 houses, with no LODS, first using 1 material with texture atlas, and then using the same model but using 4 materials. Here are a screenshot (4 materials test):

9d9ddd2afe8e443f4ec4aa922d91560d7e1a919c.jpeg

The results:

Using 1 material: 87 fps, draw stats 4.4 ms, drawcalls 3500

Using 4 materials: 80 fps, draw stats 6.1 ms, drawcalls 9100

Using 1 material is better, but not much.

But the models using texture atlas needs more geometry, because you must divide the walls into tiles to fit in the uv layout. Using more materials you can simplify the model because you can use textures as tiles. So I have reduced the model geometry, from 6000 triangles to 4000, and this is the result in the same test:

99 fps, stats 6.1 ms, drawcalls 9100. Is faster than the other 2 tests, even using more drawcalls than the texture atlas version.

So it seems that these extra geometry using texture atlas is slow. Perhaps the results would be better using LODS. Again, using texture atlas is less efficient to make LODs, because if you remove some vertex, the uvs are broken.

A good option is to use a model with several materials for the LOD0, and then using an atlas for the LOD1,2,3, when the texture resolution is not so important. Perhaps a billboard.