Simple blending at the Edge of 2 Materials

Hello, if i like to assign multiple different materials by faces to a single object, is there a simple way to blend these two materials at the edge that doesnt involves painting by hand? For time saving and consistency im lookin for a more automatic solution cause im working on a game, also, the somewhat tiley/blocky look of the terrain texturing is intended but i obviously want to get rid of the Sharp edges.

Probably better to use vertex paint for that… just paint white/black and use it as a mask/mix factor.

1 Like

Unfortunately materials assigned in separate slots cannot be smoothly blended between; you have to blend the between the materials inside the same material.

A simple way to do this is to use a vertex paint on the factor of a mix shader node between the two shaders. Vertex paint doesn’t require hand painting and can be done by selecting and filling individual faces or vertices.

Simple example below; vertex painting is still related to the geometry, so it keeps a slightly tiled, blocky look, while smoothing the transition.

Also, if this is for a game project, consider looking into methods of blending in engine; it is usually more flexible, and techniques used in blender might not work in the game engine.

2 Likes

Even better you can use the displacement/height map to complement the vertex paint

1- your height/displacement maps
2- the painted vertices (i inverted it because i messed up)
3- comparing the heights
4- mixing the vertex paint and height diff (to tune which of the two is most prevalent
5- threshold this to a binary value of which material to show

Basically you are showing material 1 in the following case:
h1 < h2 + v + t
with h1 and h2 the respective material heights, v the vertex paint, and t the threshold (ok i skipped the mixing factor in the formula but it would make it way more messy)

1 Like

Thx for the Solutions Lads