[x3d-public] Light intensity now unbounded in X3D4, fixed schema/X3DUOM and renamed intensityType as unitIntervalType

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Sun Jan 16 08:51:38 PST 2022


Historically in X3D3 light intensity values have been bounded [0,1] inclusive.  While performing regression testing found an unhandled example of <DirectionalLight global='true' intensity='3'/> derived from a glTF model conversion.


  *   GlamVelvetSofa.x3d which was converted by view3dscene from glTF example:
  *   https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/GlamVelvetSofa/glTF/GlamVelvetSofa.gltf
  *   https://X3dGraphics.com/examples/X3dForAdvancedModeling/GltfSampleModels/GlamVelvetSofa.x3d
  *   https://X3dGraphics.com/examples/X3dForAdvancedModeling/GltfSampleModels/GlamVelvetSofaIndex.html

As part of X3D4 Architecture, all light intensity values are now allowed to have any non-negative value.



  *   X3D 4, Lighting component, 17.3.1 X3DLightNode
  *   https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/lighting.html#X3DLightNode
17.3.1 X3DLightNode
X3DLightNode : X3DChildNode {
  SFFloat [in,out] ambientIntensity 0     [0,1]
  SFColor [in,out] color            1 1 1 [0,1]
  SFBool  [in,out] global           FALSE
  SFFloat [in,out] intensity        1     [0,∞)
  SFNode  [in,out] metadata         NULL  [X3DMetadataObject]
  SFBool  [in,out] on               TRUE
  SFBool  [in,out] shadows          FALSE
  SFFloat [in,out] shadowIntensity  1     [0,1]
}

Also

  *   17.2.1 Light source semantics, 17.2.1.1 Overview
  *   https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/lighting.html#LightSourceSemantics

Any node used as a source of illumination is derived from X3DLightNode<https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/lighting.html#X3DLightNode>. All light sources contain an intensity, a color, and an ambientIntensity field. The intensity field specifies the brightness of the direct emission from the light, and the ambientIntensity specifies the intensity of the ambient emission from the light. Light intensity may range from 0.0 (no light emission) to infinity. The color field specifies the spectral colour properties of both the direct and ambient light emission as an RGB value. The on field specifies whether the light is enabled or disabled. If the value is FALSE, the light is disabled and will not affect any nodes in the scene. If the value is TRUE, the light will affect other nodes according to the 17.2.1.2 Scoping of lights<https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/lighting.html#ScopingOfLights>.
Typically lighting intensity values are within range [0,1] for consistent composability of multiple scenes with independent lights.


1.  Dick, I think we need to check the above wording to avoid ambiguity since ambientIntensity and shadowIntensity remain in range [0,1]

2. Have relaxed upper bounds on lighting intensity in X3D4 schema and X3DUOM.

Since the restriction of [0,1] appears many times, an internal type name is used.  As indicated in Schema changelog entry which follows, am renaming it for clarity and correctness. This has no effect on specification, since it is not an official data type, but it does help X3D XML Schema and X3DUOM-derived codebases be exactly consistent and correct.

- rename intensityType as unitIntervalType for correctness
  https://en.wikipedia.org/wiki/Unit_interval
- (v4.0) relax upper bounds on light intervals, previously [0,1] now [0,infinity]
  which matches glTF Physically Based Rendering (PBR) parameters

This change will ripple through various APIs and stylesheets in the next few days.  So far, deployed in X3D XML Schema, X3DUOM and X3DJSAIL.

Confirmation/correction comments and questions are always welcome.  Once again thanks to Michalis Kamburelis for his rigorous design alignment of X3D with glTF.

Have intense fun with X3D!  8)

all the best, Don
--
Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149
X3D graphics, virtual worlds, Navy robotics https:// faculty.nps.edu/brutzman

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220116/019fcbc5/attachment.html>


More information about the x3d-public mailing list