Blends two or more maps together using the specified blend algorithm. This generator acts quite similar to the layer blending mode in Photoshop or other graphics editor. Think of the most bottom “Base” map input as a background layer, and the layers above are the blending layers.
Use cases:
Green grass mask texture multiplied with the random noise mask
Properties:
Each layer (except the Base one) has the algorithm and opacity properties.
- Algorithm - determines how exactly the layers are blended
- Opacity
- the blending layer opaqueness factor. If the value is 0 the blending result is not visible.
Here are the algorithms the blend generator offers:
- Mix: simply blends two maps using the opacity value Algorithm’s formula is { return b };
- Add: adds the Blend layer to the Base layer, i.e. the sum of the layers { a+b; }
- Subtract: subtracts the Blend layer from Base layer { a-b; }
- Multiply: multiplies the two layers. Note that since input values in most cases are less than 1, the multiplied value would be lesser than any of the input ones. { a*b; }
- Divide: the opposite of Multiply. The result can often exceed 1, so use it with care. { a/b; }
- Difference: the delta value between two layers { Mathf.Abs(a-b); }
- Min: the minimum value between both layers. { Mathf.Min(a,b); }
- Max: the maximum value between both layers. Try experimenting with Min and Max blend algorithms as they can bring clean and useful results { Mathf.Max(a,b); }
- Overlay: this effect is often used to process images but the feasibility of using it for blending height or splat maps is questionable.
if (a > 0.5f) return 1 - 2*(1-a)(1-b);
else return 2a*b;
Algorithm examples for the graph scheme:
Algorithm: Mix, Add, Subtract, Multiply, Difference, Min, Max
In current case base layer (voronoi) opacity is always 1, and the algorithm is always additive. Blend mode is changed for Noise only. In Mix mode opacity is set to 0.5
Most common blend algorithms for masks are Add and Multiply.
Add will blend two masks in "OR" mode, combining their allowed zones
While applying map with Multiply will blend it in "AND" mode, combining their restricted zones