Docs Visual
InstanceTrailer
Turns one moving image into a trail of its recent frames: a cache laid out in a row or column with exponent-shaped spacing, plus the offsets as a CHOP for instancing.
◧ Visual ◆ Patreon · Base
Why use it
To show where something has been, a dancer's silhouette, a hand, a moving logo, you keep its last frames around and draw several of them at once. By hand that is a Cache TOP, a Cache Select TOP per copy with its own offset, and a Layout TOP to put them side by side. Changing the number of copies or how far back they reach means editing every select.
InstanceTrailer builds and maintains that chain. It caches the incoming frames and lays the most recent ones out side by side, oldest at one end and newest at the other. You set how many copies, how far back they reach and how they are spaced in time. The layout is a texture, and the same layout rides out as a CHOP, which is what an instanced geometry needs to draw the trail in 3D.
Features
- Trail of recent framesCaches incoming frames while an input is wired and lays the latest copies side by side, oldest at one end, newest at the other.
- Reach and copy countSet how many copies the trail holds and how many frames back the oldest one reaches.
- Shape the time spacingAn exponent spaces the delays, so the copies bunch up near the present or fan out evenly into the past.
- Row or column layoutLays the copies out left to right, right to left, top to bottom or bottom to top.
- CHOP output for instancingA second output carries the trail as a CHOP in the same layout as the texture, for instanced geometry or CHOP-side use.
How to use it
- Create it from the FNS tab of the OP Create dialog.
- Wire a moving image into it: a movie, a camera, a keyed silhouette. The cache records only while something is wired in, so the older copies fill in once it has recorded that far back.
- Set Depth, the number of copies in the trail, the live frame included. After changing it by a large amount, pulse Recreate All Operators to rebuild the copies.
- Set how far back the trail reaches with Cache Size. It is clamped to Max Cache Size, the number of frames the cache holds; raising that allows longer trails and uses more GPU memory.
- Shape the spacing with Exponent Value. At 1 the copies are spread evenly through the cache, higher values bunch them near the live frame, and 0 puts every copy on the same frame. Direction sets the sign and strength of the offset: positive values delay the copies into the past, negative values reverse their order.
- Choose the layout with Align: left to right, right to left, top to bottom or bottom to top.
- For 3D, take out2: the same trail as pixel data in a CHOP, ready for a Geometry COMP's instancing or anything else on the CHOP side.
Inputs and outputs
- in1 (TOP): the frames to trail. The cache records only while something is wired in.
- out1 (TOP): the laid out trail.
- out2 (CHOP): the trail as pixel data (one sample per pixel of a second, identical layout, r g b a channels), for instancing or CHOP-side use; the first block is the newest copy and the last block the oldest, matching out1 top to bottom.
Get it
This tool unlocks with Patreon. It installs through the same picker as everything else and unlocks with the Patreon Base tier or higher, connected from inside TouchDesigner. Everything else in the toolkit stays free and MIT, and the membership is what keeps that work moving.
Parameters
Custom
| Control | Type / default | What it does |
|---|---|---|
DepthDepth |
number10 | Number of delayed copies (instances) drawn in the trail, the live frame included. |
Max Cache SizeMaxcachesize |
number300 | Frames the cache holds. The trail cannot reach further back than this; larger values use more GPU memory. |
Cache SizeCachesize |
number300 | How many frames back the oldest copy reaches. Clamped to Max Cache Size: the cache holds nothing further back, so a larger value would read empty slots. |
DirectionDirection |
number1 | Direction and strength of the time offset, -1 to 1. Positive values delay the copies into the past, negative values reverse the order; at +-1 the oldest copy reaches Cache Size frames back. |
Exponent ValueExpval |
number1 | Exponent that spaces the delays: 1 is even spacing, higher values bunch the copies near the live frame. 0 puts every copy on the same frame. |
AlignAlign |
menuTop to Bottom | How the copies are arranged in the output layout. |
Recreate All OperatorsRecreateall |
button | Rebuild every replicated copy, for example after changing Depth by a large amount. |