Nodes/ComfyTV/God Rays
ComfyUI Node

God Rays

Volumetric light shafts from a couple of dials

By jtydhr88·Created 3 months ago·Updated about 17 hours ago· 725
God Rays
  • video
  • video
force_run_token0
project_id
parent_output_id0
translate_x0
translate_y0
scale1.40
rotate_deg0.0
steps5
decay0.30
max_modefalse
mix1.00

That shaft of light cutting through a forest canopy or a dusty room - technically it's a volumetric lighting effect, and in a full compositor it takes a pile of passes to fake convincingly. God Rays is the shortcut. Give it a video with some bright highlights and it casts light streaks out from them, which is exactly the effect that makes an ordinary shot feel like something was lit with intent.

ComfyTV is jtydhr88's canvas app (~190 stages, each its own node), and God Rays sits in its VideoFX suite. It's a deterministic pixel effect - no model, no diffusion pass - so it's cheap to iterate and previews live right in the node.

How it works

The classic way to fake volumetric light: take the bright parts of the frame, stretch them radially from a point, and add them back, repeatedly, so the light "radiates." That's what this node does. The bright pixels are sampled and projected outward from a source you can position with translate_x / translate_y, scaled by scale (default 1.4) and rotated with rotate_deg. Each of steps (1–7) adds another layer of stretched light, with decay (how fast the rays fall off as they travel) controlling length and falloff. max_mode switches between adding and max-combining the rays - max tends to look cleaner with multiple bright sources. mix (0–1) is the wet/dry: pull it down to ghost the rays in under the original.

The settings that matter most:

  • steps (default 5) - more steps = fuller, smoother rays but a heavier render. 3–5 is the sweet spot.
  • decay (default 0.3) - lower = longer, wispier rays; higher = short, punchy bursts.
  • translate_x / translate_y - where the light source sits. Line it up with the actual bright spot in the frame, or it looks like the light is coming from nowhere.

Optional video in, video out. No video in, nothing happens.

The hidden inputs, explained once

Every ComfyTV stage carries force_run_token, project_id, and parent_output_id - all marked "Internal" in the schema. The frontend's projectStore fills them so each node can Run on its own and downstream nodes consume a snapshot of the last output. You never set them by hand.

Installing it

Same pack, same steps:

cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV

or ComfyUI Manager ("ComfyTV"), full backend restart, then ComfyTV → VideoFX. The one gotcha that bites people: on ComfyUI Desktop, macOS, or multiple installs, clone into the running instance by absolute path and confirm custom_nodes/ComfyTV/__init__.py exists (not nested), then fully restart. The pack declares no pip deps, but video stages lazily import PyAV - pip install av if a video node errors.

Common issues

  • Nothing glows - the frame has no bright highlights for the effect to work from. God Rays amplifies what's already there; it can't conjure light out of a flat, dim shot.
  • Rays look like a cheap smear - steps is too low. Bump it to 5, and check that scale isn't extreme.
  • Light comes from the wrong place - translate_x/translate_y. Move the source onto the actual bright region.
  • Rays wash the whole frame out - decay is too high or mix is at 1. Shorten the rays and blend them down.
CategoryComfyTV/VideoFX

Inputs (12)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
translate_xFLOAT0-2000–2000
translate_yFLOAT0-2000–2000
scaleFLOAT1.400.2–4
rotate_degFLOAT0.0-180–180
stepsINT51–7
decayFLOAT0.300.001–1
max_modeBOOLEANfalse
mixFLOAT1.000–1
videooptCOMFYTV_VIDEO

Outputs (1)

NameTypeDescription
videoCOMFYTV_VIDEO