Is it costy To have multiple Materials slot on one Mesh?When you put the same material on them anyway?

I just like the posibility to know wich material is hit. but i don’t know if it’s an good aproach since in every material slot we have still the same material. Also Is there a way to inside the material graph to know wich Material slot is on wich UV space wise ?

Hey there, ideally you want to have the least possible material slots, i do believe that increases draw calls.

Yup, each material slot adds another drawcall. (in other words, the mesh needs to be drawn again)

Thank You For your interest.

(…About the second qeustion) Let’s say I still added those extra slots, Is there a way to determine inside the material graph wich slot is meant FE. instead of an ColorMap,to use it like an Layered Material ? For Paralax Oclusion it need to be one material( but not necesairly one slot, I try to avoid colormap creation)… I hope that is understandable :slight_smile:

When you say you have the same material in both material slots, do you mean that they are identical or are they material instances with different parameters?

If they are identical, then there is no reason to have two material slots or more.

And yes, you should always try to aim for as few material slots as possible. The fewer materials the less draw calls. However, it is not as if you reduce the render time by 50% just by going from 2 slots to 1 slot, you do reduce it some but you’re not cutting the render time in half. By saying that, it is also important to think about levelling performance/optimisation against usability/ease of use. Trying to cramp everything into one material slot can make it difficult to reuse, you will basically tie that material to that specific mesh and will not be useable on other meshes.

As a last note, if you’re thinking about performance for materials you should (if you haven’t already) have a look at Material Instances, and perhaps Material Parameter Collections as opposed to Dynamic Material Instances. There are a bunch of ways to optimise materials, the material itself can be optimised based on the amount of calculations (instructions) it has to do to produce the final shader. Have a look at this Question for some more information regarding that.

Hope that helped clear some things up, and maybe it gave you some more interesting things to think about :wink:
Cheers!

1 Like

Thank You For your Answer, Yes it would be one and the same material in all slots. But only part Time.

I don’t think you can know the slot you are in the material editor.