LocalFog
Overview
LocalFog simulates atmospheric effects by blending distant objects with fog color. LocalFog effects occur around the local transformation center, rather than bound to the viewer. The nearest LocalFog node within range takes precedence over other LocalFog and Fog nodes.
The LocalFog node belongs to the EnvironmentalEffects component and requires at least level 4, its default container field is children. It is available from X3D version 3.0 or higher.
Hierarchy
1
2
3
+ X3DNode
+ X3DChildNode
+ LocalFog (X3DFogObject)*
* Derived from multiple interfaces.
Fields
SFNode [in, out] metadata NULL [X3DMetadataObject]
Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.
Hint
SFBool [in, out] enabled TRUE
Enables/disables node operation.
SFString [in, out] fogType “LINEAR” [“LINEAR”|”EXPONENTIAL”]
Specifies algorithm for rate of increasing Fog, either LINEAR or EXPONENTIAL.
Hint
- EXPONENTIAL is more natural but also more computationally expensive.
Warning
- Do not wrap extra quotation marks around these SFString enumeration values, since “quotation” “marks” are only used for MFString values.
SFColor [in, out] color 1 1 1 [0,1]
Fog color.
Hints
- Match Background color to make objects fade away.
- X3D Scene Authoring Hints, Color
SFFloat [in, out] visibilityRange 0 [0,-∞)
Distance in meters where objects are totally obscured by the fog, using local coordinate system.
Hint
- visibilityRange 0 disables Fog.
Advice
Hints
- LocalFog effects are based on its position in the world, as given by current transformation hierarchy.
- LocalFog effects remain independent of current view location.
Warnings
- LocalFog only affects geometry within the same scene subgraph.
- LocalFog is not a bindable node.