๐ God Rays
Shafts of Light, No Path Tracing Required
- image
- IMAGE
God Rays adds volumetric shafts of light streaming from a point in your image - the "light through clouds / between trees / through a window" effect that instantly sells drama. Diffusion models are famously bad at drawing believable volumetric light (it usually comes out as a soft glow at best), so this is a case where a post-process node beats prompting almost every time.
It's one of the pack's Light Effects, alongside Lens Flare and Aurora, and it's a finishing pass: composite it over your render near the end, right before Save. The classic use is a landscape or interior where you want the sun to feel present without regenerating.
How it works
The node picks a light source position (via source_x / source_y) and casts num_rays light shafts outward from it. Each ray is drawn as a tapered, blurred streak along a slightly randomized angle - the randomness is per-ray, so the shafts aren't perfectly uniform, which is exactly what makes them look like light through gaps rather than a starburst sticker. Every ray is heavily Gaussian-blurred so it reads as scattered light, not a line. ray_length controls how far the shafts extend, and decay controls how quickly each fades toward its tip (higher = longer, more uniform streaks).
The color_temp input (2000โ8000K, default 3000) sets the color of the light via a Kelvin-to-RGB conversion - 3000K is warm golden-hour light, 5500K is neutral daylight, up near 8000K is cold blue. That single slider does most of the mood-setting work.
The inputs that matter
- intensity (0โ2, default 0.5) - brightness of the shafts.
- num_rays (3โ20, default 8) - how many shafts. Fewer + wider spacing reads more natural.
- ray_length (0.1โ2, default 0.8) - how far the light reaches.
- source_x / source_y - where the light comes from. Top-left corner is the classic "sun" position; match it to whatever highlight your image already has.
- color_temp (2000โ8000K, default 3000) - light color, warm to cold.
- decay (0.1โ1, default 0.8) - falloff along each shaft.
Output is the composite IMAGE.
Installing it
Ships in ComfyUI-Image-Effects (Orion4D). ComfyUI Manager โ search "Image Effects", or:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI-Image-Effects
cd ComfyUI-Image-Effects
pip install -r requirements.txt
Restart, then it's under Add Node โ Image Effects. No models - OpenCV draws and blurs the shafts.
Gotchas
Pack-wide: only the first image of a batch is processed, CPU-bound, and the ray angles are randomized with no seed - every run gets slightly different shaft placement. Two practical notes. First, god rays only look right where they make sense: match source_x/source_y to the sun or bright area already in your image, or the effect floats. Second, it's an additive light - on an already-bright image it can blow out toward white fast; keep intensity moderate and let the blur sell it. For a more integrated look, run it before a subtle Film Grain pass so the grain unifies the light with the image.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | โ | |
| intensity | FLOAT | 0.50โ2 | โ |
| num_rays | INT | 83โ20 | โ |
| ray_length | FLOAT | 0.80.1โ2 | โ |
| source_xopt | FLOAT | 0.500โ1 | โ |
| source_yopt | FLOAT | 0.200โ1 | โ |
| color_tempopt | FLOAT | 30002000โ8000 | โ |
| decayopt | FLOAT | 0.80.1โ1 | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | โ |