Principled volume broken in 3.2?

MakeAPool_UnderwaterMaterial.blend (1.5 MB)

See attached file. Volumes dont seem to work. if I have a volume (here I am trying to get a depth-fog effect on the DEPTHFOG object, it is not behaving as a fog volume. It is simply shading everything inside of of by a uniform amount. There is no falloff over distance.

Is this a 3.2 version issue? Just been following a tutorial:

And the result is totally different. He just puts in the principled vol and then has a misty white cube. I just get a dark, semi transparent cube with no fog in it?

For what it is worth, the actual effect i WANT is that of dark ground fog, on a slow gradient, but I cannot get anything near close to it, unless I use emissive fog, which looks awful.

You need to flip the normals of your “DepthFog” object.
Open in edit mode select all and flip the normals, then the volume will appear.

1 Like

How do i make it be like black fog? if i give it a color, thats fine, if i make it black, it gets rid of the fog altogether?

Hi and sorry for the late reply.

well fog is not usually black! Also in a pool there will not be “fog” (although water can get murky)

There are 2 types of volume shaders, absorption and scatter.

Volume absorption will absorb more light depending on length of the light ray that passes through the object. So the result is that “thinner” parts of the mesh absorb less light and thicker ones more.

Volume absorption does not really look like fog, it is more like a gradient of opacity.

Volume scatter will scatter the light ray inside the mesh’s volume and does give a more “foggy” appearance.

The principled volume shader mixes these 2 concepts. I am not sure exactly how it is calculated, but to me it seems that the darker the colour input the more absorption that takes place, and the lighter it is gives more scatter. Black gives you just absorption and the lighter the colour the more scatter you get.

This video will probably explain better than I can:

I probably prefer to use the separate volume scatter and absorption nodes with a mix shader instead of using the principled volume node, this will give you a better idea of how the 2 effects act separately.

I suggest you do the same and try tweaking the parameters one by one until you get the result you want.

Here I have made a “pool”. I made a volume (water) cube and scaled it down very slightly so that the surface does not overlap with the tiled “floor”. I only gave the volume a volume absorption shader, so that the water gets darker the deeper it goes.

I also added a “WaterSurface” plane (with a slight thickness) and a bit of noise in the normals to get the waves.

The pool has a shallow end (at the front) then a slope and a deep end.

For underwater shots I would probably add a bit of volume scatter as well. I did not use volume scatter for the “over water” shot because it makes the water much less transparent. Here is an underwater pool with absorption and scatter (this time no shallow end),

if you want the water to be more “murky” increase the density factor by setting the to max in the map range node to a higher value:

Here is the file (Underwater), I strongly recommend you do your own tests to see what you can get out of it.
Volume.blend (134.2 KB)

I am not an expert in volume. :upside_down_face: I just did some experimenting.


Black fog should work if you set mist pass to “Inverse Quadratic”: