In this recipe, we will create a generic rubber shader, as shown in this screenshot:
The rubber material as it appears in the final rendering
Getting ready...
Start Blender and load the 9931OS_Suzanne_start.blend file.
How to do it...
Now we are going to create the material by performing the following steps:
Click on New in the Material window under the Properties panel or in the Node Editor toolbar. Rename the material Rubber.
With the mouse arrow in the Camera view, press Shift + Z to set it to Rendered mode.
Switch the Diffuse BSDF shader with a Mix Shader node, and in the second Shader slot, select a Glossy BSDF node. In the first Shader slot, select a new Mix Shader node. Set the Glossy BSDF node's Roughness value to 0.350.
Go to the second Mix Shader node, and in the first Shader slot, select a Diffuse BSDF node. In the second Shader slot, select a Velvet BSDF node. Set the Velvet BSDF shader node's Sigma value to 0.600.
Add a Fresnel node (press Shift + A and navigate to Input | Fresnel) and connect it to the Fac input of both the Mix Shader nodes. Set the IOR value to 1.519, as shown in the following screenshot:
The basic shader network
Add a Texture Coordinate node (press Shift + A and navigate to Input | Texture Coordinate), a Mapping node (press Shift + A and navigate to Vector | Mapping), a Voronoi Texture node, and a Noise Texture node (press Shift + A and navigate to Texture | Voronoi Texture, do the same to add Noise Texture node).
Connect the Object output of the Texture Coordinate node to the Vector input of the Mapping node, and the latter's output to the Vector input sockets of the two texture nodes.
Set the Voronoi Texture node's Coloring to Cells and the Scale value to 350.000. Set the Noise Texture node's Scale value to 450.000 and Detail to 5.000.
Add two Math nodes (press Shift + A and navigate to Converter | Math). Set the Operation of the second node to Multiply. Connect the Fac output of the Voronoi Texture node to the first Value input socket of the Add-Math node. Connect the Fac output of the Noise Texture node to the second Value input socket of the Add-Math node.
Connect the Add-Math node output to the first Value input socket of the Multiply-Math node. Set second Value to 0.060 and connect the output to the Displacement input socket of the Material Output node, as shown in the following screenshot:
The slight bump effect added to the network
Add a MixRGB node (press Shift + A and navigate to Color | MixRGB) and move it close to the Voronoi Texture node. Set the Blend Type to Multiply. Connect the Voronoi Texture node's Color output to the Color2 input socket of the Multiply-MixRGB node. Then connect the Color output of this node to the Color input sockets of the Diffuse BSDF, Velvet BSDF, and Glossy BSDF shaders.
Add an RGB node (press Shift + A and navigate to Input | RGB) and connect it to the Color1 input socket of the Multiply-MixRGB node, as shown in this screenshot:
The overall view of the network
Save the file as Rubber.blend.
How it works...
We built the shader in steps 1 to 5. We added a slight bump effect in steps 6 to 10. In the last two steps, we just added the RGB node, a control used to set the color of the material.