God rays in viewport but not in render Trying to render a scene with a UFO with god rays coming out the bottom.
Working in Blender 2.9
In my viewport it has light
But in my render it doesn't
To get the god rays, I added a hole at the bottom of the UFO, and added a spotlight inside the UFO.
I then added a cube to surround that area, and gave it a volume scatter node like so:

My settings are:

Light Paths &gt; Max Bounces &gt; Volume 5 (Tried 0 and 5, nothing happened)
Increasing cube Density in the Volume Scatter node from .09 -&gt; .15 (nothing happened)
Toggled on and off Physical Atmosphere addon (nothing happened)
Spotlight intensity: 100000 W
Spotlight radius: 1.29 M (tried reducing to 0, nothing happened)

I also tried making the surrounding cube smaller, nothing happened
My render settings are:

Cycles



My view layer settings look like this:
I found the answer. The problem was essentially what was described here: Volumetric Light not working on Cycles (but good in preview)
So what I did was I selected that cube that surrounds the scene, and I went into the object visibility properties and selected &quot;Render&quot; because it was unselected.