24.1.2

Replace Table 24.1 with the following:

24.2

Insert the following new heading after the 24.2 heading:

"24.2.1 Backgrounds"

Insert the following text as a new subclause:

24.2.2 Fog semantics

24.2.2.1 Overview

This part of ISO/IEC 19775 supports two types of fog:  global and local.

24.2.2.2 Global fog semantics

Global fog applies to the entire world and is specified using a Fog node. Global fog blends the colours of all objects with the fog colour based on distance from the object to the camera. The further the distance the greater the amount of fog colour.

24.2.2.3 Local fog semantics

Local fog applies only within the same transformation hierarchy that contains the LocalFog node. This limits the effect of the fog to subsets of the world and supports the creation of realistic effects such as a smoke-filled room inside a larger building that is not smoke-filled. If a local fog and a global fog are both defined and active, the lighting contribution from the local fog shall be used instead of the global effect.

Local fog effects shall not affect nodes derived from X3DBackgroundNode.

24.2.2.4 Local and bindable fog interaction

If a global Fog node is bound and a LocalFog node is enabled, the LocalFog node shall have precedence over the globally bound Fog node, in determining the fog colour contribution to the lighting equations defined in 17 Lighting component.

24.2.2.5 Fog colour calculation

During the traversal of the scene graph, if more than one LocalFog node is encountered in the path from the root to a given renderable leaf node, only the contribution of the LocalFog instance closest to the leaf node shall be used. All other fog values shall be ignored.”

24.3

Insert the following as a new subclause 24.3.2:

24.3.2 X3DFogObject

X3DFogObject {
  SFColor  [in,out] color           1 1 1    [0,1]
  SFString [in,out] fogType         "LINEAR" ["LINEAR"|"EXPONENTIAL"]
  SFFloat  [in,out] visibilityRange 0        [0,-∞)
}

X3DFogObject is the abstract type that describes a node that influences the lighting equation through the use of fog semantics. It defines the basic colour and rendering effects that influence the lighting equations as described in 17 Lighting component.”

24.4.2

Replace the first line of the Fog node declaration with:

“Fog : X3DBindableNode, X3DFogObject {”

24.4

Insert the following new nodes after the Fog node:

24.4.3 FogCoordinate

FogCoordinate : X3DGeometricPropertyNode {
  MFFloat [in,out] depth    []   [0,1]
  SFNode  [in,out] metadata NULL [X3DMetadataObject]
}

This node defines a set of explicit fog depths on a per-vertex basis. This depth value shall be applied per-vertex and used to replace the automatically generated depth. Fog coordinates take precedence over implicitly generated depths; specifying fog coordinates will result in the implicit depth (visibilityRange) being ignored. Details on lighting equations can be found in 17.2.2 Lighting model.

One depth value per vertex shall be supplied. If the user does not provide a  sufficient number of depth values, the last value defined shall be replicated for any further vertices. If too many depth values are supplied, the excess depth values shall be ignored.

24.4.4 LocalFog

LocalFog : X3DChildNode, X3DFogObject {
  SFColor  [in,out] color           1 1 1    [0,1]
  SFBool   [in,out] enabled         TRUE
  SFString [in,out] fogType         "LINEAR" ["LINEAR"|"EXPONENTIAL"]
  SFNode   [in,out] metadata        NULL     [X3DMetadataObject]
  SFFloat  [in,out] visibilityRange 0        [0,-∞)
}

The LocalFog 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 LocalFog node. The visibilityRange field specifies the distance in metres (in the local coordinate system) at which objects are totally obscured by the fog. 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. A visibilityRange of 0.0 disables the LocalFog node. The visibilityRange is affected by the scaling transformations of the LocalFog node’s parents; translations and rotations have no affect on visibilityRange.

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.

The effect of fog on lighting calculations is described in 17 Lighting component.”

24.4.3

Renumber the TextureBackground subclause as "24.4.5".

24.4.3, 3rd paragraph

Replace the 3rd paragraph with the following text:

"TextureBackground supports a transparency value that allows the scene to overlay other elements in an application. A transparency value of zero specifies that the background is fully opaque obscuring all content in the underlying window. A transparency value of one specifies that the background specified by the TextureBackground node is fully transparent causing the TextureBackground to not be visible so that all underlying content appears as the background. The value of the transparency field is applied to the skyColor and groundColor by first converting the transparency value to an alpha value using the formula:

alpha = (1 - transparency)

The alpha value is then multiplied against the components of the skyColor and groundColor (including the alpha component, if provided) to obtain the color that is applied to the underlying window content. The transparency value is not applied to the six texture fields. Transparency of these fields can be achieved by using alpha values within their images."

24.5

In the HTML, change the bookmark for 24.5 to "SupportLevels".

24.5, Table 24.2

Append the following text to Table 24.2:

4 Core 1
Time 1
Grouping 1
   
All Level 3 Environmental Effects nodes All fields fully supported.
FogCoordinate All fields fully supported.
    LocalFog All fields fully supported.