Node: Fog

X3D: 3.3
Component: EnvironmentalEffects

Quick Links

➨ Fields

The Fog node provides a way to simulate atmospheric effects by blending objects with the colour specified by the color field based on the distances of the various objects from the viewer. The distances are calculated in the coordinate space of the Fog node.

HTML Encoding and Default Values

<Fog bind='false' color='(1,1,1)' description='""' fogType='"LINEAR"' isActive='false' metadata='X3DMetadataObject' visibilityRange='0' ></Fog>


These are the X3D / X3DOM fields of this node. Values should usually be received / set as strings via DOM functions (i.e., using setAttribute("myFieldName", "myFieldValue") and getAttribute("myFieldName")).
Name Type Default Value Range Inheritance Standard Description
bind SFBool false Core/X3DBindableNode Pushes/pops the node on/from the top of the bindable stack
color SFColor (1,1,1) [0,1] X3DFogNode Objects located outside the visibilityRange from the viewer are drawn with a constant colour of color. Objects very close to the viewer are blended very little with the fog color.
description SFString "" Core/X3DBindableNode Description of the bindable node
fogType SFString "LINEAR" {"LINEAR","EXPONENTIAL"} X3DFogNode The fogType field controls how much of the fog colour is blended with the object as a function of distance. If fogType is "LINEAR", the amount of blending is a linear function of the distance, resulting in a depth cueing effect. If fogType is "EXPONENTIAL," an exponential increase in blending is used, resulting in a more natural fog appearance.
isActive SFBool false Core/X3DBindableNode
metadata SFNode X3DMetadataObject Core/X3DNode Field to add metadata information
visibilityRange SFFloat 0 [0, -inf] X3DFogNode The visibilityRange specifies the distance in length base units (in the local coordinate system) at which objects are totally obscured by the fog. A visibilityRange of 0.0 disables the Fog node. The visibilityRange is affected by the scaling transformations of the Fog node's parents; translations and rotations have no affect on visibilityRange.