In: Atomic Nodes
Since SD 5.0+
The Distance node creates an outward linear fade (gradient) from any pixels in the input max over 0.5 grayscale value.The expanding outward fade will terminate as soon as it meets another cell: they will never overlap. Internally this is actually calculating and displaying the distance to the nearest pixel > 0.5, with the distance node set as a clamp/maximum. An optional source map allows for combining the cells with the texture from a secondary input map.
The distance node is not an easy node to master, but it's main use cases are expanding existing masks in a reliable way (as compared to blurring and adjusting contrast), generating Voronoi-type noise cells, and beveling existing shapes with a sharp, linear profile (that can be remapped later. See the below examples for more info.
- Mask: Grayscale
Used to compute the distance fade.
- Source: Color or Grayscale.
Optional source for additional coloring/value modification.
- Color Mode: Color, Grayscale
Choose output mode, also changes the Source Input type.
- Maximum Distance: 0-256
Set the maximum expansion range for a cell.
- Combine Source/Distance: Combine, Only Source
Determine how the optional Source Input is combined with the final cells. Combine will combine the Source input value with the fading linear mask, Only Source will result in solid color only from the Source input.
- Distance Mode: Euclidean, Manhattan, Chebyshev
Set the distance metric to be used, affects shapes strongly.
To see how to create the third example, download this file: Voronoi.sbs (Created in SD 2018.3.1).