Using as transmittance value of 0.2 as in
the fog's translucency never drops below 20% as you can see in the resulting image (fog2.pov).
The filter value determines the amount of light that is filtered by the fog. In our example 100% of the light passing through the fog will be filtered by the fog. If we had used a value of 0.7 only 70% of the light would have been filtered. The remaining 30% would have passed unfiltered.
You'll notice that the intensity of the objects in the fog is not only diminished due to the fog's color but that the colors are actually influenced by the fog. The red and especially the blue sphere got a green hue.
The turbulence keyword is used to specify the amount of turbulence used while the turb_depth value is used to move the point at which the turbulence value is calculated along the viewing ray. Values near zero move the point to the viewer while values near one move it to the intersection point (the default value is 0.5). This parameter can be used to avoid noise that may appear in the fog due to the turbulence (this normally happens at very far away intersection points, especially if no intersection occurs, i. e. the background is hit). If this happens just lower the turb_depth value until the noise vanishes.
You should keep in mind that the actual density of the fog does not change. Only the distance-based attenuation value of the fog is modified by the turbulence value at a point along the viewing ray.
The following example (fog5.pov) uses a ground fog which has a constant density below y=25 (the center of the red sphere) and quickly falls off for increasing altitudes.
Just try the following example (fog6.pov).
You can combine constant density fogs, ground fogs, filtering fogs, non-filtering fogs, fogs with a translucency threshold, etc.
Section 4.10.3.5
Using Ground Fog
The ground fog only covers the lower parts of the world.
Section 4.10.3.6
Using Multiple Layers of Fog
Quite nice results can be achieved using multiple layers of fog.
Section 4.10.3.7
Fog and Hollow Objects
In order to avoid this problem you have to make all those objects hollow by either making sure the camera is outside these objects (using the inverse keyword) or by adding the hollow to them (which is much easier).
The atmosphere feature can be used to model the interaction of light with particles in the air. Beams of light will become visible and objects will cast shadows into the fog or dust that's filling the air.
The atmosphere model used in POV-Ray assumes a constant particle density everywhere except solid objects. If you want to create cloud like fogs or smoke you'll have to use the halo texturing feature described in section "Halos".
Imagine a simple room with a window. Light falls through the window and is scattered by the dust particles in the air. You'll see beams of light coming from the window and shining on the floor.
We want to model this scene step by step. The following examples start with the room, the window and a spotlight somewhere outside the room. Currently there's no atmosphere to be able to verify if the lighting is correct (atmos1.pov).
The point light source is used to illuminate the room from inside without any interaction with the atmosphere. This is done by adding atmosphere off . We don't have to care about this light when we add the atmosphere later.
The spotlight is used with the atmospheric_attenuation keyword. This means that light coming from the spotlight will be diminished by the atmosphere.
The union object is used to model the room and the window. Since we use the difference between two boxes to model the room (the first two boxes in the difference statement) there is no need for setting the union hollow. If we are inside this room we actually will be outside the object (see also "Using Hollow Objects and Atmosphere").
The type keyword selects the type of atmospheric scattering we want to use. In this case we use the isotropic scattering that equally scatters light in all directions (see "Atmosphere" for more details about the different scattering types).
The samples keyword determines the number of samples used in accumulating the atmospheric effect. For every ray samples are taken along the ray to determine whether a sample is lit by a light source or not. If the sample is lit the amount of light scattered into the direction of the viewer is determined and added to the total intensity.
You can always start with an arbitrary number of samples. If the results do not fit your ideas you can increase the sampling rate to get better results. The problem of choosing a good sampling rate is the trade-off between a satisfying image and a fast rendering. A high sampling rate will almost always work but the rendering will also take a very long time. That's something to experiment with.
The distance keyword specifies the density of the atmosphere. It works in the same way as the distance parameter of the fog feature.
Last but not least will the scattering value determine the amount of light that is scattered by the particles (the remaining light is absorbed). As you'll later see this parameter is very useful in adjusting the overall brightness of the atmosphere.
Looking at the image created from the above scene you'll notice some very ugly anti-aliasing artifacts known as mach-bands. They are the result of a low sampling rate.
How this effect can be avoid is described in the following section.
Section 4.10.4
The Atmosphere
Section 4.10.4.1
Starting With an Empty Room
The empty room we want to start with.
Section 4.10.4.2
Adding Dust to the Room
After adding some dust beams of light become visible.
Table Of Contents