Loop
Cycles upstream content over a fixed-length window.
Category: Time Menu path: Time > Loop
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
in | imageRgba16f | input | Upstream animated content. |
out | imageRgba16f | output | Looped version of the upstream content. |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
mode | enum | Cycle | One of Cycle / PingPong / HoldLast. See "How It Works". |
length | scalar | 30 | Loop window length in comp frames. Minimum 1. |
Expose Channels
| Port | Type | Overrides |
|---|---|---|
length_in | scalar | length |
How It Works
The output frame is computed by mapping comp_frame into a [0, length) window:
- Cycle (default):
modified_frame = comp_frame mod length. The window repeats forward forever — frames 0..length play, then frames 0..length again, then 0..length again, ... - PingPong: same window, but every other cycle plays in reverse — 0→length−1, then length−1→0, then 0→length−1, ... Useful for back-and-forth swing motions.
- HoldLast: the first
lengthframes play normally; everything past that holds onlength−1(the last frame in the window). Like a clip that stops at the end without disappearing.
Re-evaluates upstream at the computed modified_frame using the same primitive as TimeShift and FreezeFrame.
Usage Examples
Looping animation
30-frame walk cycle → Loop(mode=Cycle, length=30) → Output. Plays the walk cycle forever.
Pendulum / breathing motion
Animated swing 0..60 → Loop(mode=PingPong, length=60) → Output. Smoothly reverses each cycle for a continuous back-and-forth.
Hold the last frame
30-frame intro animation → Loop(mode=HoldLast, length=30). Plays the intro once, then freezes on the final frame.
Animated loop length
Time → Math → Loop.length_in. Ramp the loop length to gradually slow down a cycle, or speed it up.
Tips
- Loop is comp-frame anchored at 0 — the loop window starts at frame 0 of the comp, not the layer's clip start. Use
TimeShiftupstream ofLoopto align differently. - For
PingPong, an even-cycle starts at 0; odd-cycle plays in reverse. The seam where forward meets reverse is the same content frame (no jump). - For animated content with simulations, ensure the simulation is stable across the looped range. Stateful sims like
PointAdvectcache by frame index, so cycling re-uses cached past frames cheaply.
Related Nodes
- Time Shift — re-anchor the loop with an offset.
- Freeze Frame —
HoldLastis conceptually aLoopwhose window matches a single point. - Posterize Time — combine with Loop for choppy looped motion.
- Echo — sample at multiple offsets and blend rather than cycle.
- FileCache — bake upstream for fast loop reads.