Volumetric lighting and god rays in Blender: fog, light beams, and Cycles and EEVEE settings
Short answer
Volumetric lighting makes light visible in the air by adding a medium that scatters it, such as fog, dust or smoke. God rays (crepuscular rays) appear when an object breaks that light into shafts. In Blender 5.2, the most controllable setup is a cube around the scene with a low-density Principled Volume, lit by a Sun or Spot light that casts shadows. For fast rays with no volume to render, use the compositor’s Glare node with its Sun Beams type.
- Volume cube: no surface shader, Principled Volume into the Volume input of the Material Output, low Density.
- World volume: World Properties > Volume (night scenes; Sun lights stop working).
- Cycles: Render Properties > Volumes (Biased) and Light Paths > Max Bounces > Volume.
- EEVEE: Render Properties > Volumes (Resolution, Steps, Distribution); light shadows on.
- Compositing: Compositor, Filter > Glare, Type: Sun Beams.
Menu names below are checked against the Blender 5.2 manual and source code.
What is volumetric lighting?
In a regular render, the air is a vacuum: you only see light where it lands on a surface. Volumetric lighting adds a participating medium, a region of space filled with huge numbers of tiny particles, like fog, smoke, dust or haze. Those particles attenuate light and scatter it. Some of each beam is redirected toward the camera, so the beam itself becomes visible.
Blender describes the medium through its density. The manual defines it as how much of the light interacts with the volume, getting absorbed or scattered, versus how much passes straight through. Higher density means more particles per unit of volume, so a ray of light is more likely to hit one.
God rays are crepuscular rays
God rays, or godrays, are crepuscular rays recreated in 3D. The Atmospheric Optics site describes the real ones as columns of sunlit air separated by darker regions in the shadow of clouds: air molecules, dust and water droplets scatter the sunlight and make the columns visible. The rays are actually parallel. They seem to fan out from the sun because of perspective, the way a straight road looks narrower in the distance.
So a scene needs the same two things as the sky: a medium that scatters light, and an occluder that cuts the light into beams. A volume without an occluder gives you an even, glowing haze; an occluder without a volume only casts shadows on the floor. The Blender manual itself uses the term crepuscular rays for the compositor’s Sun Beams effect.
Three ways to get god rays in Blender
- A volume cube around the scene: what the manual recommends for fog, and it works with Sun lights.
- A World volume: nothing to place, but Sun lights and the background stop lighting the scene. Best for night shots.
- Compositing: the Glare node’s Sun Beams type draws rays in 2D from the bright parts of the image, with no volume to render.
What changed in Blender 4.2 and 5.0
A lot of volumetrics tutorials predate one of these rewrites. Where each setting went:
| Setting | In older tutorials | In Blender 5.2 |
|---|---|---|
| EEVEE volumes | Render Properties > Volumetrics: Start, End, Tile Size, Samples, Distribution (up to 4.1) | Render Properties > Volumes: Resolution, Steps, Distribution, Max Depth; Start and End under Custom Range |
| EEVEE volumetric shadows | Volumetric Shadows subpanel (up to 4.1) | Render Properties > Sampling > Shadows > Volume Shadows |
| EEVEE Volumetric Lighting checkbox | Subpanel of Volumetrics (up to 4.1) | Removed; each light keeps its Volume Scatter factor |
| Cycles volume step size | Render Properties > Volumes: Step Rate and Max Steps, plus a Homogeneous checkbox on materials (up to 4.5) | Null scattering by default, no step size to tune; the Biased checkbox brings back Step Rate and Max Steps |
| Compositor rays | Sun Beams node, under Filter (up to 4.5) | Glare node, Type: Sun Beams (since 5.0) |
Method 1: a volume cube for fog and god rays
For fog, the manual prefers a volume object surrounding the scene over a World volume, and notes that the size of that object determines how much light gets scattered or absorbed. It is also the setup you control best, since you decide exactly where the haze starts and stops.
- In the 3D Viewport, add a cube with Shift+A > Mesh > Cube and scale it up to cover the part of the scene where the light should show.
- Open its material in the Shader Editor and delete the Principled BSDF: a pure volume has no surface shader.
- Add Shift+A > Shader > Principled Volume and connect its Volume output to the Volume input of the Material Output.
- Bring Density well down from its default of 1. It works per unit of distance traveled, so the bigger the cube, the lower it has to be to keep the fog from turning opaque.
- Light the scene with a Sun or Spot light that casts shadows, and put an occluder in its path: a wall with a window, trees, a row of columns. The beams appear between the shadows.
As with glass, the mesh has to be closed with normals pointing outward, so the renderer can tell when a ray enters or leaves the volume. The default cube is fine.
Principled Volume, Volume Scatter or Volume Absorption?
- Principled Volume combines scattering, absorption and emission, including blackbody emission for fire, in one node. For fog, Color, Density and Anisotropy are all you need.
- Volume Scatter only scatters light, and the manual names adding fog to a scene as its typical use. Paired with Volume Absorption, which absorbs part of the light without sending it anywhere, it makes smoke.
Anisotropy, from -1 to 1 with a default of 0, sets the direction of scattering. At 0, light scatters evenly in all directions; positive values scatter mostly forward, negative values mostly backward. With a positive value, beams look brighter when the camera faces the light. Since Blender 4.3, Volume Scatter also offers other phase functions in Cycles only, including Rayleigh for atmospheric scattering and Mie for clouds and fog.
Patchy fog with a texture
The manual suggests textures to define volume density. Connect a Shift+A > Texture > Noise Texture to Density, through a Color Ramp to control the contrast, and the fog breaks up into drifts that make the beams less uniform. In Cycles with Biased enabled, fine procedural detail may need a lower Step Rate in the material settings, or it gets lost.
Method 2: the World volume
A volume shader can also go on the World: in World Properties > Volume, or in the Shader Editor set to World, by connecting a Principled Volume or Volume Scatter to the Volume input of the World Output. The volume then fills all of space, with no object to place.
The manual warns that this is mostly useful for night or other dark scenes: with a World volume, the World surface shader (a color, a sky or an HDRI) and Sun lights have no effect, because the background is treated as infinitely far away. The Blender 4.2 release notes confirm it for EEVEE: World volumes are no longer limited to the clipping distance, so they can completely block Sun lights and the background. Sunlight through a window therefore calls for a volume cube. In EEVEE, a World volume benefits from Custom Range, which the manual says increases precision, and files from before 4.2 show a Convert Volume button in this panel that turns the World volume into a mesh.
Lights: Spot, Sun, Area and shadows
- Spot: a cone of light, the natural choice for a visible beam. Angle sets the cone width from 1 to 180 degrees and Blend, from 0 to 1, softens its edge. Show Cone draws the cone in the viewport.
- Sun: a direction from infinitely far away, so only its rotation matters. Its Angle is its apparent size: a small Angle gives crisp shadows and sharply cut rays.
- Area and Point: a glowing window or a bulb in the haze.
Beams come from shadows: a light that casts none lights the volume without cutting it into shafts. In Cycles, leave Cast Shadow enabled in Light Properties > Settings. In EEVEE, keep the Shadow subpanel checkbox on, since EEVEE reads the light’s shadow map to light each point of the volume. The manual also notes that EEVEE leaks light through walls with no thickness, so give the wall around your window some depth.
To keep a light out of the fog in Cycles, uncheck Object Properties > Visibility > Ray Visibility > Volume Scatter on that light. In EEVEE, Light Properties > Influence > Volume Scatter multiplies the light’s contribution to volumes; the manual points out that any value other than 1 breaks physically based results. Light types and power are covered in the guide to lighting in Blender.
Cycles settings for volumes
- Render Properties > Volumes: since Blender 5.0, Cycles renders volumes with null scattering, an unbiased algorithm that removes blocky artifacts where volumes overlap but can be noisier. The Biased checkbox brings back the older ray marching and its settings: Step Rate Render and Viewport (higher is faster but loses detail) and Max Steps, 1,024 by default, a safeguard against extremely long renders.
- Light Paths > Max Bounces > Volume: 0 by default, which gives single scattering. More bounces produce the multiple scattering clouds need, at a cost in noise and render time.
- Material Properties > Settings > Volume: Sampling picks the sampling method. Equiangular suits a light inside or near the volume, Distance a dense volume lit from far away, and Multiple Importance, the material default, combines both. Cubic interpolation smooths dense volumes but is slower than Linear.
According to the 5.0 release notes, an older file that now renders slower usually had a Step Rate set too high, which biased the result. To tweak the rays in compositing, View Layer Properties > Passes > Light has Volume Direct and Indirect passes.
EEVEE settings for volumes
EEVEE evaluates every volume in the camera view using 3D textures, which take a lot of video memory. Their size is set in Render Properties > Volumes:
- Resolution, from 1:1 to 1:16, 1:8 by default: how fine the volume grid is compared with the image. 1:4 or 1:2 give more detail and use more memory.
- Steps, 1 to 256, 64 by default: the number of samples along the view depth.
- Distribution, 0.8 by default: higher values put more samples near the camera.
- Custom Range: Start and End (0.1 m and 100 m by default) limit the computation to a depth range.
Volume Shadows, in Render Properties > Sampling > Shadows, let volumes shadow each other; Blender’s own tooltip calls them very expensive. You do not need them for beams cut by a wall or trees, which come from the light’s shadows. The manual lists EEVEE’s other limits: single scattering only, and volumes do not show up in reflections or refractions.
Compositor god rays: Glare set to Sun Beams
The manual is blunt about it: full volumetric lighting is a rather arduous approach and takes a long time to render. The compositor offers a shortcut. Since Blender 5.0, the Glare node has a Sun Beams type, easier to get good results from than the old Sun Beams node, which is gone.
- In the Compositing workspace, click New in the Compositor header to create a node tree, and make sure Output Properties > Post Processing > Pipeline > Compositing is checked.
- Add Shift+A > Filter > Glare between the Image output of the Render Layers node and the Group Output, and set Type to Sun Beams.
- Place the source with Sun Position, from 0 to 1 on each axis of the image (0.5 and 0.5, the center, by default). With the node selected and Active Node Gizmo enabled, you can drag a cross in the preview.
- Adjust Threshold, 1 by default, the brightness a pixel needs to cast rays, and Size, how far the effect spreads as a share of the image (1 covers the full image).
Jitter speeds things up at the cost of grain: in the release notes example, 280 ms with no jitter versus 70 ms at 0.8. The manual advises keeping diffuse light reflected by surfaces out of the source of the rays, by isolating only the brightest areas or using a mask. The effect is 2D and knows nothing about the geometry: fine for sky behind branches, less convincing for a beam crossing a room. For plain depth haze, the Mist pass (View Layer Properties > Passes > Data) gives you a 0 to 1 map to mix over the image.
Render times and noise with volumes
Volumes are expensive to render. The manual notes that multiple scattering is noisy and that you often have to limit bounces to keep render times acceptable, and Max Steps exists to prevent extremely long renders. What to try first:
- Keep Max Bounces > Volume at 0 unless you are rendering clouds.
- Keep the volume cube to the area that needs it, and take unneeded lights out of it (Volume Scatter).
- With a Spot light inside fog, try Equiangular sampling; with Biased on, raise Step Rate as long as the detail holds.
- When the rays are only there for mood, use Glare > Sun Beams instead.
For everything else that affects render time, see how to render faster in Cycles, and for choosing an engine, the guide on how to render in Blender. A foggy animation stays slow frame after frame; splitting the frames across the machines of a Blender render farm cuts the total wait without changing any setting.
Frequently asked questions
What is volumetric lighting?
Volumetric lighting makes light visible in the air itself, not only on the surfaces it hits. It simulates a participating medium such as fog, dust, smoke or cloud, whose particles absorb part of the light and scatter the rest, some of it toward the camera. In Blender, it comes from a volume shader connected to the Volume input of a material or of the World.
What are god rays?
God rays, also written godrays, are visible shafts of light separated by bands of shadow. In nature they are called crepuscular rays: sunlight streams through gaps in the clouds, and particles in the air scatter enough of it to make the beams visible. A 3D scene needs the same two ingredients, a medium that scatters light and an object that breaks the light into beams.
How do you make god rays in Blender?
Surround the scene with a cube whose material has only a Principled Volume with a low Density, connected to the Volume input of the Material Output. Light it with a Sun or Spot light that casts shadows, and put something in the path of the light: a window frame, foliage, columns. For a quick effect with no volume at all, the compositor’s Glare node set to Sun Beams adds rays to the rendered image.
How do you make volumetric fog in Blender?
Add a cube large enough to hold the foggy part of the scene, delete the Principled BSDF from its material and connect a Principled Volume to the Volume input of the Material Output. Lower Density well below its default of 1, since it works per unit of distance. Connect a Noise Texture to Density for patchy fog.
Why does my Sun light stop working when I add a World volume?
The Blender manual explains that with a volume shader on the World, the World surface shader and Sun lights have no effect, because the background is treated as infinitely far away and the volume fills all of space. Keep World volumes for night scenes lit by Spot or Point lights, and use a volume cube for fog in sunlight.
Where is the Sun Beams node in Blender 5?
Blender 5.0 added a Sun Beams type to the compositor’s Glare node, and the separate Sun Beams node is no longer in the Add menu. In the Compositor, add Filter > Glare, set Type to Sun Beams and place the source of the rays with Sun Position.
Rendering the animation on TURNA
When a scene is already well optimised and the frame count is what takes the time, the remaining lever is rendering several frames at once. TURNA does this for Blender: an add-on (Blender 4.0 to 5.2, Cycles and Eevee) sends the scene in one click, and the frames are split across 1, 2, 4 or 8 GPUs in parallel, RTX 5090 first and RTX 4090 when none is free. The add-on shows the estimated cost before anything starts. Prices start at €4.90 per hour, billed on the time actually used, with a 30-second minimum, and new accounts get €25 of free credit. A single still image is still rendered by one machine, so the gain is on animations. Tiers and worked examples are on the Blender render farm page.



