Creating a multipurpose metal group node

In this recipe we will build a generic node group shader applicable, by setting different values, to the most part of different metal materials:

Creating a multipurpose metal group node

Getting ready

Start Blender and load the file 1301OS_04_start.blend.

How to do it...

Now we are going to create the node group:

  1. Click on New in the Material window under the Properties panel or in the Node Editor header.
  2. Switch the Diffuse shader with a Mix Shader node. In the first Shader slot select a Glossy BSDF shader, in the second Shader slot select an Anisotropic BSDF.
  3. Press Shift + D to duplicate the Mix Shader node and paste it just after the first Mix Shader node. Add a Diffuse shader (press Shift + A and go to Shader | Diffuse BSDF) and connect it to the second Shader input of the second Mix Shader node.
    How to do it...
  4. Add a Fresnel node (press Shift + A and go to Input | Fresnel) and connect it to the Fac input of the second Mix Shader node.
  5. Add a Mix node (press Shift + A and go to Color | Mix), set the Blend Type to Add and connect the Color output to the Color input sockets of the Diffuse, Glossy, and Anisotropic shader nodes.
  6. Add a Bump node (press Shift + A and go to Vector | Bump) and connect its Normal output to the Normal input sockets of the Diffuse, Glossy, and Anisotropic shader nodes.
  7. Select all the nodes except for the Material Output node and press Ctrl + G to create a group; rename the group Metal.
    How to do it...

    Now we must expose all the values necessary to tweak the node group for different types of metals.

  8. Click and drag the IOR input socket of the Fresnel node to the extreme left border of the group envelope.
  9. Do the same with the Color1 input socket of the Add node, renaming the newly appeared slot, Color; also drag the Color2 socket of the Add node to the same Color interface socket.
  10. Drag the Roughness input socket of the Glossy shader to the same interface socket, then do the same with the Roughness socket of the Anisotropic shader.
  11. Click and drag the Fac socket of the first Mix Shader node to the envelope border, rename it Aniso_Amount.
  12. Click and drag the Anisotropy socket of the Anisotropic shader.
  13. Repeat the same for the Rotation input socket.
  14. Now click and drag the Height socket of the Bump node, renaming it Bump.
  15. Do the same for the Strength socket, renaming it Bump_Strength.
  16. Lastly, click and drag the Tangent input socket of the Anisotropic shader.
    How to do it...

How it works...

The effect of this node group is mainly based on the IOR value, which is usually quite different for the different metals.

Note

Index Of Refraction: The refractive index of a material is a number that describes how light propagates through that material.

In the node, the exposed IOR value drives the amount of blending of the Diffuse component with the mirror component, made by the Glossy and Anisotropic shaders combined together but which in turn can be mutually blended accordingly to the Aniso_Amount value.

The Anisotropy and Rotation values of the Anisotropic shader are exposed as well, and the same for the Tangent input—in case a particular mapping option must be used (for example, a UV coordinates layer).

The Bump socket is the input socket to connect any texture and the Bump_Strength interface socket establishes the amount of bump influence.

Note

The Bump node output is piped to all the three Normal input of the Diffuse, Glossy, and Anisotropic shaders, to keep a consistent effect among all the components.

Similarly, both the Glossy and Anisotropic shaders' Roughness values are driven by a single interface input.

Finally, the same is true for the color of the metal, shared among all the three components of the shader; the Add node in between is to enhance it (optionally you could also expose its Fac value for further tweaking).

For a quite exhaustive list of IOR of materials, you can have a look at the following addresses:

Note that for some material (especially metals), different lists report different IOR values.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset