Pinecoast
 
Basic
Handbag
Cell Phone
Watch
 
Basic 3D Geometry
Messaging
Background
Butterflies
Fog
Color Interpolator
3D Shapes
2D Shapes
Textures
Material
IndexedFaceSet
Layering
Overlay
Shaders 1
Shaders 2
 
     


Tutorial: Fog

The Fog Node

Linear Fog

The key fields for a Fog Node are color, visibilityRange, and fogtype. The color of the fog illustrated is white or (1, 1, 1), which is the default color. The visibilityRange is the visible distance and is given in meters. If the visibilityRange is 0, the fog is dsiabled. The fogtype can be either LINEAR or EXPONENTIAL. The fog at the left is linear, while the fog below is exponential. Both have the same visibility range.

Exponential Fog

This image has an exponential fog. The ground may or may not be visible, depending on the fog type and the browser plug-in being used.

Backgrounds

Fog and Background

Backgrounds are not effected by fog. In the illustration the pink box is partially hidden by a fog, but the background is not affected at all. To make the background disappear into the fog it is necessary to create a background that is a single color matching the fog color. The code for a light gray fog with matching background is shown below.

Fog {
    color 0.9 0.9 0.9
    fogType "EXPONENTIAL"
    visibilityRange 50
}
Background {
    skyColor 0.9 0.9 0.9
}



Download tutorial files





     
 
 

SwirlX3D Viewer


The SwirlX3D Viewer is a free standalone application for viewing VRML, X3D. It also displays sw3d archives created by the SwPublish program.
The professional version also displays files from other formst such as Collada(DAE), 3DS, OBJ, PLY, STL and IGES (IGS).
For more details ...

 

SwTranslator for VRML, X3D and Collada


The SwTranslator can export VRML, X3D, Collada(DAE), 3DS, OBJ, PLY, STL or IGES files to VRML, X3D or Collada. For X3D this offers a migration path for importing high quality 3D models from a variety of sources. For Collada, it offers an opportunity to bring geometry and animation into this increasingly popular format.
For more details ...