Mixing textures using the blendColors utility


When I want to blend two textures together I often like to use the blendColors utility for a few reasons: [1] It is easy to use. [2] It is easy to see how it is working in the hypergraph display. [3] It renders faster than the Layered Texture node (and the Layered Texture node renders faster than the Layered Shader node.)

First create a new material (phong) and then create a blendColors utility from the menu, "Create > Color Utilities > Blend Colors".

MMB drag the blendColors node onto the new phong material and connect it to the color input.
In the attribute editor for the blendColors, you will see "Color1", "Color2", and "Blender". Drag the Blender slider back and forth to see how it works as a mixer for the two colors.

Create two File texture nodes and connect each of their color outputs to the Color1 and Color2 on the blendColors node. You can now use the Blender to fade between the two textures. (You could animate the Blender channel for a material that dissolves from one texture to another.)

For a "marble-like" combination of the two textures, you can use a third texture as the input for the Blender control. In this example, a fractal texture is used. The fractal attributes are set with a high amplitude for sharper transitions from one texture to the other:

This can be of great use for creating textures with less obvious repeating patterns. File textures #1 and #2 could be very similar, but their place2dTexture nodes could have very different repeat settings or rotations. The fractal will blend the two to create irregular patterning - good for marble, ground textures, etc.

A Layered Texture node can have the exact same result. Connect the output of each file texture to the Layered Texture's inputs[n].colors respectively, and connect the alpha output of the fractal to the inputs[0].alpha. The Layered Texture node allows you to have more than two textures composited over one another, and with more options for how the compositing is processed.