OpenGL VRML Shockwave 3D
Home Tutorials Books Applications Tools Docs Models Textures

Send me bugs and suggestions, please
VRML Script Tutorial
Full list

VRML Interactive Tutorial

Introduction
VRML File Structure
Drawing: Shape node
Geometry Nodes:
Box
Sphere
Cone
Cylinder
PointSet
IndexedLineSet
IndexedFaceSet
Extrusion
ElevationGrid
Example: Chessboard
Text
FontStyle
Appearance
Material
Textures
Image Texture
Movie Texture
Pixel Texture
Texture Coordinate
Texture Transform
Let there be Light
Directional Light
Point Light
Spot Light
Materials with Colored Lights
Hierarchical Node Structures
Group
Transform
Collision
Anchor
Billboard
Switch
Inlining Files
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Creating Paths between events: ROUTE
Generating Events based on Timers or User Actions
Timers
Touch Sensor
Visibility Sensor
Dragging Sensors
Plane Sensor
Sphere Sensor
Cylinder Sensor
Proximity Sensors
Example: Proximity sensor
Interpolators
Color
Coordinate
Normal
Orientation
Position
Scalar
Example
Let the Music Play
Sound
AudioClip
Bindable Nodes
Who Am I: NavigationInfo
Where Am I: ViewPoint
Adding Realism to the world
Background
Fog
Information about your world
WorldInfo
Definition for Auxiliary Nodes
Coordinate
Color
Normal

Fog Node


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 results.
  • 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.


  • Syntax:
    Fog {
    color 1 1 1
    fogType "LINEAR"
    visibilityRange 0
    }


    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.



    Site designed and maintained by António Ramires Fernandes
    Your comments, suggestions and references to further material are welcome!

    Lighthouse 3D privacy statement