Creating a wasp-like chitin material with procedural textures
In this recipe, we will create a material similar to chitin (the characteristic substance of the exoskeletons of insects) colored with a yellow and black pattern like a wasp, as shown in the following screenshot:
The insect wasp-like material as it appears in the final rendering
Getting ready
Start Blender and open the 9931OS_08_start.blend file, where there is an already set scene with an unwrapped Suzanne primitive object leaning on a Plane, an Emitter mesh-light, and a Camera.
Go to the World window and enable the Ambient Occlusion item with the Factor value 0.10.
How to do it...
Let's start immediately with the material creation using the following steps:
Click on the New button in the Node Editor window toolbar or in the Material window under the main Properties panel to the right, and rename the new material chitin_wasp.
Now, in the Material window, switch the Diffuse BSDF shader with a Mix Shader node, and label it as Mix Shader2. In the first Shader slot, select a new Mix Shader node. In the second one, select a Glossy BSDF shader node. Label the new Mix Shader node as Mix Shader1, and the Glossy BSDF node as Glossy BSDF_2.
Go to the Mix Shader1 node, and in the first Shader slot, select a Diffuse BSDF shader, and in the second one, select a new Glossy BSDF shader node. Label the latter as Glossy BSDF_1, and set its Roughness value to 0.100 and Distribution to Beckmann, and change the Color value for R to 0.039, G to 0.138, and B to 0.046.
Set the Glossy BSDF_2 node's Roughness value to 0.040 and Distribution to Beckmann, and change its Color values for R to 0.500, G to 0.440, and B to 0.086. Set the Fac value of the Mix Shader2 node to 0.025.
Add a Layer Weight node (press Shift + A and navigate to Input | Layer Weight) and connect its Facing output to the Fac input socket of the Mix Shader1 node. Leave the Blend value as 0.500, as shown in the following screenshot:
The nodes for the base shader
Add a Texture Coordinate node (press Shift + A and navigate to Input | Texture Coordinate) and a Mapping node (press Shift + A and navigate to Vector | Mapping). Connect the UV output of the Texture Coordinate node to the Vector input of the Mapping node. Label the latter as Mapping1.
Add a Voronoi Texture node (press Shift + A and navigate to Texture | Voronoi Texture) and a Noise Texture node (press Shift + A and navigate to Texture | Noise Texture). Connect the Mapping1 node's Vector output to their Vector input sockets. Set the Scale values of both the texture nodes to 300.000 and then label the Noise Texture node as Noise Texture1.
Add aBumpnode (press Shift + A and navigate to Vector | Bump) and connect the Color output of the Voronoi Texture node to the Height input socket of the Bump node. Connect the Normal output of this node to the Normal input sockets of the Diffuse BSDF node and both Glossy BSDF shader nodes. Set the Bump node's Strength value to 0.500.
Add a ColorRamp node (press Shift + A and navigate to Converter | ColorRamp), label it as ColorRamp1, and paste it between the Voronoi Texture node and the Bump node. Set Interpolation to Ease and move the white color stop to the 0.059 position.
Add a Math node (press Shift + A and navigate to Converter | Math), set Operation to Multiply, and connect the Fac output of the Noise Texture1 node to the first Value input socket of the Math node. Set the second Value to 0.100 and connect the Value output to the Displacement input socket of the Material Output node, as shown in the following screenshot:
Textures connected either as per the shader bump and the total bump to the Displacement input socket of the Material Output node
Add a new Mapping node (press Shift + A and navigate to Vector | Mapping), label it as Mapping2, and connect the UV output of the Texture Coordinate node to its Vector input socket. Set the Rotation value for Y to 90° and the Rotation value of Z to 45°. Set the Scale value for all three axes to 5.000.
Add a Noise Texture node (press Shift + A and navigate to Texture | Noise Texture) and a ColorRamp node (press Shift + A and navigate to Converter | ColorRamp). Label them as Noise Texture2 and ColorRamp2.
Connect the output of the Mapping2 node to the Vector input socket of the Noise Texture2 node, and the Fac output of this node to the Fac input socket of ColorRamp2. Connect the output of this node to the Color input socket of the Diffuse BSDF shader node.
Go to the Noise Texture2 node and set the Scale and Distortion values to 2.000. Go to the ColorRamp2 node and set Interpolation to Constant, select the white color stop, and change the Color values for R to 1.000, G to 0.429, and B to 0.000.
Click on the + icon button to add new color stops until you have eight color stops almost evenly spaced along the slider (that is: color stop 0 at the 0.000 position, 1 at the 0.125 position, 2 at the 0.250 position, then 0.357, 0.491, 0.626, 0.745, and 0.886).
Select the last color stop, put the mouse pointer on the color slider, and press Ctrl + C to copy the yellow color; then, select the color stops numbered 1, 3, and 5, and paste the color (press Ctrl + V) so as to have a slider subdivided in eight parts, four black and four yellow, as shown in the following screenshot:
The color pattern connected to the diffuse component
How it works...
From step 1 to 5, we built the basic shader using two Glossy BSDF shaders with different colors to mimic a color shifting in the specularity areas.
From step 6 to 10, we built the chitin bump, assigning the pores to the per-shader bump but a general noise pattern to the displacement output (which, in this case, still works as a simple bump).
From step 11 to 16, we built a simple and random wasp-colored pattern; obviously, this can be changed and modified as you prefer, and actually should also be used on a more appropriate model; in this case, it would be better to make use of a painted color texture map to build a more appropriate and symmetrical color pattern.