No shadows on volumetric fog

Greetings, I’m trying to use volumetric fog, but when I add a light (any, spot or sunlight) objects are not affecting shadows on the fog:


As you can see, the cube (goes all the way back through the entire cone of the light) does cast shadow on the ground, but the volumetric fog still gets lit.
I tried following:
Enabling volumetric shadow (and almost any and all other checkboxes in the spotlight)
Toying around with scattering and extinction of the fog as well scattering of the spotlight
Building level
Enabling or disabling ray traced shadows and distance shadows

Sadly nothing worked and I’m really desperate by now, since this makes volumetric fog nearly unusable for scenes like forest, where you can see light illuminating fog through the trees.

are you using a cube or a box brush?

I’m using basic cube mesh, however my issue is not that there isn’t any shadow projected on the ground, there is, the issue is that the volumetric fog is being lit under the box, even though it shouldn’t be. You can see in the screenshot that the cone of light is coming straight through it, instead of being blocked by the box.

light

I don’t think we understand each other, so here is a better example:
I have a solid wall with spotlight shining directly at it:

However, on the other side of the wall, light keeps being projected, illuminating the fog as if the wall wasn’t there:

Sorry perhaps I don’t understand you, and is late for me, then what is wrong with my picture:
image

Rays are not going to stop of course, unless you block the whole light to the observer…

Like under the cube…

When I doubt I look for real images with a similar scene, hope it helps you…

Your light is already hitting the edge of the cube, so the issue is barely visible:


The fog inside the blue rectangle shouldn’t be illuminated, because it’s in the shadow of the cube.
Try to recreate my second example, one spotlight, one wall mesh, exponential height fog → volumetric fog, nothing else. if you shine the light directly at the wall, the cone of light will be visible behind that wall, as if passing straight through:
LightVolumetrics3
The red square should be completely black, because the wall should block the light.

Okay, I finally figured it out, for anyone who comes after us, light has to be set to movable and not casting ray traced shadows.

3 Likes

image
image

:person_shrugging:

ok also it can happens because using Raytracing because…


And take a look in the light to the Volumetric Inscatering Intensity…

1 Like

I was having the same problem i think, but i figured out
image

Have a look at cast volume shadow and you need to have scattering too

the result was this…