|
Simple
fog is the basic environment fog settings used when
creating fog effects in Maya. As with any environment
fog type, Maya creates a volumetric material. In
the case of simple fog attributes, the clipping
distance can be adjusted as well as the height,
saturation point and color.

Above
is a scene created primarily from polygonal surfaces
with textures taken from a library. The environment
fog has not been added yet so that you can reference
changes with Simple Fog. To add the environment
fog go the the Render Options within the Render
Globals and click on the box to the right of the
Environment Fog field.

When examining the fog layout in the Hypershade notice
that the envFogMaterial is connected as a Volume Material.
This is rendered as a volume within the scene and
is not assigned to a surface. In addition a envFogLight
node is created which is light linked to the envFogSE.
The envFogLight does not illuminate the geometry within
the scene, it is used to exclusively link the EnvFogSE
to the light object. If the fog requires an illumination
source, the light can be activated by turning on "Illuminates
by Default" in the lights attributes.

The
image above shows the basic results of Simple Fog.
The Saturation Distance is the only thing modified
to control where the fog is the most dense. The
Saturation Distance is expressed in terms of grid
units from the rendered camera view. For example
this scene is approximately 26 cm from camera to
the buildings at the end of the street and the Saturation
Distance is 8 cm or ~1/3 the depth.

Using
the same setting as the last image the Saturation
Distance is set to 30 cm or just behind the buildings
at the end of the street.

Clipping
planes are also useful for giving fog a distance
start and end point. In the envFog attributes there
are two modes for clipping. Fog Near/Far adjusts
the fog clip distance locally offset from the camera.
The Camera Near/Far uses the cameras clipping plane
values as set by the camera attribute editor. In
the above example the Fog Near/Far is set just before
the overpass for the Near and to 200 cm for the
Far. The Saturation Distance is set to the same
depth as the Near clip to create a sharp wall of
fog.

Use Height -ON enables the fog to grade from a top
to bottom height within a scene. The Min/Max value
is set to the working grid units so that is determines
exactly where the fog deminishes. The Blend Range
controls how quickly the fog grades as it approaches
the boundary of the Min/Max Height. In the above scene
the fog Min is at the ground level 0 and the max is
set just above the height of the camera. Additionally,
a Fog Near/Far value clips the start of the fog to
be a few units from the camera with the Saturation
Distance also a few units from camera.

Once
the camera moves above or below the Min/Max Height,
a sharp boundary exists for the height clip. In
this example the Fog Max Height is below the camera.

Color Based Transparency by default is ON which makes
darker color values more transparent. This is the
opposite of transparency in shaders which darker colors
are more opaque. If you wanted to create a smoggy
scene or have the appearance of light being blocked
by thick smoke, turn OFF Color Based Transparency.
The image above uses this idea to create a low smog
bank. The Height Min/Max is set closely below and
above the camera with a high Blend Range (6) to soften
the outer limits.

This example uses a very dark color value with Color
Based Transparency unpicked. The Use Height is OFF
and the Saturation Distance is just before the bridge
to create a dark gloom.
Use Layer is the last option in the Simple Fog Attributes.
When writing the tutorial I was unable to get results
claimed to be achieved in the manuals. Namely the
ability to map the fog with a 3D volume texture to
break up the density of fog. If I am able to solve
this mystery it will be added to the tutorial.
|