Post

EnvironmentLight

EnvironmentLight

Overview

EnvironmentLight node uses an environment map to represent incident illumination around a point, and can be used to show reflections of distant objects. The EnvironmentLight node supports Image Based Lighting (IBL) techniques by specifying light-source intensity around a given location (i.e., the environment) as a cube map. EnvironmentLight defines both specular radiance and diffuse irradiance, converting an environment map into an irradiance map that shows how much light comes from any particular direction.

The EnvironmentLight node belongs to the Lighting component and requires at least support level 3, its default container field is children. It is available from X3D version 4.1 or higher.

Info: Please note that this node is still experimental, i.e. the functionality of this node may change in future versions of X_ITE.

Hierarchy

1
2
3
4
+ X3DNode
  + X3DChildNode
    + X3DLightNode
      + EnvironmentLight

Fields

TypeAccess TypeNameDefault Value
SFNode[in, out]metadataNULL
SFBool[in, out]globalFALSE
SFBool[in, out]onTRUE
SFColor[in, out]color1 1 1
SFFloat[in, out]intensity1
SFFloat[in, out]ambientIntensity0
SFVec3f[in, out]origin0 0 0
SFRotation[in, out]rotation0 0 1 0
MFFloat[in, out]diffuseCoefficients[ ]
SFNode[in, out]diffuseTextureNULL
SFNode[in, out]specularTextureNULL
SFBool[in, out]shadowsFALSE
SFColor[in, out]shadowColor0 0 0
SFFloat[in, out]shadowIntensity1
SFFloat[in, out]shadowBias0.005
SFInt32[ ]shadowMapSize1024

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] global FALSE

global field affects the scope of lighting effects produced by the EnvironmentLight node, and has no effect on the computation of environment textures. Global lights illuminate all objects within their volume of lighting influence. Scoped lights only illuminate objects within the same transformation hierarchy.

Warning

  • DirectionalLight default global=false to limit scope and avoid inadvertently illuminating every object in a large scene. PointLight and SpotLight default global=true since their effects are each limited by maximum radius value.

SFBool [in, out] on TRUE

Enables/disables this light source.

SFColor [in, out] color 1 1 1 [0,1]

color of light, applied to colors of objects.

Hint

SFFloat [in, out] intensity 1 [0,∞)

Brightness of direct emission from the light.

SFFloat [in, out] ambientIntensity 0 [0,1]

Brightness of ambient (nondirectional background) emission from the light.

Hint

  • In Interchange profile this field may be ignored, applying the default value regardless.

SFVec3f [in, out] origin 0 0 0 (-∞,∞)

origin defines the relative position for observing the surrounding scene to create an environment texture. Input illumination to the EnvironmentLight node reflects all scene illumination visible at the node origin.

SFRotation [in, out] rotation 0 0 1 0 [-1,1] or (-∞,∞)

rotation field represents the overall rotation of the IBL environment.

MFFloat [in, out] diffuseCoefficients [ ]

diffuseCoefficients field provides a 3 x 9 array of float values providing spherical harmonic coefficients for low-frequency characteristics of the environment map to produce an irradiance map corresponding to glTF irradianceCoefficients field.

SFNode [in, out] diffuseTexture NULL [X3DEnvironmentTextureNode]

diffuseTexture defines explicit precomputed X3DEnvironmentTextureNode (ComposedCubeMapTexture, GeneratedCubeMapTexture, ImageCubeMapTexture) nodes as the image source for the EnvironmentLight. When applying diffuseColor for this light node, the contained texture provides Physically Based Rendering (PBR) modulation for each pixel.

Hint

  • If texture node is NULL or unspecified, no effect is applied.

Warning

  • Contained texture node must include containerField='diffuseTexture'

SFNode [in, out] specularTexture NULL [X3DEnvironmentTextureNode]

specularTexture defines explicit precomputed X3DEnvironmentTextureNode (ComposedCubeMapTexture, GeneratedCubeMapTexture, ImageCubeMapTexture) nodes as the image source for the EnvironmentLight. When applying specularColor for this light node, the contained texture provides Physically Based Rendering (PBR) modulation for each pixel.

Hint

  • If texture node is NULL or unspecified, no effect is applied.

Warning

  • Contained texture node must include containerField='specularTexture'

SFBool [in, out] shadows FALSE

shadows field indicates whether or not this light casts a shadow behind illuminated X3DShapeNode geometry.

SFColor [in, out] shadowColor 0 0 0 [0,1] non-standard

Color of shadow, applied to colors of objects.

SFFloat [in, out] shadowIntensity 1 [0,1]

shadowIntensity field defines how much light is obscured by shapes that cast shadows, ranging from 0 (light not obscured, no visible shadows) to 1 (light completely obscured, full-intensity shadows).

SFFloat [in, out] shadowBias 0.005 [0,1] non-standard

The shadowBias value controls the visibility of shadow acne.

SFInt32 [ ] shadowMapSize 1024 [0,∞) non-standard

Size of the shadow map in pixels, must be power of two.

Advice

Hints

  • Lights have no visible shape themselves and lighting effects continue through any intermediate geometry.
  • The bound NavigationInfo controls whether the user headlight is enabled on/off.
  • Wikipedia Cube mapping

See Also

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