Hi everyone, I have developed a commonly used dissolve technique for myself and I want to share this to the public. This approach enables you to have flexible edge and manage the value within a normalized range of 0-1, making it convenient and effective.
How it works?
Essentially, I generate a band with an edge spanning from (edge - 0) to (1 - edge).
The fundamental mathematics behind this:
First, let’s create a MF_Dissolve. (You can use smoothstep instead of my myLerp node, it’s mainly to keep value linear). The code inside the custom node is:
return clamp((gradient-min)/(max-min),0,1);
Then, you can extract the edge by flooring the result and subtract it from the result.

To push it further, after isolating the edge, you can do this to control the midpoint of the gradient.
To achieve this, I make it into a MaterialFunction named MF_GradientRemap.
- Final look of the usage:
Examples:
And that’s it – simply create a material function for all the aforementioned steps, and from now on, effortlessly add stylish dissolves to your work!