Docs Visual

ThresholdColor

A Threshold TOP that keeps the colour: pixels that pass the test come through in their original colour with a soft edge. An alternative for the Threshold TOP.

◧ Visual OP Create menu entry

Where it appears

Read off the registry hosts in the component, so this is where the tool puts itself in a default install; every one of these can be reordered or hidden from Hub.

What it is

TouchDesigner's Threshold TOP answers a yes or no question per pixel and paints the answer white on black. ThresholdColor asks the same question and keeps the pixel's own colour instead: the Comparator names the pixels that are removed (with Less, every pixel below the threshold goes black), every other pixel keeps its exact RGB, and Soften feathers the boundary. It is the usual first step for isolating the bright or dark part of a picture without losing its colour.

It is the alternative for the Threshold TOP: create a Threshold TOP with the alternatives shortcut held and ThresholdColor is offered in its place, wired into the same spot.

Inputs and output

  • in1 (TOP): the image to threshold.
  • out1 (TOP): the image with only the passing pixels, in colour.

Parameters

Custom

ControlType / defaultWhat it does
ComparatorComparator menuLess The test that REMOVES a pixel (sets it to black): with Less, every pixel whose tested value is below Threshold goes black and the rest keep their colour. Same semantics as the Threshold TOP.
Options: Less, Greater, Less or Equal, Greater or Equal, Equal, Not Equal
RGBRgb menuLuminance Which value of each pixel is compared against Threshold: luminance, one channel, the RGB or RGBA average, or the RGB or RGBA maximum.
Options: Luminance, Red, Green, Blue, Alpha, RGB Average, RGBA Average, RGB Maximum and 1 more
ThresholdThreshold number0.5 The value each pixel is compared against with the Comparator.
AlphaAlpha menuSame as RGB Output alpha: Same as RGB multiplies the input alpha by the pass/fail matte (removed pixels become transparent); One keeps the input alpha untouched.
Options: Same as RGB, One
SoftenSoften number0 Width of the soft edge around the threshold; pixels near it fade between their colour and black instead of cutting hard. 0 is a hard cut.

Edit this page on GitHub →