I miss blury volumes in cycles

Something that I miss in the volume shader, legacy Cycles and Cycles X, is a way of adding a blurry diffusion by distance specially when using it for atmosphere. I have searched for ways of adding this to the shader but cant find an easy way…
Link for example: https://www.encyclopedie-environnement.org/app/uploads/2018/04/Diffusion-couv_lever-soleil.jpg
Best
Daniel

2 Likes

This is an interesting issue, and it should be solvable with multiple volume bounces, but I haven’t been able to complete it with any simple setup.

the idea is that hazy fog should be doable with mie scattering, which is scattering with positive anisotropy in cycles, so far as I know… I’ve seen a couple threads on it elsewhere, and they’re either just working on faking it or misguided into thinking that 20 anisotropy does more than 1.

I’m not sure what to do or think about it, though.
1: anisotropy should totally be affecting it, if it’s an unbiased method, as it just controls the distribution of directions light bounces after hitting something, but between .25 all the way to values approaching 1 there was no point at which light was deflected away from straight ahead.
2: it’s a kind of scattering, in which you can assume some light will simply not get scattered, and contribute to a sharp edge, which would result, overall, in bloom, something we definitely do see in volumes now.


as seen here, there SHOULD be a blurring effect for clear liquid fog but I don’t think it’s a proper scattering effect, so volumes that simulate a diffuse medium like dust or smoke wouldn’t give accurate results for things like clouds.

maybe we need a dedicated fog/cloud shader. it’d be a pain to optimize I think. I might try to mess with some stuff and make a custom anisotropy shader. I’m pretty sure fog droplets bend light such that it still goes forward, but can’t really go straight through at all, (Light and water droplets) which none of the built in anisotropy values simulate to my knowledge.

2 Likes

I just use the mist pass in the Compositor to do this :slight_smile:

I’m curious how you manage it,
but needing to fake it in post what we want to avoid, specifically. I can’t imagine it would be too much different from post processed DOF blur. The true effect is that of many, many almost-planar lenses, and functionally, not much different from the principled BSDF’s transmission roughness.

the compositor’s mist pass can roughly simulate a dry mist (whatever that means) but the more atmospheric fog that causes this diffusion effect is comprised of large droplets that you can actually feel (5-20um). this is big enough that it has legitimate optical interactions beyond scattering.

I think it´s hard to do it i post if you want to use moblur and dof in render does mist pas work on volumes? I know z-pass don´t

I think even dry dust particles generate some kind of diffusion? like smog, I think its primary particles of some sort of carbon binding?

To be blunt, smog (2.5un and smaller particles) works like other molecules and particles. it has its own scattering/absorption spectra, which you can simulate by simply finding the average scattering wavelength and setting that as the scattering color. Fog is different because its particles (below 100un) are at just the right size to cause non-classical light interactions. by all means this would not normally be included in an optimized volume shader, as it only occurs in clear media at particle sizes between like 5un to 100un.

the scattering solution we have (volume scatter node) generally simulates rayleigh scattering, in which light energy is simultaneously taken in by an atom and released at a random angle. By changing the anisotropy you are telling it to prefer retroreflection (-1) to no change (1), but in actual rayleigh scattering, the result is both forward and backward reflection preferentially, at the same time.
Why this doesn’t actually matter too much is that over the course of 2-3 interactions, it’s not uncommon for light energy to go in any direction randomly, so it saves us needing to go to 2-3 volume bounces for that nice even scattering.

The end result of all of this is that your view of an object through a volume becomes colored more and more the color of scattering in the volume, the further it is, as more and more of the original color is lost (just certain colors more preferentially), but not necessarily blurrier (the light is waves at that scale, and therefore pass over the particles, getting energy taken from them). Fog Diffusion, as I’m calling it, causes these light paths to vary with a predetermined distribution every bounce, so;
nothing is wrong with the scattering node- it’s working as intended. A volume diffusion node may be in order, I suspect. If we can break down the exact effects, we should be able to make a decently performant principled fog shader in which you set the fog’s particle size and deviation. after all, these equations are simple. better yet, the fogbow should be able to create principled rainbows too.

1 Like