Volume Atmospherics Rendering - Is there a Cutoff?

I have this big scene and want to do some light haze / fog. I use a box and apply this simple volume shader - Edit: Renderengine is Cycles

But if I drop the density below a certain value the fog is gone completely (. s. attachment)

Is there any cutoff value for atmospherics / volumetrics that I missed? I want the effect to be quite subtle.

I thank you for your consideration in advance!

1 Like

If its eevee there is this:
eevee-vol-dist
https://docs.blender.org/manual/en/latest/render/eevee/render_settings/volumetrics.html#volumetrics

Sorry, forgot to mention - no, it’s cycles!

If you use the Principled Volume Shader, there is anisotropy which can have subtle effects. Aside from that I would say that there is nothing stopping you from using .045 or .046. I think often when I use volumetrics I use very low values. Also if you want the volume to fade in a direction, say x axis, you could try this:

Although you would have to change the map range to accommodate the dimensions of the object, so if the object is from -10 in the x axis to 10 in the x axis you could use this demo.

Hi a59303 ! The problem is, that at some value the fog just disappears - it’s gone. And I don’t find the setting to lower the threshhold.

The settings I mentioned are the ones I would use.

1 Like

Hey, I tried it, but with the gradient the same problem still persists. It just looks different. Below a certain threshhold the gradient is just cut off. But thanks for the tip anyhow.

After tinkering with it, I see what you mean although I havn’t narrowed it down yet. I don’t know why that’s happening.

1 Like

just a brainfart here, but have you tried to change the color ? sometime darker values can give the impression that there is less fog.

Maybe the problem is just that you’re dealing with too low values, from your capture : 0.04 * 0.001 = 0.0004 …

As a last resort it’s also possible to output a mist pass, from what I see I’m not sure you really benefit true volumetrics unless there are like godrays or stuff like that !

Good luck !

2 Likes

I tried everything … indeed the color value is very low, but if you want to do realistic landscapes with real scales you might need superfine values.

The mist pass is surely an alternative, but if you want to render realistic atmospheres they need to capture some light to look great.

If you find something - I would be very thankfull. Thanks for your support anyhow!

Yep, this is a known thing.

What I’m doing for my project is having my scene at a lower size (in my case 1:100), so I can use higher densities with the same effect.

I (or someone :wink: should write a bugreport on this sometime.

Interesting !
Your min density seems to be 0.00002 , and in Dmerc’s scene it stops at 0.0004, maybe that’s because the fog objects are different ?

I just got an idea by reading, since it’s very big distances, maybe it’s possible to keep the minimum density, but use something like a noise texture set to greater than 0.5.
That way you’ll have overlapping density of say 0.0004 and 0, and since the distances are huge probably we won’t see the gaps caused by the noise , what do you think ?

I tried using a white noise to modulate the density, which kind of works, but results in bad noise.
A higher cutoff value (0.0004 vs 0.00002) probably has to do with the color - darker scatter colors just result in “less fog”

I’ve reported the bug here:

There’s an example .blend file in there, too.

3 Likes

Yeah , that sound logical with white noise, but say you have noise patterns with gaps like 1,10 or 100 meters, a good range so you have enough overlap, but without making the “holes” too tiny to create too many noise ?

I guess it will add noise and rendertime anyway…

Thanks a lot for submitting the report !

1 Like

Thanks Thomas - glad I am not alone on this - will follow your report and see where it goes.

(I also thought about the rescaling workaround, but then there should be a way to keep to scale for assets etc.) - It’s hard enough to make scale believable anyhow.

This is also an issue I’ve been having for a while now. Glad to see other people are raising it. I’ve had a bit of a dig around with a custom Cycles build, but have not found anything so far that changes this unfortunately.

2 Likes

I believe your problem is the same as mine. I found a solution that worked well for me.

I have a cube of 450 kilometers representing the atmosphere. When I tried to lower below a very low number, I also had a cutoff. The fog disappeared completely. My interpretation is that the floating point precision is too low. Therefore, Blender rounds down the number of 0.

The solution is to use the lowest precision where the fog is still rendered and to use a 3D texture to create variable empty spaces in a way that the final result is like creating particles in the volume. With a very low density and the right texture scale, the sum of the volumetric particles render make a continuous soft fog.

I wrote a complex shader with an altitude gradient. Here’s what I can share with you to develop the basic solution.

Here is the noise pattern with a ColorRamp to create a pattern with values from total black to total white. That allows you to have a custom group node with a slider parameter to vary from 0 to 1 easily.

The noise pattern

Then, the trick is to use a math node with “Less Than” to control the volume percentage that will be tested to accumulate the volumetric samples. The lower-density factor comes from the fact that we don’t test (or add) all the steps within the volume.

Density variation

The “Less Than” is your percentage to be tested.

The “Base fog value” here is “0.0001”. You can multiple it with a parameter if you want to increase the final result with denser fog.

You can also use an exponential value to control the altitude density based on the Z value of the generated texture position (0 to 1) of a “Texture Coordinate” node. In that case, you will multiple the “Less Than” value before the “Final density” shown here.

In other words, the only viable solution with very low values and large-scale atmospheres is to remove a part of the volumetric sum being added every step rate. That way, the final sum is still less.

Note 1: One problem that I had is the result of undesirable patterns. If you use a scale number that is too high, you can see different dense patterns forming, like being very dense on two edges or a dense cross being formed in the middle of the volume. At the moment, I have a pattern only visible when the camera is far away from above, but it seems correct within the volume.

Note 2: If your noise texture scale is something like “0.001”, your fog will look more like clouds.

I hope that helps.

3 Likes

Thanks Sebastien - that sure is an elaborate approach for the issue ;). I will have a deeper look at it.

Pretty smart, I will have to give give this a try :slight_smile: