Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated with feedback from editorial

...

Multimedia
namefeature_selector.mp4
width601
height474

Feature Selector in action.

Description

The Feature Selector node allows you to generate generates a grayscale mask from a selection of pixel regions of similar color (referred to as ‘features’) features in the input texture.

The node automatically identifies a set of such defines a feature as a region of pixels. The node identifies features in the input texture . There is no way to automatically. You cannot manually define a feature area, but you can fine-tune the automatic feature definition behavior by adjusting the node properties - specifically Granularity, Color, Regularity, and Smoothness. See more on properties and their effects in use the node properties to influence how the node identifies features. For a list of available properties and what they do, see the Properties section below.

You can To create a selection from one or more features by bringing , you can bring the node into the 2D Viewport and using use the node’s 2D Viewport Overlay.

When you execute the node, it creates and outputs a black and white mask texture. All pixels within The white pixels in this texture represent the features you selected are colored white, and the rest are colored . The rest of the texture is black.

Selecting features in the 2D Viewport

Here are the steps to creating and adjusting a From the features the node identifies, you can select the ones to include in the output mask. To create and adjust a feature selection:

  1. Bring the Feature Selector node into the 2D Viewport.
  2. The 2D Viewport displays an overlay , where that separates the input texture is segmented into regions separated surrounded by black borders. Each region represents a single selectable feature. You can change the overlay color and opacity in the node properties. 
  3. To select a feature, left click (LMB) on its region in the viewport. The region fills with the Overlay Color (teal by default, this is teal), which indicates that it is currently selected. Add To change the color and opacity of the overlay, see Properties.

When using the 2D Viewport Overlay, you can further manipulate the selection in the following ways:

  • To add more features to the selection

...

  • , hold Shift and click on additional regions.

...

  • To remove features from the selection

...

  • , hold Ctrl and click on a region you want to de-select.
  • To invert the selection, use the Invert button in the node properties.

...

  • For a full list of shortcuts

...

  • , see 2D Viewport controls.

Using Lasso Selection

An alternative way to select features is by using the Lasso Selection tool. This allows you to draw a polygonal lasso by placing multiple points in the 2D Viewport. When you close the lasso, the node creates a new selection from the features that are inside the lasso area.Here are the steps to using

Note: The Lasso Selection tool only selects features that are completely enclosed within the lasso area.

To use Lasso Selection:

  1. With the Feature Selector node in the 2D Viewport, press the L key.
  2. A lasso icon appears in place of your mouse cursor. This indicates that the Lasso Selection tool is active. You can press the L key again to deactivate the tool.
  3. To start a lasso selection, left click the point in the 2D Viewport where you want the lasso to begin.
  4. Add To add more points to the lasso by left clicking , click elsewhere in the viewport.
  5. Close To close the lasso by clicking , click the first point you placed.
  6. The By default, the node creates a selection from features inside the lasso area. You can use the Shift and Ctrl keys to add and remove the lassoed area from an existing selection, respectively.

2D Viewport Controls

Below is a complete list of shortcuts for working with the 2D Viewport Overlay.

ActionDescription

LMBLeft-click

Select a single feature by clicking (left-click on its region in the viewport).

Hold LMB Left-click and drag

Select one or more features by dragging (left-click and drag over their regions in the viewport).

CTRL Ctrl + LMBleft-click

Deselect a single feature.

CTRL + hold LMB Ctrl + left-click and drag

Deselect one or more features.

SHIFT Shift + LMBleft-click

Add a single feature to the current selection.

SHIFT + hold LMB Shift + left-click and drag

Add one or more features to the current selection.

L

Press to activate or deactivate the Lasso Selection tool.

Generating a mask from a selection

Once you have a selection ready, you can To create a new mask from it by executing , select the features you want to include and execute the node.

The Feature Selector node outputs the mask as a texture, which you can export or use elsewhere in the Node Graph of your project.

...

Input TypeDescription
Bitmap

The input texture from which you want to select features from.


Output TypeDescription

Bitmap (Mask)

The output mask texture, which contains a representation of the selection.

...

Property/SettingDescription

Granularity

Control Controls the size and number of features which that the node breaks the input texture is broken into. Higher values produce morea higher number of, smaller features.

Color

Control Controls how strongly color similarity influences the formation of feature regions. At higher values, the node is more selective in judging colors as similar. As a result, the feature borders follow different colors more precisely.

Regularity

Control how blocky the features are. At higher values, features maintain a primarily square shape and are more similar to each other in size.

Smoothness

Control Controls the smoothness of feature region borders. At higher values, the node avoids adding many small pixels along feature borders, effectively smoothing them out.

Overlay Color

Set Specifies the color of the selection overlay in the 2D Viewport.

Overlay Opacity

Set Controls the opacity of the selection overlay in the 2D Viewport.

...