[argyllcms] Re: X3D and X3DOM support

  • From: Florian Höch <lists+argyllcms@xxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Sun, 13 Apr 2014 23:07:33 +0200

...and I'm done (hopefully!). The latest development snapshot of
dispcalGUI contains a new utility which can convert VRML to X3D, and
generates a HTML page that references (optionally embeds) said X3D file
to render it via X3DOM in WebGL-enabled browsers. The utility is a
hybrid command-line/GUI application. If you want to try it via Zero
Install, instructions to do so can be found here
<https://sourceforge.net/p/dispcalgui/wiki/Getting%20the%20latest%20development%20snapshot%20of%20dispcalGUI
via%20Zero%20Install/>.

You can add the command to your PATH by running

`0install add --command=run-VRML-to-X3D-converter
dispcalGUI-VRML-to-X3D-converter
http://dispcalgui.hoech.net/0install/dispcalGUI.xml`

Or, if you don't want to use Zero Install, just download the source
archive, extract it, `cd` to the extracted folder in a terminal and run

`sudo python2 setup.py install` (you definitely want to remove any
distribution-packaged version of dispcalGUI before doing this!)

to make it available.

Afterwards, you can run the utility like this:

`dispcalGUI-VRML-to-X3D-converter` which brings up the GUI,
`dispcalGUI-VRML-to-X3D-converter --help` to show options.

An example to convert a VRML file "test.wrl" to X3D, and view the
generated HTML file in your browser:

`dispcalGUI-VRML-to-X3D-converter test.wrl`

This will create the files "test.x3d" and "test.x3d.html".

Without GUI:

`dispcalGUI-VRML-to-X3D-converter --no-gui --view test.wrl`

Just create an X3D file, don't generate HTML (if you have an X3D viewer
installed, this should launch it afterwards):

`dispcalGUI-VRML-to-X3D-converter --no-gui --no-html --view test.wrl`

Create a true standalone HTML file that embeds everything including the
X3DOM runtime (this will be around 800K atleast due to the size of said
runtime):

`dispcalGUI-VRML-to-X3D-converter --no-gui --embed test.wrl`

An internet connection is required the first time a HTML file is
generated because it will fetch the X3DOM runtime from x3dom.org, and
cache the runtime for later use (and reference it in the HTML, with a
fallback to the online version should the cache files become unavailable
due to the HTML file being moved to another computer).

To make sure I'm not generating malformed data, I've run a few generated
X3D files through the X3D validator at
<https://savage.nps.edu/X3dValidator>, and the only warning reported was
due to a missing description for the "Viewpoint" element, which is not
critical and I'm probably going to ignore this warning.

Enjoy!

Am 11.04.2014 23:32, schrieb Florian Höch:
> I've actually made some progress with this.

-- 
Florian Höch


Other related posts: