In this tutorial, you will learn how to blend two materials by their height textures and how to use tessellation and displacement in the scene viewport.
This tutorial builds up on the Materials tutorial.
Note: This tutorial uses PBR textures downloaded from textures.com.
Download the tutorial files.
Download the Medium 1024x1024 Bark Debris 2 textures from textures.com.
The bark debris material from textures.com includes all the images that define the material, but we'll also add a Perlin noise image to control the low frequency height texture.
Create a Material node .
Drag and drop into the the node graph the bark debris 2 images.
Set the format of the bark debris material normal image to Normal. Set the format of the bark debris material roughness image to Value. Set the format of the bark debris material ambient occlusion image to Value. Set the format of the bark debris material height image to Value.
Create a Perlin Noise node . Set the image size to 1024 x 1024. Check Saturate to generate values that cover fully the 0.0 to 1.0 range.
Create a To Value node . Connect [Perlin Noise › image] to [image › To Value]. This To Value node will control the low frequency of the height texture defined by the Perlin Noise.
Create a To Value node . Connect the bark debris material height node output to the new value node. [Reader › image] to [image › To Value]. This To Value node will control the high frequency of the height texture defined by the image.
Create a Value Add node . Connect the output of the two To Value nodes to the inputs of the Value Add node.
Connect the images to the Material node inputs.
In the Material node set Metalness to 0.0.
Create a Scene Material node and connect it to the output of the Material node. The Scene Material node connects the material textures to the PBR textures in the Scene Viewport.
Open the Scene Viewport to preview the material.
In the Scenes window add a new scene by clicking the [+] button next to the scenes list.
In the Scene group click the File button and open the plane_10x10.obj file.
Select the Plane10x10 object and set the tessellation to 10.0 and the displacement to 5.0.
Click the [+] button at the top-left of the Scene Viewport to open the Scene Viewport Settings window.
Load an sky image and adjust the exposure and multiplier. Note: Free HDR images at sIBL Archive.
Drag and Drop the Rope images into the Node Graph.
Set the format of the rope normal image to Normal.
Set the format of the rope roughness image to Value.
Set the format of the rope height image to Value.
Create an Ambient Occlusion node and connect it to the rope height image. Set the radius to 20.0. This will generate ambient occlusion shadows from the height map.
Create a To Value node and connect it to the rope height image. Set min to 2.5 and max to 5.5. This node will control the height texture of the rope material.
Create a Material node and connect the images. Set the metalness value to 0.0.
Add a Material Transform node .
Connect [Material › material] to [material › Material Transform]. Move and rotate the rope a little bit, trying to place it close to the center of the bark debris material.
Add a Material Blend Height node .
Connect the bark debris material as a_material.
Connect the rope material as b_material.
Now we can adjust the height values of the two materials to improve the blending.
Activate the To Value node that controls the low frequency height texture of the bark debris material and set min to 2.0 and max to 5.0.
Activate the To Value node that controls the high frequency height texture of the bark debris material and set min to 0.0 and max to 2.0.
Activate the To Value node that controls the height texture of the rope material and set min to 2.5 and max to 5.5.
Activate the Material Blend Height and set delta to 0.1 to reduce the size of the blending region between the two materials.
Activate the Transform node and move the rope to another position. Be careful not to move parts of the rope images outside the bark debris images.