[x3d-public] X3DJSAIL update: improved output when exporting ClassicVRML/VRML97 models

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Sat Jun 22 01:28:36 PDT 2024


Am happy to report an X3DJSAIL update: improved output when exporting ClassicVRML/VRML97 models.

 

*	X3D Java Scene Access Interface Library (X3DJSAIL)
*	X3D Java Scene Access Interface Library (X3DJSAIL) supports programmers with standards-based X3D Java interfaces and objects, all as open source.
*	https://www.web3d.org/specifications/java/X3DJSAIL.html

 

Motivating problem: excellent sleuthing and a well-stated issue report by John Carlson revealed a significant issue with the ClassicVRML export.

 

*	X3DJSAIL: VRML head and Scene out of order
*	https://sourceforge.net/p/x3d/tickets/27

 

To improve quality assurance (QA) of ClassicVRML and VRML97 output by X3DJSAIL.  I applied command-line validation of the ClassicVRML .x3dv output using the castle-model-converter application by Michalis Kamburelis, all to good effect.  Troubleshooting led to fixes of the original reported problem and perhaps a dozen other errors also.  This validation is now part of the build scripts so that further regression testing is always produced as part of X3DJSAIL library development.

 

*	Castle Model Converter (formerly tovrmlx3d)
*	https://castle-engine.io/castle-model-converter

 

Test program and output:

 

*	HelloWorldProgram.java
*	Description:  Example "smoke test" program to create a highly detailed X3D model using the X3D Java Scene Access Interface Library (X3DJSAIL).
*	https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgram.java

 

*	HelloWorldProgram output, ClassicVRML and VRML97
*	https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.x3dv
*	https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.wrl
*	note that other outputs are also provided:  XML .x3d, pretty-print .html, Java, Python.py, compressed .exi, X_ITE and X3DOM html, etc.

 

*	Build test log is in version control to track improvements and avoid backsliding:
*	https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/build.test.X3DJSAIL.txt
*	Excerpt showing castle-model-converter validation:

 

ClassicVRML validation: castle-model-converter.exe C:\x3d-code\www.web3d.org\x3d\stylesheets\java\examples/HelloWorldProgramOutput.x3dv --validate --enable-downloads

castle-model-converter: Warning: X3D: Invalid X3D file: Invalid sequence in a string: "\n". Backslash must be followed by another backslash or double quote, for SFString and MFString (in X3D classic (VRML) encoding) and for MFString (in X3D XML encoding).

castle-model-converter: Warning: VRML/X3D: Prototype "ArtDeco02" referenced by external prototype "ArtDeco02" doesn't have field "description"

castle-model-converter: Warning: VRML/X3D: Inline node name "inlineScene" not found (or nothing was EXPORTed from it), cannot IMPORT

castle-model-converter: Warning: X3D: Invalid X3D file: Invalid sequence in a string: "\n". Backslash must be followed by another backslash or double quote, for SFString and MFString (in X3D classic (VRML) encoding) and for MFString (in X3D XML encoding).

castle-model-converter: Warning: X3D: Node "Anchor" is not allowed in the field "watchList" of the node "LoadSensor"

castle-model-converter: Warning: X3D: Node "GeoMetadata" is not allowed in the field "watchList" of the node "LoadSensor"

Exception "Exception":

Validation failed (consult the warnings above), exiting with non-zero status

 

Michalis was informed of the last two watchlist errors and reportedly has already fixed them.  Many of the other warnings are also fixable if the test program is improved to use actual file addresses instead of pseudo-urls.  Progress steadily continues…  the only “really bad errors” are the ones you don’t know about!

 

Javadoc documentation for X3DJSAIL programmers:

*	https://www.web3d.org/specifications/java/javadoc

 

Over 4000 examples using X3DJSAIL, converted automatically from .x3d to .java in the X3D Example Models Archives:

*	https://www.web3d.org/specifications/java/X3DJSAIL.html#Examples

 

So X3DJSAIL is excellent for plain-old Java handling of X3D, and keeps getting better.  Again thanks to John and Michalis for their contributions to identify problems that are now fixed.

 

Have fun with X3D Java!  😊

 

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/20240622/976af10c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7709 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240622/976af10c/attachment-0001.p7s>


More information about the x3d-public mailing list