Atmospheric Attenuation

Also referred to as fog or depth cueing, atmospheric attenuation causes the scene to be rendered such that objects appear to fade into the distance (into the fog). It is implemented via a linear interpolation model. In the linear model, the color at each vertex of a primitive is dependent on it's position relative to two reference planes perpendicular to the viewing axis. Given hither and yon plane values, the color is calculated as:

atmospheric attenuation = (z - yon) / (hither - yon)

final color = atmospheric attenuation * input color + (1 - atmospheric attenuation) * background color

It is enabled by calling:

HC_Set_Rendering_Options("atmospheric attenuation [= (hither = x.x, yon = x.x)]");

In general, the hither and yon planes should reflect the extent of the objects in camera space (see Compute_Coordinates and Compute_Circumsphere for conversions to this coordinate system). (HOOPS/3dGS does not currently provide user control of hither and yon planes for use by the z-buffer.)

A bridge on the left and atmospheric attenuation applied to the bridge image on the right to give a foggy effect.

The sample program depthcue.c shows how to use atmospheric attenuation.

top_level:2 prog_guide:0 prog_guide/3DGS:5