Post

Fog

Overview

Fog simulates atmospheric effects by blending distant objects with fog color.

The Fog node belongs to the EnvironmentalEffects component and requires at least level 2, its default container field is children. It is available since VRML 2.0 and from X3D version 3.0 or higher.

Hierarchy

1
2
3
4
+ X3DNode
  + X3DChildNode
    + X3DBindableNode
      + Fog (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] set_bind

Receiving event set_bind=true activates and binds this node at the top of the binding stack. Receiving event set_bind=false deactivates and unbinds this node from the top of the binding stack. Thus setting set_bind to true/false will enable/disable the effect of this node.

Hint

  • Paired node operations can be established by connecting set_bind and isBound fields of corresponding bindable nodes.

Warning

  • It is an error to define this transient inputOnly field in an X3D file, instead only use it a destination for ROUTE events.

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

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.

SFBool [out] isBound

Output event true gets sent when node becomes bound and activated, otherwise output event false gets sent when node becomes unbound and deactivated.

Hint

  • Paired node operations can be established by connecting set_bind and isBound fields of corresponding bindable nodes.

Warning

  • It is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.

SFTime [out] bindTime

Event sent reporting timestamp when node becomes active/inactive.

Warning

  • It is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.

Advice

Hint

Warning

Example

See Also

This post is licensed under CC BY 4.0 by the author.