God Rays
Volumetric light shafts from a couple of dials
- video
- video
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 -
stepsis too low. Bump it to 5, and check thatscaleisn'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 -
decayis too high ormixis at 1. Shorten the rays and blend them down.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| force_run_token | INT | 00–2147483647 | Internal — bumped on Run to invalidate ComfyUI's input cache. |
| project_id | STRING | Internal — populated by the projectStore on the frontend. | |
| parent_output_id | INT | 00–2147483647 | Internal — lineage parent set by spawn handlers on the frontend. |
| translate_x | FLOAT | 0-2000–2000 | — |
| translate_y | FLOAT | 0-2000–2000 | — |
| scale | FLOAT | 1.400.2–4 | — |
| rotate_deg | FLOAT | 0.0-180–180 | — |
| steps | INT | 51–7 | — |
| decay | FLOAT | 0.300.001–1 | — |
| max_mode | BOOLEAN | false | — |
| mix | FLOAT | 1.000–1 | — |
| videoopt | COMFYTV_VIDEO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video | COMFYTV_VIDEO | — |