VRML Script Tutorial
VRML Interactive Tutorial
Let there be Light
Materials with Colored Lights
VRML File Structure
Drawing: Shape node
Hierarchical Node Structures
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Let the Music Play
Adding Realism to the world
Information about your world
Definition for Auxiliary Nodes
The Fog node can be used to add realism to your world. It provides atmosphere,
creating a mist or a heavy fog depending on the fields specified. This
node is a bindable node.
The fields for this node are:
color specifies the color of the fog
fogType specifies how the fog's density increases with distance.
Allowed values are "LINEAR" and "EXPONENTIAL". "LINEAR"
fog increases linearly with distance, this provides some degree of depth
perception, however the "EXPONENTIAL" fog provides more natural
visibilityRange defines a distance at which the objects are
totally obscured by the fog. Objects which are further away from the user
than visibilityRange will have their color changed to color.
Objects closer to the user will have their color blended with the color
specified, the amount of blending is relative to the distance. A value
of 0 means no fog.
color 1 1 1
The position of this node does not affect its scope, i.e. the fog affects
all shapes being drawn. The Fog node does not affect the Background,
i.e. regardeless of the Fog field values the Background
is always visible. To obtain a more realistic effect the Background
should be the same color as the Fog.
In the VRML example provided, the Spheres are placed ten
meters apart in the Z axis and a white Background is used.