HSV Keyer

HSV Keyer operator properties for Script Engine. Hue/saturation/value chroma keyer with a colour picker, optional clean plate, optional secondary key colour, luminance thresholds, spill suppression, and garbage matte support. Useful for green/blue screen virtual studios, weather presenters, news inserts, gaming streamers, and any keying job where you want flexible hue-based control and a single tool for most production cases. Pairs well with Light Wrap and Spill Suppression for final compositing.

Property Type Access Description
ShowAdvancedOptions bool get/set Reveals additional fine-tuning controls (interpolation, clean plate, secondary key, luminance, spill balance). Leave off for simple use; turn on for tricky keys.
KeyChannel KeyChannel get/set KeyChannel — which colour channel the screen is on (Green, Blue, or None). Determines spill suppression behaviour. Pick the channel matching your physical screen so the keyer cleans the correct edges.
KeyerOutput KeyerOutput get/set KeyerOutput — what the operator outputs (Final, Foreground, Alpha, Spill, Garbage, Background, etc.). Switch to Alpha or Spill while tuning to see exactly what the matte and suppression are doing; switch back to Final for the result.
Interpolation Interpolation get/set Interpolation curve at the matte's soft edge (Linear, Cardinal, etc.). Smoother curves give more natural transitions for hair and motion blur; sharper curves keep edges crisp.
PreserveInputAlpha bool get/set Combine the keyer matte with any existing alpha in the input image so already-transparent regions stay transparent. Enable when the input already has an alpha channel you want to respect (e.g. pre-composited graphics).
PickKeyColorCommand Command get Open the colour picker to sample the key colour directly from the preview. Fastest way to tune the key — sample several spots on the screen and watch the matte settle.
KeyHue int get/set Centre hue of the key colour. [min=0, max=360]. Set to your screen's hue — green is around 120, blue around 240. Picking the colour from the preview is usually faster.
HueTolerance float get/set How wide a hue range counts as the key colour, with built-in softness. [min=40, max=140, default=90]. Raise to catch a wider band of screen variation; lower to protect coloured foreground details near the screen hue.
KeySaturation int get/set Centre saturation of the key colour. [min=0, max=100]. Higher values target vivid screens; lower values target washed-out or pale backdrops.
KeyValue int get/set Centre brightness of the key colour. [min=0, max=100]. Set close to the actual brightness of your screen for tight keys; widen tolerance for unevenly lit screens.
UseCleanPlate bool get/set Use a clean plate (a still photo of the empty screen) as the key reference instead of fixed HSV values. Best when the screen has uneven lighting or hot spots that fixed HSV cannot fully cover.
CleanPlateUri Uri get/set Path to the clean plate image file. Capture with the same camera, lens, exposure and lighting as the live shot.
UseSecondaryKey bool get/set Enable a second hue range to key out additional colours. Useful when the background has two distinct colours (e.g. green wall and blue floor) or when set elements need separate handling.
PickSecondaryKeyColorCommand Command get Open the colour picker to sample the secondary key colour directly from the preview.
SecondaryKeyHue int get/set Centre hue of the secondary key colour. [min=0, max=360].
SecondaryHueTolerance float get/set How wide a hue range counts as the secondary key, with built-in softness. [min=40, max=140, default=90].
SecondaryKeySaturation int get/set Centre saturation of the secondary key colour. [min=0, max=100].
SecondaryKeyValue int get/set Centre brightness of the secondary key colour. [min=0, max=100].
UseLuminance bool get/set Restrict the key to a brightness range so only pixels in that range can become transparent. Useful for protecting bright highlights or dark shadows on the foreground that share the screen's hue.
LuminanceThresholdMin int get/set Pixels darker than this percentage are protected from being keyed out. [min=0, max=100, default=30]. Raise to protect dark foreground areas (shadows, dark hair) from being mistakenly removed.
LuminanceSlopeMin int get/set Width of the soft falloff above the minimum luminance threshold. [min=0, max=100, default=50]. Raise for a gentler transition into the protected dark area; lower for a hard cutoff.
LuminanceThresholdMax int get/set Pixels brighter than this percentage are protected from being keyed out. [min=0, max=100, default=100]. Lower to protect bright highlights (e.g. light hair, reflections) from being mistakenly removed.
LuminanceSlopeMax int get/set Width of the soft falloff below the maximum luminance threshold. [min=0, max=100, default=50]. Raise for a gentler transition out of the protected bright area; lower for a hard cutoff.
ResetLuminanceThresholdCmd Command get Reset all luminance threshold settings to their defaults (min=30, max=100, slopes=50).
AlphaPed int get/set Adds a fixed offset (pedestal) to the matte. [min=-255, max=255, default=0]. Positive lifts transparent areas toward opaque; negative pushes them toward fully transparent.
AlphaGain int get/set Multiplies the matte values to make the foreground more or less opaque. [min=-255, max=255, default=0]. Raise to recover edges that have gone too transparent; lower if foreground starts showing background bleed.
ResetPedGainCmd Command get Reset AlphaPed and AlphaGain to their defaults.
SuppressionType SuppressionTypeV2 get/set Algorithm used to neutralise residual screen colour on the foreground (Average, Maximum, Max2, KeyColor). Try alternatives if the default leaves grey edges or shifts skin tones.
SuppressionAmount int get/set Strength of spill suppression on foreground edges. [min=0, max=100, default=100]. Lower if skin or hair starts looking magenta/yellow; raise if green/blue tint is still visible.
LumaRecover int get/set Restores brightness lost during spill suppression. [min=-200, max=200, default=100]. Useful when suppressed edges look unnaturally dark; lower if edges become too bright.
UseSpillBalance bool get/set Enables manual control over the colour written into spill areas via SpillRedBalance, SpillGreenBalance, SpillBlueBalance. Use to push edge colour toward neutral grey or warm skin tones instead of the default neutralised result.
SpillRedBalance int get/set Red component of the spill replacement colour. [min=-255, max=255, default=0].
SpillGreenBalance int get/set Green component of the spill replacement colour. [min=-255, max=255, default=0]. Locked when KeyChannel is Green to avoid re-introducing the screen colour.
SpillBlueBalance int get/set Blue component of the spill replacement colour. [min=-255, max=255, default=0]. Locked when KeyChannel is Blue to avoid re-introducing the screen colour.
CalibrateBalanceCommand Command get Auto-tune SpillRedBalance, SpillGreenBalance, SpillBlueBalance based on the current key colour and suppression settings. Quick way to get a sensible starting point for spill balance that you can then refine manually.
ResetBalanceCmd Command get Reset the spill balance offsets to zero.
UseGarbageMatte bool get/set Enables the loaded GarbageMatteSourceUrl image. Useful for excluding lighting rigs, microphone booms, or set edges that the keyer would otherwise have to handle.
GarbageMatteSourceUrl Uri get/set Path to the garbage matte image (white = keep, black = remove). Paint over hardware visible in the frame so the keyer never has to consider it.
GarbageMatteXOffset int get/set Horizontal offset of the garbage matte image, in pixels. Use to nudge a precomposed matte into alignment if the camera has shifted slightly.
GarbageMatteYOffset int get/set Vertical offset of the garbage matte image, in pixels. Use to nudge a precomposed matte into alignment if the camera has shifted slightly.
GarbageMatteSourceLayer LayerRenderInfo get/set Use another layer's rendered output as a live garbage matte (experimental). Useful when the matte should track changes — e.g. a separate animated mask layer.
UseGarbageMatteSourceLayer bool get/set Enable the experimental layer-based garbage matte (uses GarbageMatteSourceLayer instead of an image file).
Minilog FormattedMessage get/set Status message about clean plate / garbage matte loading and runtime warnings.

Inherits from: AbstractOperator, AbstractAudioMetering.

See also: HSV Keyer in Operators — user-facing introduction, screenshots, and section summaries.