Directional distance

Anisotropic Kuwahara Grayscale icon {width="200px"}

In: Filters > Effects

Description

Draws a distance gradient from the borders of a mask in a specified direction.

Overlapping gradients are sorted by inverted normalized distance so that the distance to the closest border is drawn.

The distance of the gradient can be dynamically adjusted along the border using a distance map.

TIP
The Bevel smooth node offers similar capabilities, where the dilation is performed in all directions.

Output connectors

Parameters

Input connectors

Input Grayscale PRIMARY
The image from which the mask should be extracted.   All values above 0.5 are white in that mask.
Distance map Grayscale
An optional input used when the value of the ‘Distance Map Multiplier’ parameter is higher than 0.   It is used to adjust the beveling/dilation distance along the borders of the mask, where a darker value results in a shorter distance.
Angle map Grayscale
An optional input used when the value of the ‘Angle Map Multiplier’ parameter is higher than 0.   It is used to adjust the direction of the distance gradient by adding its value to the direction angle, in number of turns. The ‘Angle Map Offset’ parameter lets you remap the values by specifying which value is 0.

Output connectors

Output Grayscale
The result image according to the selected ‘Output Mode’.
UV Color
A UV map where the UVs are dilated from the mask borders along the specified direction.   This can be connected to a UV Mapper node to map any other image using these dilated UVs.

Parameters

Output mode Integer

The method of drawing the distance gradient from the mask borders:

  • Inverted Normalized Distance: A gradient from 1 to 0 where 0 is reached at the ‘Maximum Distance’, multiplied by the ‘Distance Map’ if connected
  • Distance: A gradient of raw distance values from the mask border, where 1 is the length of the shorter side of the input image
Maximum distance Float
The distance travelled by the distance gradient, in normalized image space where 1 is the length of the shorter side of the input image.
Angle Float
The direction of the distance gradient in number of turns, where 0 is horizontal and to the right – I.e., a (1,0) vector.
Distance map multiplier Float
Adjusts the impact of the ‘Distance Map’ over the ‘Maximum Distance’.   Note: This parameter has no effect when the ‘Distance Map’ input is not connected.
Angle map multiplier Float
Adjusts the impact of the ‘Angle Map’ over the ‘Angle’.
Angle map offset Float
Remaps the values in the ‘Angle Map’ by specifying which value in that map should be 0.   E.g., an offset of 0.5 means that a value of 0.75 is 0.25 turns, and a value of 0.3 is -0.2 turns.

Examples

table 0-row-2 html-authored no-header
directional_distance_example_1_before
Before
directional_distance_example_1_after
After
table 0-row-2 html-authored no-header
directional_distance_example_3_before
Before
directional_distance_example_3_after
After
table 0-row-2 html-authored no-header
directional_distance_example_2_before
Before
directional_distance_example_2_after
After
table 0-row-2 html-authored no-header
directional_distance_example_5_before
Before
directional_distance_example_5_after
After
directional_distance_example_4_before
Before
directional_distance_example_4_after
After
recommendation-more-help
dd48abc6-e399-43d2-9777-578ec70c5a23