- Interface
- Customizing your workspace
- Home screen
- Main toolbar
- Preferences
- Explorer
- Graph view
- Library
- Properties
- 2D view
- 3D view
- Dependency manager
- Resources
- Importing, linking and new resources
- Bitmap resource
- Vector graphics (SVG) resource
- 3D scene resource
- AxF (Appearance eXchange Format)
- Font resource
- Warnings from dependencies
- Substance graphs
- Substance graph key concepts
- Creating a Substance graph
- Instances and subgraphs
- Graph parameters
- Manage parameters
- 'Visible if' expressions
- Inheritance in Substance graphs
- Output size
- Values in Substance graphs
- Publishing Substance 3D asset files (SBSAR)
- Exporting bitmaps
- Exporting PSD files
- Sample Substance graphs
- Warnings in Substance graphs
- Substance function graphs
- What is a Substance function graph?
- Create and edit a Substance function
- The Substance function graph
- Variables
-
FX-maps
- FX-Maps
- How it works
- The Iterate node
- The Quadrant node
- Using Substance function graphs in FX-Maps
- Warnings in Substance function graphs
- Sample Substance function graphs
- Nodes reference for Substance function graphs
- Scripting
- Plugin basics
- Plugin search paths
- Plugins packages
- Plugin manager
- Python editor
- Accessing graphs and selections
- Nodes and properties
- Undo and redo
- Application callbacks
- Creating user interface elements
- Adding actions to the Explorer toolbar
- Using color management
- Using spot colors
- Logging
- Using threads
- Debugging plugins using Visual Studio Code
- Porting previous plugins
- Packaging plugins
- Scripting API reference
- Substance 3D home
- User guide
- Glossary
- Getting started
-
Interface
- Interface
- Customizing your workspace
- Home screen
- Main toolbar
- Preferences
- Explorer
- Graph view
- Library
- Properties
- 2D view
- 3D view
- Dependency manager
-
Resources
- Resources
- Importing, linking and new resources
- Bitmap resource
- Vector graphics (SVG) resource
- 3D scene resource
- AxF (Appearance eXchange Format)
- Font resource
- Warnings from dependencies
-
Substance function graphs
- Substance function graphs
- What is a Substance function graph?
- Create and edit a Substance function
- The Substance function graph
- Variables
-
FX-maps
- FX-Maps
- How it works
- The Iterate node
- The Quadrant node
- Using Substance function graphs in FX-Maps
- Warnings in Substance function graphs
- Sample Substance function graphs
- Nodes reference for Substance function graphs
- MDL graphs
- Bakers
- Best practices
- Pipeline and project configuration
- Color management
- Package metadata
-
Scripting
- Scripting
- Plugin basics
- Plugin search paths
- Plugins packages
- Plugin manager
- Python editor
- Accessing graphs and selections
- Nodes and properties
- Undo and redo
- Application callbacks
- Creating user interface elements
- Adding actions to the Explorer toolbar
- Using color management
- Using spot colors
- Logging
- Using threads
- Debugging plugins using Visual Studio Code
- Porting previous plugins
- Packaging plugins
- Scripting API reference
- Technical issues
- Release notes
Distance
In: Atomic Nodes
Intermediate
Since SD 5.0+
Description
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.
Inputs
- Mask: Grayscale
Used to compute the distance fade. - Source: Color or Grayscale.
Optional source for additional coloring/value modification.
Parameters
- 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.
Examples






To see how to create the third example, download this file: Voronoi.sbs (Created in SD 2018.3.1).