Create a Material for 3-Way Texture Blends

This page describes how to set up materials for 3-way (RGB) texture blending.

Choose your operating system:

Windows

macOS

Linux

Blending 3 separate textures can be handled by the Mesh Paint tool very easily, but it does require a special setup in the Material. Consider the following graph:

3-WayBlend.png

Here is an overview of the setup:

  • Each of the color channels (RGB) gets its own Linear Interpolation expression.

  • Each texture plugs into the B input of its corresponding Lerp node.

  • The Lerp corresponding to Texture 1 plugs into the Material, and its Alpha will be driven by the Red channel from the vertex color.

  • The Lerp corresponding to Texture 2 plugs into the A input of the Lerp corresponding to Texture 1, and its Alpha will be driven by the Green channel from the vertex color.

  • The Lerp corresponding to Texture 3 plugs into the A input of the Lerp corresponding to Texture 2, and its Alpha will be driven by the Blue channel from the vertex color.

  • Texture one also wraps around and becomes the A plug for the 3rd and final Lerp. This makes Texture 1 the default texture.

Once this is set up, the Mesh Weight Painting Tool should be active and the Texture Weight Type setting should be set to RGB (Three Textures) .

3-Way_Setting.png

Here is an example of this Material, first with the Mesh viewed in RGB Mode, showing the vertex colors in place. Note that with this setup, red corresponds to Texture 1, green corresponds to Texture 2, and blue corresponds to Texture 3.

3_way_vertexColors.png

And here is the final result:

3_way_Result.png

Notice that where the vertex color in the first image is red (Texture 1) there is no change. This is because Texture 1 is also plugged into the A input of the 3rd Lerp expression (see above), making it the default texture. Essentially, you start with Texture 1 and can paint Textures 2 and 3 down as you see fit, or paint Texture 1 back down over them at any time.

If you were going to be setting up such a Material over and over, this would be a great place to deploy a custom Material Function !

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss