Add different materials to different parts of a mesh?
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.
You need to be in edit mode.
Select the part of the mesh you want to add the material to:
- Click the "+" icon on the right side of "material.002" shown in the image below to create a new material.
- Let's give the new material a green color
Click the Assign button in the Materials tab under the list of materials:
And you're done!
*Note that when using this method there can be a sharp contrast between the two materials.
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.
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:
You can create soft transitions between shaders
You can have multiple shaders in any shapes/areas on a single face, or across edge and face boundaries
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:
And, here's the node setup you use:
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.
This is a very great answer. I have uses for your node tree. Thank you very much.
Flipperty dipperty dang! This is a superb set up. I have been trying to find out a way of adding a floral pattern around the rim of my tea cup saucer. It’s not possible to have 2 materials on top of each other on the same object. But, your method gets round this limitation. I will use the orange as my white porcelain base colour. I will use the blue with the mask for my floral pattern. I have decided to use a metallic silver or gold for the pattern. I will then use a bump map to display some embossing. Instead of diffuse & emission, I will use 2 Principled BSDF shaders.
I was confused because I didn't understand there were two lists of material... I created materials in the drop-down list:
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:
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.
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.
@MrZak You did it again, talking about a + button without telling which one, which is why I was confused at first... :-)
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.
Thanks for your answer @PhiLho! That's exactly the problem I was struggling with. :)