All the metal materials you can see in the following screenshot (pewter, gold, silver, chromium, and aluminum) were obtained from a single shader node group linked and applied to each Suzanne with different interface settings.
To take a look at the scene, open the 9931OS_04_metals.blend
file. In this recipe, we will build the generic Metal node group shader. You can find it in the 9931OS_04_metal_group.blend
file, as shown in the following screenshot:
Now we are going to create the node group by performing the following steps:
Now we must expose all the values necessary to tweak the node group for the different types of metal:
1.000
. Drag its second Value input socket to the Group Input node, label the new socket as Coated
, and then connect the Value output to the Bright input socket of the Bright/Contrast node. In the Interface subpanel under the Properties panel, set the Max value for the Coated socket to 1.200
, as shown in the following screenshot:Aniso_Amount
. Click and drag the Anisotropy socket of the Anisotropic BSDF shader node into a new, empty socket. Repeat this step for the Rotation input socket.Bump
. Repeat this step for the Distance and the Strength sockets, and rename the sockets Bump_Distance
and Bump_Strength
, respectively.Metal
. Although this is not "strictly necessary here, you can also click on the F icon on the interface to activate the fake user for the node group.Metal_group.blend
.The effect of this node group is mainly based on the IOR value (the refractive index of a material is a number that describes how light propagates through that material or gets reflected on its surface). This value can be quite different for each kind of metal. In the node, the exposed IOR value drives the amount of blending of the Diffuse component with the Mirror component made by the Glossy BSDF and Anisotropic BSDF shader nodes combined, but that can also be mutually blended accordingly to the Aniso_Amount value.
The Anisotropy and Rotation values of the Anisotropic BSDF shader are exposed as well. and the same for the Tangent input if a particular mapping option must be used (for example, a layer of UV coordinates).
Textures must be connected to the Bump input socket on the Bump node. The Bump_Strength socket establishes the amount of bump influence. The Bump_Distance socket is a multiplier for the strength of influence. The Bump node output is piped to all the Normal input of the Fresnel, Diffuse BSDF, Glossy BSDF, and Anisotropic BSDF nodes to keep a consistent effect among all the components. Similarly, both the Glossy BSDF and Anisotropic BSDF nodes' Roughness values are driven by a single-interface input.
Finally, let's discuss the color of the metal. The color that arrives at the Diffuse BSDF shader by passing through the Bright/Contrast node gets modified by a Coated value larger than 0.000
. The result is a different input for the mirror component. The Subtract-Math node simply inverts the effect of the numeric input of the Coated socket.
Besides the links provided at the end of the previous chapter, for a list of IORs, you can take a look at these links:
3.144.232.137