This component defines special rendering effects.
Background
defines the sky colors and textures.
Fog
and LocalFog
simulate natural fog.
See also X3D specification of the Environmental effects component.
This component defines nodes that change the environment ("how all the scene content looks").
In particular it deals with fog and background features.
Background
(Pascal API: TBackgroundNode
)
Display a 3D background (visible around the scene content)
using a textured cube (skybox) around,
or a gradient of colors.
TextureBackground
(Pascal API: TTextureBackgroundNode
)
Similar to Background
but allows to specify
each skybox side as a texture node.
This allows e.g. using MovieTexture
to animate the background
like a movie.
Fog
(Pascal API: TFogNode
)
Specifies global fog, making objects that are more distant blend to a constant
fog color.
LocalFog
(Pascal API: TLocalFogNode
)
Similar to Fog
, but the effect is limited to a group of X3D shapes.
FogCoordinate
(Pascal API: TFogCoordinateNode
)
Can be used within various geometry nodes,
like IndexedFaceSet
,
to provide explicit fog densities for each point
(instead of calculating fog density based on the distance to observer).
This allows for various for effects, e.g. a fog may be concentrated at some
3D position (regardless of the observer).
Note that depths (in FogCoordinate.depth
) are sensible
only in the [0, 1] range (like allowed by the specification),
and are not affected by the Fog.visibilityRange
(also following the spec). Effectively, this means that FogCoordinate.depth
does not substitute the mere distance to the eye in the fog equation.
Instead, it specifies directly the fog intensity.
I understand that this is the intention of the spec, although the wording
is clumsy (not saying directly what "implicit depth" is —
fog input distance or fog output intensity).