In this recipe we will create a generic wood material; in case you need a particular kind of wood, this shader can be easily adapted:
Getting ready
Start Blender and load the file 1301OS_04_start.blend.
How to do it...
Now we are going to create the material:
Click on New in the Material window under the Properties panel or in the Node Editor header. Rename the material Wood.
Switch the Diffuse shader with a Mix Shader node. In the first Shader slot select a Diffuse BSDF shader, in the second Shader slot select Glossy BSDF. Set the Glossy node's Roughness to 0.300.
Add a Fresnel node (Press Shift + A and go to Input | Fresnel) and a Mix node (Press Shift + A and go to Color | Mix). Set the IOR value of the Fresnel node to 2.000 and connect its output to the Color1 input socket of the Mix node; set the Mix node's Fac value to 0.900 and the Blend Type to Multiply. Connect the Multiply node output to the Fac input socket of the Mix Shader node.
Add a frame (Press Shift + A and go to Layout | Frame), select all the nodes and then the frame and press Ctrl + P to parent them. Rename the frame as SHADERS.
Add one Texture Coordinate node (Press Shift + A and go to Input | Texture Coordinate) and three Mapping nodes (Press Shift + A and go to Vector | Mapping, just add the first and duplicate the others); connect the Object output of the Texture Coordinate node to the Vector inputs of the three Mapping nodes.
Set the Scale value of the first Mapping node to 2.000 for all three axes. Set Scale only for the x axis of the second Mapping node to 20.000. Set the Scale only for the x axis of the third Mapping node to 15.000.
Add a Noise Texture node (Press Shift + A and go to Texture | Noise Texture) and two Wave Texture nodes (Press Shift + A and go to Texture | Wave Texture).
Set the Scale value of the Noise Texture node to 6.000 and the Detail value to 0.000; connect the first Mapping node output to the Noise Texture node's Vector input socket.
Connect the second Mapping node output to the Vector input of the first Wave Texture node; set the Wave node's Scale to 0.200 and the Distortion to 20.000.
Connect the third Mapping node output to the second Wave Texture node's Vector input socket; set Wave type to Rings, Scale to 0.070, and Distortion to 44.000.
Add a Mix node (Press Shift + A and go to Color | Mix), set the Blend Type to Multiply, the Fac value to 1.000 and connect the Noise node's Color output to the Color1 input socket and the first Wave node's Color output to the Color2 input socket.
Connect the Multiply node output to the Color input of the Diffuse shader. Press Shift + D to duplicate it, change the Blend Type to Add and paste it between the Multiply node and the Diffuse shader. Connect the second Wave Texture node's Color output to the Color2 input socket of the Add node.
Add a ColorRamp (Press Shift + A and go to Convertor | ColorRamp) and paste it right after the Noise Texture node; set the interpolation to B-Spline and move the black color marker one-third to the right.
Press Shift + D to duplicate the ColorRamp and paste it right after the first Wave Texture node; move the black color marker to the middle of the slider and the white color marker just a little bit to the left.
Press Shift + D to duplicate the ColorRamp again and paste it right after the second Wave Texture node; move the white color marker to the full left of the slider.
Now add a Mix node (Press Shift + A and go to Color | Mix) and connect the Add node's Color output to to its Fac input socket. Set the Color1 to R 1.000, G 0.500, and B 0.150 and the Color2 to R 0.694, G 0.205, and B 0.027.
Press Shift + D on the Mix node, pasting the duplicate right next to the original; connect the original's output to the Color2 input socket too and change the Blend Type to Multiply.
Add a frame (Press Shift + A and go to Layout | Frame), select the three textures, the three ColorRamp nodes and the four Mix nodes and then the frame; press Ctrl + P to parent them. Rename the frame COLOR.
Add a new Noise Texture node (Press Shift + A and go to Texture | Noise Texture), a Math node (Press Shift + A and go to Convertor | Math), and a Bump node (Press Shift + A and go to Vector | Bump).
Connect the third Mapping node output to the Vector input socket of the Noise Texture node, then connect the Color output of the Noise texture node to the second Value input of the Math node. Set its operation to Add and connect its output to the Height input socket of the Bump node.
Set the Bump node's Strength to 0.015 and connect the Normal output to the Normal inputs of both the Diffuse and the Glossy shaders inside the SHADERS frame. Set the Noise Texture node's Scale to 43.000 and Detail to 16.000.
Go to the Add node inside the COLOR frame, click on the output node and drag it to be connected to the first Value input socket of the Math node.
Add a frame (Press Shift + A and go to Layout | Frame), select the three nodes and then the frame; press Ctrl + P to parent them. Rename the frame BUMP.
How it works...
From step 1 to step 4 we built the basic shaders, the usual Diffuse and Glossy nodes mixed by a Fresnel value multiplied by a medium gray color.
From step 5 to step 18 we built the wood veins color, adding three procedurals to be used as splitting factor for the two wood colors set in the penultimate Mix node; by the last Multiply node we made the color more saturated.
From step 19 to step 23 we built the Bump node, made by a noise grain summed to the veins values by the Add math node; we set a pretty low value for the Bump, Strength, but higher values, together with higher Roughness values to obtain a less polished surface, are fine for different kinds of woods.