- Blender Cycles:Lighting and Rendering Cookbook
- Bernardo Iraci
- 1333字
- 2021-07-19 18:48:18
Creating a leather material for the wallet
Now let's see how we can create a material for a wallet. We want to recreate a smooth, worn eco leather.
Getting ready
First of all we need to add a new material to the wallet. Let's select the wallet mesh, add a new material to it, and name it Wallet
.
How to do it…
To create the leather material, we will be following these steps:
- Now in the node editor add a Glossy BSDF node and mix it with the default Diffuse BSDF node using a Mix Shader node. Set the mix factor to 0.300 and the Glossy BSDF node's Roughness value to
0.100
. Still not so great looking... is it? Let's make this material look a bit better! To do so we are going to use a combination of image textures and procedural textures. - First of all let's add our Texture Coordinate node (Add | Input). Then we need to add a procedural texture. From the Texture section of the Add menu, click on Noise Texture. Link the Vector input to the Generated output of the Texture Coordinate node.
- For this material we just need to set the Distortion to
1.000
, while for the other values the default settings of the Noise Texture node will be good for our needs, so we can leave them as they are. If you want to see how this texture looks, remember that you can use a Diffuse BSDF node. - We will now be using a second procedural texture to recreate the smaller imperfections of the leather. It will again be a noise texture type. So let's duplicate the one we just created using Shift + D. In this one we need to set the scale to
100.000
, while we will set Details and Distortion to5.000
. - Now we need to mix the two procedural textures with a Mix node in mix mode, with a Fac of
0.050
. We will be needing the black and white info of the textures, so we need to use the Fac output of the procedural textures, not the Color one. The Noise Texture node with the lower scale value (Scale5.000
) have to be plugged in the first socket, while the Noise Texture node with the higher scale vale (Scale100.000
) in the second socket. - As we will see, this node setup will soon start to be a little bit crowded. It is a good thing to keep things organized, so let's name some nodes. Press the N key to bring out the properties panel. When you have a node selected in this panel, you will get some info and some settings about the node. With the last-created Mix node selected, write
PROCEDURAL
in the label space. Looking at the node, we can see that now it will not have Mix written on it anymore, but the name we just gave it. Note that you can also change other settings such as the name and the color of the node. - Now let's add an Image Texture node and from the browser, select the
scratches.jpeg
image. This time as the texture coordinate we will use UV. - To recreate the leather, we will be using another Image Texture node as well. Let's duplicate the previous Image Texture node and press the X button on the node to erase the path and load instead the image called
stains.jpeg
. Also for this texture we want to use UV coordinates. - As we did for the procedural textures, let's mix these two Image Texture nodes. Plug them into a Mix node,
scratches.jpeg
in the second socket andstains.jpeg
in the first one, Mix mode, Fac0.20
. As we also want to use the black and white information from the image textures, we need to convert them. To do this from the Convertor section of the Add menu, click on RGB to BW and link the Color output of the Image Texture nodes to the input of the node we just added. Let's label this Mix node Images. - Now we want to mix the procedural texture and the image texture. To do this we will again use a Mix node. Plug the Mix node labeled Proc in the first socket and the one labeled Images in the second. For this particular situation we want to change the Mix mode to Add and set the Fac value to
1.000
. Let's label the node GlossyCOLOR. Now let's plug the output of this Mix node to the Color input of the Glossy BSDF node. If we change the Diffuse BSDF node's color to a brownish color (RGB 0.150, 0.075, 0.030), we will see that now the wallet material starts to resemble leather, but the reflections are way too strong. To fix this, we need to darken the color of the Glossy BSDF node. Let's add a Gamma node between the GlossyCOLOR Mix node and the Glossy BSDF node and set the value to1.750
. The reflections now will be much weaker. Anyway, the material is still looking really flat and boring. - To give some interesting variation to the surface, we will use the same color we are using for the Glossy BSDF node's color as a bump. Let's add a Bump node (Add | Vector), plug the GlossyCOLOR Mix node into the Height input, and the Vector input of both the Diffuse BSDF and the Glossy BSDF nodes into the Normal output of the Bump node. Now the surface is starting to be more interesting. All we need to do is set the strength to
-0.030
. - Let's give a final touch to this leather. We want to have more glossiness variation between the worn and the lesser worn parts of the wallet. Add another Diffuse BSDF node and set the color to RGB
0.500
,0.400
,0.250
. This will be the color of the scratches and worn areas. Now let's add a Mix Shader node and plug in the second Shader socket BSDF output of the Diffuse BSDF node and in the first Shader socket plug in the mix between the other Diffuse BSDF and Glossy BSDF nodes BSDF outputs. This time we will not set manually the Fac value. Instead let's plug in it the output of the GlossyCOLOR Mix node. Finally plug the output of the Mix Shader node into the Material Output node and we are ready to go!
Here is how the final node setup will look like, in the following screenshot:
For the stitches it is enough to use a diffuse material with an RGB value of 0.650, 0.400, 0.250. We will name the material Stitches
.
How it works...
In this leather material we can really start to see the power of nodes. First we created the map of the color by mixing different procedural and image textures. Then we used the very same node group, or part of them for the bump input and to mix two different BSDFs.
When we converted the two image textures to black and white color information, we were able to use it as a factor input for the last Mix node, telling Cycles how much we wanted of each one of the BSDF inputs. Precisely, black areas received influence from the first socket (the leather) and white areas from the second one (the material inside the scratches).
In this situation the scratches material was made using just a Diffuse BSDF node, but we could have created another big and really complex node setup if needed. As anticipated in the introduction, this kind of operation can be done in reality any number of times we want, making the possibilities virtually endless.
There's more...
A procedural texture is a computer-generated image that tries to resemble different natural patterns using functions, for instance, fractal noise and turbulence. These functions try in a different way to represent the "randomness" of nature. Procedural textures are set with different numerical values and can be seamlessly mapped over surfaces, even without the usage of UV maps.