104
$\begingroup$

How do you add more than one material to a mesh?

I have tried adding two materials to the object, and then assigning one of the materials to a vertex-group, but I could not find a place to assign it.

I am making a striped bouncy ball that I want to deform, so adding a different material by separating the mesh into different objects would not be ideal.

Using two different objects to have different materials

$\endgroup$
142
$\begingroup$

You need to be in edit mode.

  1. Select the part of the mesh you want to add the material to:

    Selecting the faces.

  2. Click the "+" icon on the right side of "material.002" shown in the image below to create a new material.
  3. Let's give the new material a green color
  4. Click the Assign button in the Materials tab under the list of materials:

    Assign button under Materials tab.

And you're done!

Final Resault


*Note that when using this method there can be a sharp contrast between the two materials.

$\endgroup$
  • 2
    $\begingroup$ My issue was I didn't hit the plus button (shown on the right side of the your image) in the materials to have two separate materials in the first place on the object. $\endgroup$ – David Silva Smith Oct 11 '15 at 13:09
  • $\begingroup$ For a long time I have been looking for this thing, but never really googled to land here. Thanks :) $\endgroup$ – dotNET Aug 26 '17 at 7:09
55
$\begingroup$

You can switch between different shaders using a UV mapped image, if you're using cycles. You accomplish this by creating a black and white image mask and using it as the factor for a mix shader.

This has some unique benefits:

  1. You can create soft transitions between shaders

  2. You can have multiple shaders in any shapes/areas on a single face, or across edge and face boundaries

  3. You don't have to create extra geometry to apply your additional shaders to

Here's what it looks like, notice that this cube only has 6 faces:

Multiple shaders using UV mapped image mask, overview

And, here's the node setup you use:

enter image description here

You can also chain multiple mix shaders together to further mask areas defined by your first mask. If I replaced the orange diffuse shader in my node tree above with a mix shader of white gloss and green diffuse, using another mask as a factor, I could separate the orange area shown above into two other materials. You can keep chaining mix shaders as far as you like.

$\endgroup$
  • $\begingroup$ This is a very great answer. I have uses for your node tree. Thank you very much. $\endgroup$ – Rita Geraghty Feb 17 at 15:25
4
$\begingroup$

I was confused because I didn't understand there were two lists of material... I created materials in the drop-down list:

Created materials

Then I selected the material here, the faces and clicked on Assign. It didn't work, I had all my faces using the same material!

But I finally understood you actually assign materials added to the list above:

Assigned materials

You have to click the + button on the right, and you can either create a new material or select an existing one in the drop-down. Then you can select a material in this list to assign to the selected faces.

Also note that if you select a material in this list, then click Select, it will show (select) all the faces using this material.

$\endgroup$
  • $\begingroup$ It's not necessary to add another material slot (which is what done by hitting + button) to assign faces to a material; selecting material slot, selecting faces and clicking Assign is enough. $\endgroup$ – Mr Zak May 25 '17 at 11:45
  • 1
    $\begingroup$ @MrZak You did it again, talking about a + button without telling which one, which is why I was confused at first... :-) $\endgroup$ – PhiLho Jun 10 '17 at 7:39
  • $\begingroup$ Again? Strange. I meant "the + button on the right" which is mentioned in your answer so I assumed it's somehting you know about. What I was pointing out is that it might be not necessary to press that button at all. And there aren't 2 lists of materials - on the top screenshot, above is list of slots, below is the dropdown with list of materials. $\endgroup$ – Mr Zak Jun 10 '17 at 8:24
  • $\begingroup$ Thanks for your answer @PhiLho! That's exactly the problem I was struggling with. :) $\endgroup$ – prubini87 Nov 23 '17 at 1:07
  • $\begingroup$ Question very related to this one and your answer (hence, doesn't warrant separate question): if the goal is to subdivide a material into an arbitrary number of materials (say 5 or 10), would this approach work or are you constrained by the mesh? $\endgroup$ – Crashalot Jan 21 '18 at 21:29
3
$\begingroup$

If you already have your mesh separated and applied different shaders to each, simply rejoing (Ctrl+J. Then Tab into edit-mode and press Ctrl+V>remove doubles.

$\endgroup$

protected by cegaton Mar 23 '18 at 1:21

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.