Nodes/Difforum/Difforum · Camera (expressions)
ComfyUI Node

Difforum · Camera (expressions)

Deforum-style camera from math expressions, per axis. `0:(0), 60:(2*sin(2*pi*t/30))`, with `t` (frame), `s` (seconds) and any audio band (`low`, `beat`...) when audio is connected. Each axis also has an optional schedule socket (e.g. an Audio Curve) that overrides its text. Values are per-frame increments; zoom is a per-frame scale factor.

By chillithebillis·Created 3 months ago·Updated about 7 hours ago· 8
Difforum · Camera (expressions)
  • params
  • audio
  • translation_x_curve
  • translation_y_curve
  • translation_z_curve
  • rotation_3d_x_curve
  • rotation_3d_y_curve
  • rotation_3d_z_curve
  • zoom_curve
  • camera
  • info
◄mode2d►
◄fov40►
◄translation_x0:(0)►
◄translation_y0:(0)►
◄translation_z0:(0)►
◄rotation_3d_x0:(0)►
◄rotation_3d_y0:(0)►
◄rotation_3d_z0:(0.3)►
◄zoom0:(1.0 + 0.004*sin(2*pi*t/48))►
CategoryDifforum/2 · Direction

Inputs (18)

NameTypeDefaultDescription
paramsDIFFORUM_PARAMSFrom Setup: frame count, fps, width and height. Plug the same Setup everywhere.
modeCOMBO2d2d = flat moves; 3d = parallax with a depth map.
fovFLOAT401–170Lens field of view in degrees. 20-30 long lens, 40 normal, 60+ wide.
translation_xSTRING0:(0)Horizontal move per frame. Deforum syntax: '0:(0), 60:(2*sin(t/10))'; t = frame.
translation_ySTRING0:(0)Vertical move per frame, same syntax.
translation_zSTRING0:(0)Forward (+) / back (-) per frame. 3D only.
rotation_3d_xSTRING0:(0)Tilt, degrees per frame. 3D only.
rotation_3d_ySTRING0:(0)Pan (turn), degrees per frame. 3D only.
rotation_3d_zSTRING0:(0.3)Roll, degrees per frame.
zoomSTRING0:(1.0 + 0.004*sin(2*pi*t/48))Scale per frame. 1.0 = none, 1.01 = 1% closer each frame.
audiooptDIFFORUM_AUDIOAudio curves usable in expressions: amp, low, mid, high, onset, beat.
translation_x_curveoptDIFFORUM_SCHEDULEA schedule (Audio Curve, Schedule) that replaces the text for this axis.
translation_y_curveoptDIFFORUM_SCHEDULEA schedule that replaces the text for this axis.
translation_z_curveoptDIFFORUM_SCHEDULEA schedule that replaces the text for this axis.
rotation_3d_x_curveoptDIFFORUM_SCHEDULEA schedule that replaces the text for this axis.
rotation_3d_y_curveoptDIFFORUM_SCHEDULEA schedule that replaces the text for this axis.
rotation_3d_z_curveoptDIFFORUM_SCHEDULEA schedule that replaces the text for this axis.
zoom_curveoptDIFFORUM_SCHEDULEA schedule that replaces the text for this axis.

Outputs (2)

NameTypeDescription
cameraDIFFORUM_CAMERA—
infoSTRING—