1
$\begingroup$

I wanted to know if there is a way of telling blender that volume objects should only show the volume, the fog and stuff when it is overlapping with a light source. I was trying to replicate the Youtube tutorials on how to make Volumetric light, but it does not really do the trick for me. I don't want to have the fog EVERYWHERE inside the cube, but only when where for an example a light cone is shining.

With Lights

Without Lights

Answer: Okay, thanks to the comments I was capable to find the problem, it was the emission property of the principled volume in the shading editor for the volume material that is set on the volume cube. I just set it to 0, and it gives me the desired effect now.

$\endgroup$
8
  • $\begingroup$ What are your settings in Light Paths > Max Bounces > Volume? And do you only have spotlights in the scene which should show the fog or is there a sunlight or other environment lighting? $\endgroup$ Jun 23, 2022 at 7:00
  • $\begingroup$ @GordonBrinkmann What are your recommended settings to get it to work how I want it? There is only one spotlight, one cube with a volume material. I don't know where the light paths setting is you mentioned. $\endgroup$
    – user140193
    Jun 23, 2022 at 13:11
  • $\begingroup$ In the Render Properties you will find Light Paths > Max Bounces and then Volume. If the bounces value for Volume is larger than 0, light will be scattered inside the cube and therefore also be visible outside of the spotlight's cone. Values ≥ 1 will be more realistic for a room filled with fog, but will also take more time to render and produce your undesired fog "everywhere". $\endgroup$ Jun 23, 2022 at 13:24
  • $\begingroup$ @GordonBrinkmann Thank you for the information. However, I just tried both 0 and 1 and in both cases the fog is everywhere where the volume cube is. To say, the one with the volume material. $\endgroup$
    – user140193
    Jun 23, 2022 at 13:27
  • $\begingroup$ That cannot be actually with bounces 0 if there is no other light source. Because the light from the spot won't reach the fog in the rest of the cube. You're sure there is nothing else? When you turn off the spotlight it's absolutely black? No light coming from the world? $\endgroup$ Jun 23, 2022 at 13:31

2 Answers 2

1
$\begingroup$

If you change the color of the Principled Volume almost to black and the Absorption Color to full white I think you will get that effect.enter image description here

$\endgroup$
3
  • $\begingroup$ That's not how it works. I mean, maybe this is the desired result, but simply try two different settings in the Principled Volume shader: 1: Color to dark grey like V = 0.01, Density to 1 and Absorption Color to full white at V = 1. Compare it to 2: Color full white at V = 1, Density to 0.01, Absorption Color black, V = 0. The result will look exactly the same. With color white and density 0.01 you can also set the absorption to white, it still looks the same. What makes the fog visible is if you also have a sun or environment light or the Light Paths Volume bounces > 0. $\endgroup$ Jun 23, 2022 at 6:34
  • $\begingroup$ Just for a short explanation: all fog which is visible in the air comes from scattered light, whereas the Absorption Color manipulates (as the name suggests) the light absorption. Light that gets absorbed doesn't show up in the camera as visible fog in the air. That's why in your solution you have to leave the Color at dark grey and cannot turn it all the way down to black. Black means no scattering, so no visible fog, no matter which Absorption Color you choose. $\endgroup$ Jun 24, 2022 at 15:30
  • $\begingroup$ Thanks for the explanation. $\endgroup$
    – Vagabonk
    Jun 24, 2022 at 15:46
1
$\begingroup$

You could create a cone, give it volumetrics, and give it the exact same shape as the light spot cone:

enter image description here

Another trick would be to use a cone with Emission and Transparent node and a Layer Weight node as factor, see here.

$\endgroup$
3
  • $\begingroup$ That's a good idea! And if you want real volumetrics with objects throwing shadows in the fog definitely to be preferred over the trick you've linked to. Then combine the cone with Copy Location and Copy Rotation constraints targeting the spotlight and you can even reposition the light easily. $\endgroup$ Jun 23, 2022 at 7:58
  • 1
    $\begingroup$ or simply parent the one to the other? $\endgroup$
    – moonboots
    Jun 23, 2022 at 8:06
  • $\begingroup$ Haha, of course :) I just used constraints because I already had the light in a certain position and angle so parenting at this constellation made no sense :D The only thing with this method which has to be kept in mind: if you've set the spotlight to a soft edge, this gets a sharp outline from the cone if you set the volume bounces to a value greater than 0. $\endgroup$ Jun 23, 2022 at 8:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .