next up previous contents index
Next: Ether Up: More Mirage Features Previous: Background and Foreground

Fog

   The gas class is used for creating gaseous objects. Fog is a subclass of the Gas class which is a gas of constant density. Other types of gas can be defined as subclasses of the Gas class. For example you may want a gas of varying density to create effects such as steam rising from an object.

The Fog constructor requires the colour of the fog and a fog factor. The fog factor is the proportion of light that travels through one world-unit in the fog. For example if the fog factor is 0.25, then 25% of light remains after one world-unit. The colour at an object hit after one world unit would be 25% the object colour and 75% the fog colour. A good fog value is 0.95 for scenes with objects about 10 world-units from the camera.

  Fog(double r, double g, double b, double fog_f);

Fog can be applied in two ways. It can be applied to an object or it can be applied to the ether.





Sophie Day
Fri Feb 20 15:47:19 NZDT 1998