askvity

How to Mix Two Displacement Maps in Blender?

Published in Blender Texturing 4 mins read

To mix two displacement maps in Blender, you typically use a Mix Node (specifically a Mix Color node) controlled by a mask texture. This allows you to control where each displacement map affects your geometry.

Mixing displacement maps is similar to mixing other textures or even shaders. As highlighted in the referenced video (relevant section around 3:07 - 16:11), you can use the exact same mask for mixing textures (like displacement maps or height maps) as you might use for mixing shaders. This ensures that the areas where you blend materials or textures are aligned. You can plug the mask into the factor input of a Mix node, such as an RGB Mix node (now commonly found under Mix Color), to blend the two displacement textures before they are applied.

Step-by-Step Guide to Mixing Displacement Maps

Here's a breakdown of the process using Blender's Shader Editor:

1. Set Up Your Materials and Displacement

  • Ensure your material is ready to accept displacement. In the Material Properties tab, under 'Settings' > 'Surface' > 'Displacement', set it to 'Displacement Only' or 'Displacement & Bump'.
  • Add a Displacement node (Add > Vector > Displacement).
  • Connect the output of the Displacement node to the 'Displacement' input of the Material Output node.

2. Load Your Displacement Maps

  • Add two Image Texture nodes (Add > Texture > Image Texture).
  • Load your first displacement map into one node and your second displacement map into the other.
  • For accurate displacement, set the 'Color Space' for these texture nodes to 'Non-Color Data'.

3. Add the Mixing Node

  • Add a Mix Color node (Add > Color > Mix Color). In older Blender versions, this might be 'Mix RGB' (Add > Color > Mix RGB).
  • Set the blend mode of the Mix Color node to 'Mix'.
  • Connect the output of your first displacement map Image Texture node to the 'Color1' input of the Mix Color node.
  • Connect the output of your second displacement map Image Texture node to the 'Color2' input of the Mix Color node.

4. Create or Load Your Mask

  • Add another Image Texture node (Add > Texture > Image Texture) for your mask.
  • Load your mask texture into this node. A mask is typically a grayscale or black-and-white image where white areas represent one displacement map being fully visible, black areas represent the other being fully visible, and gray areas represent a blend.
  • Set the 'Color Space' for the mask texture node to 'Non-Color Data'.

5. Connect the Mask to the Mix Node

  • Connect the output (Color or Alpha) of your mask Image Texture node to the 'Factor' input of the Mix Color node. This tells the Mix node how to blend Color1 and Color2 based on the mask's values.

6. Connect the Mixed Result to Displacement

  • Connect the 'Result' output of the Mix Color node to the 'Height' input of the Displacement node.

7. Adjust Displacement Settings

  • In the Displacement node, you can adjust the 'Scale' to control the overall strength of the displacement effect.
  • You can also adjust the 'Midlevel' if your displacement maps are not centered around 0.0 (e.g., if 0.5 represents no displacement).

Node Tree Overview

Here's a simplified view of the node connections:

Node Connects To Purpose
Displacement Map 1 (Image Texture) Mix Color (Color1) First displacement source
Displacement Map 2 (Image Texture) Mix Color (Color2) Second displacement source
Mask Texture (Image Texture) Mix Color (Factor) Controls the blend areas
Mix Color Displacement (Height) Blends the two displacement maps
Displacement Material Output (Displ.) Converts height/normal to disp.
Material Output - Final material result

Using this setup allows you to blend different displacement effects seamlessly across your model based on the visual information in your mask texture.

Related Articles