TriangleWave π π π
A linear saw up and down β the wave that moves like a camera pan
- FLOAT
- INT
If SinWave is the breathing, TriangleWave is the panning. It ramps linearly from one extreme to the other, then turns around and ramps back - a smooth, constant-speed motion with a sharp reversal at each end. Sin eases into its peaks and valleys; a triangle wave doesn't bother, it just goes. For things like a camera or subject sliding across the frame, or any parameter that should move at a steady rate and bounce back, this is the better tool.
The formula is the same shape as the sine family:
value = y_translation + (amplitude / Ο) Γ arcsin(sin(2Ο/phase Γ current_frame β x_translation))
which is a classic way of turning a sine into a triangle: same five inputs (phase, amplitude, x_translation, y_translation, current_frame), same meanings - phase for cycle length in frames, amplitude for swing, y_translation for the center, x_translation to shift where the cycle starts. Output is FLOAT with an INT twin.
When triangle beats sine
Pick triangle whenever the speed of the motion matters more than its smoothness. A camera pan or dolly should cross the frame at constant velocity - a sine will visibly slow down near the edges, which reads as a hiccup on a long move. A triangle wave doesn't. Same for an element sliding back and forth, or a value that should spend equal time going up and down. If you want the eased, organic feel instead, stay on SinWave; if you want a sawtooth that resets sharply (think a scanning line), there's a SawtoothWave for that, which is triangle's angrier cousin.
Install and gotchas
Part of the FizzNodes pack: ComfyUI Manager β search FizzNodes β install β restart, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/FizzleDorf/ComfyUI_FizzNodes
cd ComfyUI_FizzNodes && pip install -r requirements.txt
numpy, pandas, numexpr only. Under FizzNodes π
π
π
β WaveNodes.
The thing to remember is that the reversal is abrupt by design - the value turns around in a single frame. If that sharp corner looks wrong to you, you wanted a sine. And, as with all the wave nodes, it only moves if current_frame advances: in a non-animated single render you'll get one constant output and it'll look broken. It isn't.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| phase | FLOAT | 10β9999 | β |
| amplitude | FLOAT | 0.50β9999 | β |
| x_translation | FLOAT | 00β9999 | β |
| y_translation | FLOAT | 0.500β9999 | β |
| current_frame | INT | 10β9999 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | β |
| INT | INT | β |