Create slit-scan
create_slit_scanCreates a slit-scan visual system in TouchDesigner, sampling past frames per row/column for a time-stretch effect. Includes cache ring buffer, shader, and optional synthetic source for headless use.
Instructions
Build a slit-scan visual system: each row (or column) of the output samples a different past frame from a Cache TOP ring buffer, producing the classic 'time-as-space' stretched-time look (Floris Kaayk / Adam Magyar style). Creates a new baseCOMP under parent_path holding a source TOP, a Cache TOP ring buffer, a slit GLSL shader, and a Null output. When no source_top_path is given, a synthetic Noise TOP is used so the tool works headless / on CI without camera permission. Exposes a live 'Depth' knob. Note: GLSL compile is UNVERIFIED offline; cacheTOP 2D-array binding must be validated live in TouchDesigner. Memory cost at 1080p RGBA16 is ~depth × 32 MB; depth 600 ≈ 5 GB VRAM. Output freezes when the timeline is paused (cacheTOP stops recording — expected behaviour). Returns a summary plus a JSON block with the container path, created node paths, output path, exposed controls, 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_slit_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| axis | No | Screen axis that carries time. 'y' = each row is a different past frame; 'x' = each column (default 'y'). | y |
| name | No | Container name for the slit-scan system (default 'slit_scan'). | slit_scan |
| direction | No | Which end of the axis is 'now'. '+y' = bottom row is the latest frame, top is oldest; '-y' reverses it. Must be compatible with axis (default '+y'). | +y |
| cache_depth | No | Number of frames stored in the Cache TOP ring buffer (1–600, default 60). Memory cost: ~depth × W × H × 16 B at RGBA16. At 1080p, 600 frames ≈ 5 GB VRAM. | |
| parent_path | No | Parent network where the slit-scan container is created (default '/project1'). | /project1 |
| expose_controls | No | When true (default), expose a live 'Depth' knob on the container bound to cache.cachesize. | |
| source_top_path | No | Optional path to an existing TOP to scan (e.g. '/project1/videodevicein1'). When omitted a synthetic noiseTOP seed is created inside the container so the tool runs headless / on CI without camera permission. |