Many materials for a single mesh or multiply mesh with 1 material

Hi
iIf i have a mesh with 10 materials or the same mesh split 10 ways with 1 material each is there any difference in performance ( i prefer the 1 mat to multiply meshes myself)

For each new material, Unity has to start a fresh draw pass. So if your object has 10 materials applied to it, that’s 10 draw calls. And that’s not counting shadows or other lighting effects that would be adding additional passes.

In general, fewer materials is always a good idea.

Well static batching is my freind there:). The question was however do 10 meshes with 1 material or 10 materials on one mesh equal the same result in the end?

I hope I understand your question correctly tawdry.
If you’re using Static batching, 10 meshes eg. 10 buildings made in a 3D application, then grouped or joined together as one object, then imported into Unity, with one Unity material applied to it, might be better.
I would also suggest, a Big nice Texture Atlas, for that too.
If anyone else has a better suggestion please tell me. :smile:

Hey Brandy nope that is not the question. The question is say I have 1 house and on that house i have 10 materials( window,door,plaster.wood etc) . If I were instead to split that single mesh into 10 meshes with 1 material then applied to each will the result be the same?So instead of having 10 materials on 1 mesh I have 10 meshes with 1 material.Hope that is clear enough.This might be a stupid question sbut then again …there are no stupid questions???.

Hey @tawdry - it should not matter if the objects is split into 10 different submeshes or if it’s one grouped mesh with 10 material groups. If at all then the Impact should theoretically be so minimal that it can be neglected. The question in that case should probably mainly be if it serves your logic or organization better either way.

You should however try to Group as many materials together into one as possible as static batching can help here tremendously.

Ok thx motion I prefer to split the meshes but because I will have 100’s of these meshes just wanted to be sure performance would not be hampered by doing so.

Well … your best option in your own case would be to make a test-scene and run the profiler on it. just make a few simple shapes with 10 materials and throw 100s of them in the scene and then compare. It’s always better to do this than to rely on theory. :slight_smile:

Yea that sounds like an idea sometimes i’m to lazy for my own good:smile:

Now i remeber why i avoid doing test O.o have not used blender in a while so took a while. Any way best as i can tell no diff but i am not very proficient with profiler. One strange thing i noticed the closed i got to the test meshes the more setpasses occured even though the batches decreased I noticed this on a test i ran a while ago as well the closer i got to a mesh the more expensive it got despite there been no extra batches or anything else in scee added .