[x3d-public] NIST conformance example behaviour

Andreas Plesch andreasplesch at gmail.com
Sat Jan 21 19:49:27 PST 2017


Don, thanks. Example looks good now.

While the script node itself is not binding the NavigationInfo node, it is
still bound at some (early, scene setup) point.

Therefore the no DEF/USE rule still would apply ?

Andreas


On Jan 21, 2017 7:44 PM, "Don Brutzman" <brutzman at nps.edu> wrote:

[Apologies for delayed response.  Am now returned home following an amazing
Web3D Korea Chapter annual meeting in Seoul.  Slidesets to follow there.]

        http://www.web3d.org/event/web3d-korea-chapter-meeting-2017


On 1/19/2017 1:55 PM, Andreas Plesch wrote:

> Cobweb does not follow the described behaviour of this NIST conformance
> example:
>
> http://www.web3d.org/x3d/content/examples/ConformanceNist/
> BindableNodes/NavigationInfo/headlight_rangeIndex.html
>
> , and with good reason:
>
> https://github.com/create3000/cobweb/issues/26
>
> Simply put, the NavigationInfo node field in the script is never bound.
> Should it be ?
>

The example is certainly a bit confusing.  Further analysis follows below.

I believe that script NavigationInfo node should just USE the NAV1 and
> bound NavigationInfo node, similar to script SFNode field usage in other
> examples.
>
> Are we overlooking something ?
>
> -Andreas
>

and then


On 1/21/2017 7:27 AM, Andreas Plesch wrote:

> Hi Patrick,
>
> thanks, very helpful background info.
>

+1


So what to do with the x3d version of the example ? An option may be to
> return to the original VRML setup but add a comment that behavior is
> undefined ?
>
> Andreas
>

I can check in any changes we want to make, then redeploy results.

I think that DEF/USE of bindable nodes is quite important, that is how a
Script can accomplish by-field direct value modification of another node in
the scene graph (as opposed to sending an event via a ROUTE).

Depending on how email dialog for this issue sorts out, it might be a good
short topic during a weekly X3D teleconference.

Follow-on action includes checking for similar issues in other NIST
Conformance Suite tests (it tends to be quite thorough) and adding
corresponding diagnostic rules to X3D Schematron.


On Sat, Jan 21, 2017 at 7:52 AM, Patrick Dähne <
> patrick.daehne at igd.fraunhofer.de <mailto:patrick.daehne at igd.fraunhofer.de>>
> wrote:
>
>     Hello Andreas,
>
>     > I believe that script NavigationInfo node should just USE the NAV1
> and bound NavigationInfo node, similar to script SFNode field usage in
> other examples.
>     >
>     > Are we overlooking something ?
>
>     No, you’re right. The NIST conformance test suite on the Web3D page is
> not the original test suite, it’s a version transformed from the original
> VRML files to X3D files. And that transformation introduced errors.
>

Well I'm hoping that effort fixed more errors that it introduced...  8)

... and we certainly have every opportunity to continue improving the
examples.  They are published as open source under a nonrestrictive
nonviral (BSD-style) Web3D Consortium license.

        <meta name='license' content=' ../../license.html'/>

        http://www.web3d.org/x3d/content/examples/ConformanceNist/
license.html

Please note the original NIST disclaimer in all of the current archive
examples:

<meta name='disclaimer' content=' This file was provided by the National
Institute of Standards and Technology, and is part of the X3D Conformance
Test Suite, available at http://www.nist.gov/vrml.html The information
contained within this file is provided for use in establishing conformance
to the ISO VRML97 Specification. Conformance to this test does not imply
recommendation or endorsement by the National Institute of Standards and
Technology. This software can be redistributed and/or modified freely
provided that any derivative works bear some notice that they are derived
from it, and any modified versions bear some notice that they have been
modified. '/>

Looking at the last sentence there, for clarity we should probably add an
additional information notice to each scene in addition to the top-level
archive notice.

How about:

        <meta content='Correct definition and compliance of this
conformance scene is maintained by the X3D Working Group,
http://www.web3d.org/working-groups/x3d' name='info'/>

I'll add this now (it is easy enough to change) so we can look it over.
Once wording is reviewed and agreed upon, we can do the same thing for all
scenes in the Basic and Vrml2Sourcebook example archives.

OK each scene now has this statement added, and the NIST url link updated.
Have run X3D canonicalization (C14N) to clean up whitespace variations
(took 26 minutes for 732 models), now checked in, and will deploy today.


 Have a look at the original version attached to this email. That version
> exactly does what you say above - it USEs NAV1.
>

Diving in (finally).  The original NavigationInfo in the scene used default
values.  As first such node in scene, is also bound automatically upon
scene loading.

        <NavigationInfo DEF='NAV1'/>

        23.4.4 NavigationInfo
        http://www.web3d.org/documents/specifications/19775-1/V3.3/
Part01/components/navigation.html#NavigationInfo

        "NavigationInfo node is a bindable node (see 7.2.2 Bindable
children nodes)."
        http://www.web3d.org/documents/specifications/19775-1/V3.3/
Part01/components/core.html#BindableChildrenNodes

which says

"d. During read, the first encountered <bindable node> in each layer is
bound by pushing it to the top of the <bindable node> stack for that layer.
[...] The first encountered <bindable node> sends an isBound TRUE event."

So that all seems satisfactory and expected behavior.

OK next.  The script node in the example scene is pretty confusing since
the field is labeled nav1 but it contains a NavigationInfo DEF="NAV2"

<Script DEF='LIGHTSWITCH' directOutput='true'
  url=' "headlight_range.js" "http://www.web3d.org/x3d/cont
ent/examples/ConformanceNist/BindableNodes/NavigationInfo/headlight_range.js"
'>
  <field name='nav1' type='SFNode' accessType='initializeOnly'>
    <NavigationInfo DEF='NAV2' type='"EXAMINE"'/>
  </field>
  <field name='toggle' type='SFBool' accessType='inputOnly'/>
</Script>

It looks to me like the NAV2 node should instead read

  <field name='nav1' type='SFNode' accessType='initializeOnly'>
        <NavigationInfo USE='NAV1'/>
  </field>

So when you referred to not binding, you must have been looking at NAV2.
Hmmm, getting a little clearer...

Presumably that matches your expectation too?  Let's keep digging further...


Unfortunately, the original NIST test suite is lost - the links are broken.
>

I've maintained information links at

        http://www.web3d.org/x3d/content/examples/X3dResources.html#Examples

        http://www.web3d.org/x3d/content/examples/X3dResources.html#
ConformanceNist

Original server address was

        http://xsun.sdct.itl.nist.gov/~mkass/vts/html/vrml.html

It was working last year... is it really lost?  aha, web search found it at

        http://www.itl.nist.gov/div897/ctg/vrml/vrml.htm

Correction applied to X3D Resources and all scenes in Conformance NIST
Example Archives.

        https://sourceforge.net/p/x3d/code/24222

Now looking at current version control, then working all the way back
through history (including several parent-directory renames),

        https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x
3d/content/examples/ConformanceNist/BindableNodes/NavigationInfo/
        https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x
3d/content/examples/ConformanceNist/BindableNodes/Navigation
Info/headlight_range.x3d

r2 initial checkin:
        https://sourceforge.net/p/x3d/code/2/tree/ConformanceNist/Bi
ndableNodes/NavigationInfo/headlight_range.x3d

indeed that original conversion reveals

      <field accessType='initializeOnly' name='nav1' type='SFNode'>
        <NavigationInfo USE='NAV1'/>
      </field>

So clearly a mistaken change was applied to the scene (no doubt mea culpa)
sometime during the past 16 years.

Searched further across the archive... found two other examples with
identical issue in same directory:

        default_binding_single.x3d
        speed_range.x3d

All three scenes now fixed.

        https://sourceforge.net/p/x3d/code/24224

It would be helpful if someone could take a little time to go through the
NIST Conformance Suite to see if other such scene problems exist, we can
then correct them too.


The test case attached to this email comes from https://archive.org/web/.
>

cool!


    By the way, even the original test does not conform to the spec -
> you’re not allowed to DEF/USE bindable nodes (see 7.2.2 Bindable children
> nodes: „The results are undefined if a multiply instanced (DEF/USE)
> bindable node is bound.“).
>

Well, strictly speaking for the corrected (i.e. original) case: now the
Script code is not binding a USE node. Rather it references the original
DEF node via a USE reference, and modifies a field directly without passing
a ROUTEd event.

So I think the spec is OK and these examples are now OK.

    Bye,
>
>     Patrick
>
> --
> Andreas Plesch
> 39 Barbara Rd.
> Waltham, MA 02453
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>

Hope this looks good... further improvements/corrections welcome.
Deployment in progress, will take a few hours.

Wow, 16+ years of progress thanks to Mike Kass and his NIST team working
openly with the VRML/X3D community.  (cc: Mike and Sandy with thanks)

Having fun with X3D conformance!  No really!  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 http://faculty.nps.edu/brutzman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170121/5f024d23/attachment-0001.html>


More information about the x3d-public mailing list