Create keyer
create_keyerComposite a keyed subject over any background in TouchDesigner using chroma, luma, or RGB keying, with adjustable tolerance and softness for clean edges.
Instructions
Composite a keyed performer, logo, or any source over a background visual — the green-screen / chroma-key / matte tool for installations and live camera work. Creates a self-contained baseCOMP under parent_path that holds the full chain: source (Select TOP or test card) → key stage → composite → Null TOP output. Three key_type modes: 'chroma' (Chroma Key TOP, keys on Hue/Sat/Val range — best for green/blue-screen), 'luma' (Level TOP threshold + Matte TOP — keys by brightness), 'rgb' (RGB Key TOP, keys on R/G/B channel ranges — best for a solid background colour). key_color sets the target colour to remove (chroma/rgb modes); tolerance widens the key range; softness feathers the edge. With a source the footage is pulled in via a Select TOP (so it can live in another container); without one, a constant green test card is used so the chain builds and previews standalone. With a background the composited result is placed over it; without one, a diagonal ramp is used. Tolerance/Softness/KeyColor controls are exposed on the container. Output is a Null TOP. Returns a summary with the container path, created node paths, exposed controls, any node errors, warnings, and an inline preview image.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_keyer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for the keyer COMP. | keyer |
| source | No | TOP to pull the key FROM (e.g. a camera/live source). Omit → a built-in test source. | |
| key_type | No | chroma: green/blue-screen (Chroma Key TOP, keys on Hue+Sat+Val range); luma: brightness key (Level TOP + Matte TOP, keys on luminance); rgb: key a specific RGB color (RGB Key TOP, keys on R/G/B channel ranges). | chroma |
| softness | No | Edge softness/feather. | |
| key_color | No | (chroma/rgb) Hex color to key out. | #00ff00 |
| tolerance | No | Key tolerance/range. | |
| background | No | TOP to composite the keyed result OVER. Omit → a built-in test background. | |
| resolution | No | Output resolution [w,h]. | |
| parent_path | No | Where to build it. | /project1 |