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

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Sun Feb 13 23:43:17 PST 2022


Thanks for looking at this Michalis.  Further detail is available at 

 

*	Mantis 441: 17.4.3 SpotLight -- Default Values
*	https://www.web3d.org/member-only/mantis/view.php?id=441 

 

Essential point: beamWidth is the inner angle of full intensity,
cutOffAngle is the outer angle of zero intensity. Thus default values need
to have cutOffAngle > beamWidth.

 

So I think that this change, performed in 2009, fixed a prior problem in
the specification.  Brightest area needs to be the inside cone, with
intensity gradually fading until reaching the outside cone.

 

Hopefully that now looks better to you.  Thanks for all scrutiny.

 

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

17.4.4 SpotLight

SpotLight : X3DLightNode {

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

  SFVec3f [in,out] attenuation      1 0 0    [0,∞)

  SFFloat [in,out] beamWidth        π/4      (0,π/2]

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

  SFFloat [in,out] cutOffAngle      π/2      (0,π/2]

  SFVec3f [in,out] direction        0 0 -1   (-∞,∞)

  SFBool  [in,out] global           TRUE

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

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

  SFNode  [in,out] metadata         NULL     [X3DMetadataObject]

  SFBool  [in,out] on               TRUE

  SFFloat [in,out] radius           100      [0,∞)

  SFBool  [in,out] shadows          FALSE

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

}

 

p.s. I just confirmed correctly matching values in X3D XML Schema and DTD.

 

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

 

From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of Michalis
Kamburelis
Sent: Sunday, February 13, 2022 8:42 PM
To: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: Re: [x3d-public] Defaults of SpotLight.cutOffAngle, beamWidth
changed (maybe by mistake) in X3D 3.3

 

Note: I have a hypothesis why this happened. 

 

The drawing presented at SpotLight description (it is the same in all X3D
versions) shows a situation when beamWidth < cutOffAngle. The drawing shows
a situation when these is smooth falloff between beamWidth and cutOffAngle.
Maybe someone thought that defaults do not match this drawing, ans thus
reversed the defaults.

 

I would say that the drawing just doesn't, and never meant to, show the
default state. It just shows an example state that is possible.

 

Regards,

Michalis

 

W dniu pon., 14.02.2022 o 05:10 Michalis Kamburelis
<michalis.kambi at gmail.com <mailto:michalis.kambi at gmail.com> > napisał(a):

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
<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftecfa.unig
e.ch%2Fguides%2Fvrml%2Fvrml97%2Fspec%2Fpart1%2FnodesRef.html%23SpotLight&dat
a=04%7C01%7Cbrutzman%40nps.edu%7C972a74edb7824c76fc3108d9ef7482c4%7C6d936231
a51740ea9199f7578963378e%7C0%7C0%7C637804107010181974%7CUnknown%7CTWFpbGZsb3
d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&
sdata=r%2F8dM%2Fl0AGcdQUSl9%2By54XVM241u2DGlf5%2FPjgrs7xk%3D&reserved=0> 

  - 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/
<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoc.insta
ntreality.org%2Fdocumentation%2Fnodetype%2FSpotLight%2F&data=04%7C01%7Cbrutz
man%40nps.edu%7C972a74edb7824c76fc3108d9ef7482c4%7C6d936231a51740ea9199f7578
963378e%7C0%7C0%7C637804107010181974%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=p3sdxxr5to%
2FGHWyHbRLLlOHQVSgTCRk4irh4U8ghVnI%3D&reserved=0> 

- X3DOM (at least docs) is confused, judging from
https://doc.x3dom.org/author/Lighting/SpotLight.html
<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoc.x3dom
.org%2Fauthor%2FLighting%2FSpotLight.html&data=04%7C01%7Cbrutzman%40nps.edu%
7C972a74edb7824c76fc3108d9ef7482c4%7C6d936231a51740ea9199f7578963378e%7C0%7C
0%7C637804107010181974%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV
2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4udwotGWwFUAjgJhxkrHEGAOT
mivSThahFNbopq7ooc%3D&reserved=0>  . 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220214/39ca4954/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5353 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220214/39ca4954/attachment-0003.p7s>


More information about the x3d-public mailing list