[x3d-public] Problematic validation of reformatted VRML meta-tag imports

Anthony Judge anthony.judge at gmail.com
Wed Sep 30 02:49:45 PDT 2015


Don

With respect to your comment:

>>>p.s. your identification of the Stella tool is also great.  I've looked at it a few times while developing some of the following polyhedra examples.  Perhaps we should contact the author to see whether he wants to add an X3D alternative to his VRML export.<<<

I am indeed in occasional contact with Robert Webb, the developer of
that software. I had indeed raised the possibility with him many
months back.

The issue for him, as it is for many of us, is priorities and resources.

It occurred to me that one possible way of navigating such constraints
would be to see whether the code for the current converter (import or
export) -- internal to X3D Edit -- could be made available to him in
the event he  could  readily adapt it to Stella

This message is therefore copied to him, although I assume that it is
with you, Don, that he should discuss further

Tony


On 29/09/2015, Don Brutzman <brutzman at nps.edu> wrote:
> Tony, thanks for posting this example.  Apologies if this is late to the
> issue.
>
> It appears that the VRML-to-X3D importer is improperly converting the array
> of strings in the WorldInfo node's info field, concatenating them into a
> single longer string.  This is a fixable error.
>
> You might also try other tools which can convert .wrl to .x3d, listed at
> http://www.web3d.org/x3d/content/examples/X3dResources.html#Conversions
>
> Item #8 on that list is
>
> ================================================
> 8. NIST VRML to X3D Translator [http://ovrt.nist.gov/v2_x3d.html] was
> originally written by Qiming Wang.
> An updated version of the source
> [https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/tools/Vrml97ToX3dNist/]
> (and a .zip distribution)
> [https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/tools/Vrml97ToX3dNist/Vrml97ToX3dNist.zip]
> are maintained on SourceForge. The translator is also bundled in X3D-Edit
> under the X3D/Import/VRML97 menu."
> ================================================
>
> On this morning's teleconference Roy Walmsley described finding and fixing a
> problem in the VRML97 importer in X3D-Edit.  Perhaps it is the same bug...
> not sure.  In any case, we looked at how the converter that is actually
> embedded in X3D-Edit is actually a copy, rather than reuse, of the preceding
> Sourceforge archive.  It is also under version control and found at
> https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/tools/Vrml97ToX3dNist/javasrc/
>
> So we will need to do some cleanup as well, refactoring any differences into
> a single codebase so that all improvements are applied consistently.  Stay
> tuned for future reports on that work.
>
> Regarding formatting, the best thing to do for regularizing the formatting
> of that output is run it through a pretty-print formatter such as the X3D
> Canonicalization (C14N) utility.  This helps a lot when comparing
> differences among various versions of a scene.
>
> Your diligence in sleuthing and reporting these issues is quite helpful,
> thanks.  As before, thanks.
>
> p.s. your identification of the Stella tool is also great.  I've looked at
> it a few times while developing some of the following polyhedra examples.
> Perhaps we should contact the author to see whether he wants to add an X3D
> alternative to his VRML export.
>
> 	http://x3dgraphics.com/examples/X3dForAdvancedModeling/#GeometricShapes
>
>
> On 9/18/2015 2:28 AM, Anthony Judge wrote:
>> I have been doing a number of exports from Stella Polyhedron Navigator
>> into VRML -- then imported into X3D Edit.
>>
>> The source VRML is, for example:
>>
>>>>>>
>>
>> #VRML V2.0 utf8
>> # Truncated Dodecahedron (10.10.3), W10, p24
>> # Generated by 'Stella4D', Version 5.3
>> # Author: Robert Webb
>> # Web site: http://www.software3d.com/Stella.php
>> # Licensed to: Anthony Judge
>> # Date: 10:29:55, 3 September 2015
>> #
>> # Copyright (C) Robert Webb, 2001-2013.
>> # This copyright notice and the above
>> # information must be kept intact.
>>
>> WorldInfo {
>>    title "Truncated Dodecahedron (10.10.3), W10, p24"
>>    info [
>>    "Truncated Dodecahedron (10.10.3), W10, p24"
>>    "Generated by 'Stella4D', Version 5.3"
>>    "Author: Robert Webb"
>>    "Web site: http://www.software3d.com/Stella.php"
>>    "Licensed to: Anthony Judge"
>>    "Date: 10:29:55, 3 September 2015"
>>    ""
>>    "Copyright (C) Robert Webb, 2001-2013."
>>    "This copyright notice and the above"
>>    "information must be kept intact."
>>    ]
>> }
>>
>> <<<
>>
>> This gets restructured by the X3D Edit importer to something like:
>>
>>>>>
>> <?xml version='1.0' encoding='UTF-8'?>
>> <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN"
>> "http://www.web3d.org/specifications/x3d-3.2.dtd">
>> <X3D version='3.2' profile='Immersive'
>> xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance'
>> xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.2.xsd'>
>>   <head>
>> [...]
>>   </head>
>>   <Scene>
>>    <WorldInfo  info='Generated by Stella4D, Version 5.3;
>> Author/Copyright: Robert Webb (http://www.software3d.com/Stella.php);
>> licensed to: Anthony Judge Date: 3 September 2015 2001-2013' />
>>
>> <<<
>>
>> I accept that any such reformatting is something for the user to be
>> attentive to and that the importer cannot take appropriate account of
>> multiple third party VRML exports.
>>
>> My comment relates to the validation of such an import which
>> immediately gives an error due to the formatting of the WorldInfo
>> field as created by the importer. That an error should be detected is
>> fine. The problem is that the error message focuses on <Scene> and
>> children, but does not indicate the line generating that error.
>>
>> My provisional solution has been to remove all content from the
>> WorldInfo field -- the result then works. But that solution took time
>> to discover with the aid of feedback -- due to nesting of quotes, etc
>> in that field (and possibly other issues)
>>
>> Tony
>
> 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
>


-- 
Anthony Judge
<anthony.judge at gmail.com>
www.laetusinpraesens.org



More information about the x3d-public mailing list