Most of the time, realistic surfaces and renders require you to have a fair number of texture types used - dfifuse, specular, displacement, roughness, etc. However, if you have no access to specialized software like CrazyBump, Knald, Bitmap2Material, and the like, this can be a problem.
In this brief tutorial/article, I’ll show you how you can use one image texture and generate commonly-used texture maps out of it - using Blender’s Cycles material nodes. Some of which I've used on my Cycles Material Studies. However, the techniques presented here are also applicable with other software packages.
By the end of this tutorial, you should have a basic understanding on how to manipulate image textures using a variety of node techniques.
To start off, prepare a simple Diffuse and Glossy material mixture with an image texture as diffuse input. Not pretty at the moment, but we’ll improve this in the next steps.
2 Creating Diffuse Gradient
This step is totally optional but adding it can add that bit of realism to your shader, at least for me personally. ;) Create the gradient effect on the diffuse shader by using an RGB Curves(Add > Color > RGB Curves) node to darken the base color and mix(Add > Shader > Mix Shader) this with the original diffuse node using a Layer Weight(Add > Input > Layer Weight) as factor.
3 Creating the Specular Map
The Spec Map is a texture type that dictates which parts are glossy/specular based on the grayscale values that it has. Fortunately in Blender, this is as easy as attaching an RGB to BW node (Add > Converter > RGB to BW) to the base image and controlling the influence with a ColorRamp node (Add > Converter > ColorRamp).
4 Adding Physically-based Shading
In reality, non-metallic/dielectric objects and surfaces produce more-defined reflections at grazing angles, also referred to as fresnel reflectance.
Using the information we have from the Layer Weight node in step 2, we will subtract (Add > Converter > Math) the value with the Spec Map generated in step 3.
We will then use the output of this node setup as the Factor input for the Mix Shader. This achieves two effects in one: fresnel reflectance and specularity map.
5 Creating the Roughness Map
This map basically tells Blender which parts of the shader has rough glossy surfaces. To do this, simply add another ColorRamp node and use the same RGB to BW node that we used in the previous steps as Factor input.
Attach the Color output of the ColorRamp node to the Roughness input of the Glossy BSDF node. We now have a pseudo-roughness mask that we can tweak however we wish via the ramps of the ColorRamp node.
6 Creating the Normal Map
It works more like a workaround compared to what you would normally achieve when using dedicated normal maps, but the effects are relatively close and indistinguishable.
Add a Bump node (Add > Vector > Bump) and attach the Value output of the RGB to BW node into its Height input. To see the effects on the shaders, connect the Normal output into the Normal inputs of the corresponding shaders.
7 Creating the Displacement Map
Deriving the same techniques previously discussed, we’ll be creating the material bump, on top of the already existing normal maps, for even more realism.
Attach the Value output of the RGB to BW node to a ColorRamp node and adjust the sliders, creating a compact transition from pure black to pure white.
Add a Math node set to Multiply and attach it to the Displacement input of the Output node. The value in the second slider dictates this map’s intensity.
8 Creating the Cavity Map
In conjunction with the displacement map, this type of map will imply effects like dust and dirt forming in the crevices, occlusion effect, and the like.
Add a Diffuse BSDF node and set it to close to dark gray (or something similar) and mix it via a Mix Shader node with the existing shader mixture (Diffuse and Glossy) that we had earlier.
Now we just need to specify which parts will have the cavity masks. Add a ColorRamp node like we did in step 7 and instead of using pure black for the left color slider, use a grayish color.
And finally, connect the Color output of the ColorRamp node to the Factor input of the Mix Shader.
The procedures, techniques, and workarounds presented here are only touching the surface of what is possible with nodes. In combination with other effects like scratches, surface dusts, and the like, this will be a powerful addition to your workflow as an artist. I highly suggest you to explore further, break down what I have presented, and eventually come up with something more intuitive and effective.
If you like this article, spread the word, leave me a comment, and share it with your friends.
Also post your renders below. I'd love to see them!
And if you fancy, you can visit me on the following links: