Forum: Poser - OFFICIAL


Subject: Making low lying fog/mist

Adamaknight opened this issue on Mar 21, 2009 · 83 posts


bagginsbill posted Sun, 22 March 2009 at 10:04 AM

Quote -  Ooh neat!

What's the light setup in that one, BB? Lights AND atmospherics together always seem to be my biggest problem. As far as I can tell, the atmospherics are very depending on the RIGHT light..

Or am I wrong there, too?

Correcto. Here is the brief answer. Poser atmosphere is invisible unless a light shines on it. It is not the same as smoke. If you shine a spotlight on the fog such that some parts are lit and some not, the unlit parts will disappear, instead of looking like darker, unlit fog.

I have not experimented to see if IBL counts as "a light shines on it". To answer that, somebody should try rendering with just a plain white IBL and see what you get.

I used my usual two-lights here. An IBL for ambience, and an infinite at somewhere between 60 and 100% - can't remember what value I used. I did not use GC.

--- long answer ---

I have not worked extensively with Poser atmosphere. I've done a few little experiments, but not sufficient to be authoritative. This is what I believe:

The effect is created by the internal assemblage of a series of parallel infinite planes.
(Could be bounded, not infinite, bounded by camera viewing frustum - not sure - would need to develop various tests involving mirrors to find out if the atmosphere extends in all directions.)

The atmosphere planes seem to be parallel to the ground plane. I.e. the normals are straight up in Y.

The atmosphere planes are spaced apart in proportion to the Volume_StepSize.
(When you use a higher Volume_StepSize, rendering is faster, and distinct planes of fog become visible.) I do not know what the units are, but it could be inches.

These planes are not shaded as a normal surface would be like the ground plane or a one-sided square. They are always 100% transparent, meaning that whatever is behind them is always rendered at 100% brightness. In addition, they generate some reflection of light themselves and this is added to the color derived from transparency. Normal shading would have the local surface reflection "blended" with the color derived from transparency. What I mean by that is if the fog were actually transparent/opaque the way other surfaces are, it could block the light from behind. Poser atmosphere cannot block. It can "white out" but that's not the same as blocking or opacity. That just means you can no longer see the values being produced as they are clipped at 1.0 - "hypercolors" if you've followed some other discussions of this phenomenon.

The strength of the locally reflected light is in proportion to the Volume_Density. I do not know what the unit is here. When Volume_Density is 0, there is no fog.

The color of the locally reflected light is in Volume_Color. As is common with many shader things in Poser, it is therefore reasonable to assume that the rendered color is actually Volume_Color * Volume_Density, i.e. if things were named the same as other things, this should have been called Volume_Value, not Volume_Density, similar to Diffuse_Color/Value, Specular_Color/Value, Reflection_Color/Value, etc.

As you might have guessed, if Volume_Color is black (i.e. numerically 0) then there is no visible fog.

Rolling all this up, the equation I believe to be the underlying math is as follows:

Letting T be the color behind the fog, i.e. the transparency effect, each layer of atmosphere yields:

T + Diffuse(Volume_Color, Volume_Density)


In my shader, I modulated the Volume_Density. I used a P node to find the position of the fog plane currently being evaluated. Specifically, I used the P.y value to find the height of it. The rest is simple math to make a linear gradient in Y with a unit-span of 4 inches. The reference value is 25 inches + 5 * Clouds, which means there's some variation in density based on height. You get a little puffiness, which is more realistic.

I also modulated the Volume_Stepsize. I did that so the virtual fog planes are no longer parallel. Basically, I applied some randomized "displacement" to the fog planes by modulating their spacing, also using the same clouds node. This helps break up the fog planes and make them less easily detected by the eye.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)