[x3d-public] Defaults of SpotLight.cutOffAngle, beamWidth changed (maybe by mistake) in X3D 3.3

Michalis Kamburelis michalis.kambi at gmail.com
Sun Feb 13 20:10:03 PST 2022


Hi,

I just noticed an alarming regression at SpotLight definition across
X3D versions.

1. In VRML 97, X3D 3.0, 3.1 and 3.2 the default values are:

  - beamWidth pi/2
  - cutOffAngle pi/4

  This means that there is no smooth falloff from beamWidth to
cutOffAngle. Spot light has multiplier = 1 in range 0...pi/4, and then
it's zero outside of pi/4.

  I think this is the good definition. It makes sense as default.

  See:

  - VRML 97: http://tecfa.unige.ch/guides/vrml/vrml97/spec/part1/nodesRef.html#SpotLight

  - X3D 3.0: https://www.web3d.org/documents/specifications/19775-1/V3.0/Part01/components/lighting.html#SpotLight

  - X3D 3.1: this version seems to be published only as "diff from X3D
3.0", and it has no change regarding SpotLight, see
https://www.web3d.org/documents/specifications/19775-1/V3.1/Part01/components/lighting.html

  - X3D 3.2: https://www.web3d.org/documents/specifications/19775-1/V3.2/Part01/components/lighting.html#SpotLight

2. In X3D 3.3 and 4.0 however, the defaults are reversed:

  - beamWidth pi/4
  - cutOffAngle pi/2

  This makes a different behavior, and one that is IMHO less expected.
cutOffAngle pi/2 means that "total angle of spotlight" is pi, 180
degrees. This is possible, but unexpected as default for a spot light.
It's a very wide light, effectively shining on half of 3D space.

  See:

  - X3D 3.3: https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/lighting.html#SpotLight

  - X3D 4.0 draft:
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/lighting.html#SpotLight

What others do?

- Castle Game Engine and view3dscene always followed AD 1. I didn't
even know that there was a change to this in X3D 3.3.

- InstantReality (at least docs) also follows AD 1, looking at
https://doc.instantreality.org/documentation/nodetype/SpotLight/

- X3DOM (at least docs) is confused, judging from
https://doc.x3dom.org/author/Lighting/SpotLight.html . They say that
both cutOffAngle and beamWidth are both pi/2 by default, which is not
consistent with any X3D version.

I didn't test InstantReality or X3DOM in practice, only looked at docs now.

Proposal: let's fix X3D 4.0. Revert the defaults to what was in X3D 3.2:

  - beamWidth pi/2
  - cutOffAngle pi/4

Unless someone knows a good reason for change in X3D 3.3, I'm tempted
to call this just a simple human mistake when someone was editing X3D
3.3.

Regards,
Michalis



More information about the x3d-public mailing list