Discussion:
X3D and X3DOM support
Ivan Tsyba
2014-04-09 12:00:15 UTC
Permalink
Hi
Today ArgyllCMS tools can produce VRML files for diagnose purposes (3d
gamut view, comparisons, etc).

VRML standard today is superseded by X3D so it will be harder to find
needed VRML viewer in future.

With X3DOM (embedding X3D in HTML) you can view 3d objects in any modern
browser without plugins:
http://dl.dropboxusercontent.com/u/28502325/test_3d_gamuts.html

X3D syntax is similar to VRML, you can check source code of above page for
this.

So optional support of X3DOM will be very useful.

Thank you
Graeme Gill
2014-04-10 01:16:00 UTC
Permalink
Post by Ivan Tsyba
VRML standard today is superseded by X3D so it will be harder to find
needed VRML viewer in future.
Right, but any X3D viewer is meant to handle VRML without change.

Unfortunately, direct support for X3D seems to be as scarce as VRML support
in its day, so it's not much of an improvement
Post by Ivan Tsyba
With X3DOM (embedding X3D in HTML) you can view 3d objects in any modern
http://dl.dropboxusercontent.com/u/28502325/test_3d_gamuts.html
X3DOM seems to have left out support for reading X3D and VRML files.
So the only option seems to be generating the necessary html
with X3D XML format embedded. Supporting this would need a good deal of
consolidation and re-coding of all the ArgyllCMS VRML code.

So while it would be nice to have, it is difficult to find the time for
at present.

Graeme Gill.
Florian Höch
2014-04-11 11:15:43 UTC
Permalink
Hi,

I've looked into creating a minimal cross-platform VRML viewer suitable
for Argyll CMS VRML viewing for quite some time, but the time
requirements needed for such a project have prevented me from actually
starting it, and so I eventually scrapped the idea (for Linux and Mac OS
X, there is an alternative in the form of ICC Examin though which is
part of Oyranos).

What I'm currently planning is a minimal VRML to X3DOM converter with
only support for the subset of functionality that would be needed to
convert Argyll CMS VRML files. The utility would become part of
dispcalGUI at some point, and you would be able to assign .wrl and .wrz
files to be handled by it so that if you open them, they are
automatically converted to the necessary HTML and then simply viewed by
whatever program you have configured as HTML viewer (so, usually your
browser). The benefit of this approach is that the time needed to write
the utility should be much less, because I don't need to write an actual
viewer. No ETA though :)
Post by Ivan Tsyba
Hi
Today ArgyllCMS tools can produce VRML files for diagnose purposes (3d
gamut view, comparisons, etc).
VRML standard today is superseded by X3D so it will be harder to find
needed VRML viewer in future.
With X3DOM (embedding X3D in HTML) you can view 3d objects in any modern
http://dl.dropboxusercontent.com/u/28502325/test_3d_gamuts.html
X3D syntax is similar to VRML, you can check source code of above page
for this.
So optional support of X3DOM will be very useful.
Thank you
--
Florian Höch
Ivan Tsyba
2014-04-11 11:27:14 UTC
Permalink
Post by Florian Höch
I'm currently planning is a minimal VRML to X3DOM converter
This will be very useful feature. Especially with command line support too.

Only free software that can create X3DOM from VRML is aopt tool from
InstantReality: http://www.instantreality.org/downloads/
But I can't make it work on modern Ubuntu, package can't be installed.
Elle Stone
2014-04-11 11:34:36 UTC
Permalink
Post by Florian Höch
Hi,
I've looked into creating a minimal cross-platform VRML viewer suitable
for Argyll CMS VRML viewing for quite some time, but the time
requirements needed for such a project have prevented me from actually
starting it, and so I eventually scrapped the idea (for Linux and Mac OS
X, there is an alternative in the form of ICC Examin though which is
part of Oyranos).
What I'm currently planning is a minimal VRML to X3DOM converter with
only support for the subset of functionality that would be needed to
convert Argyll CMS VRML files. The utility would become part of
dispcalGUI at some point, and you would be able to assign .wrl and .wrz
files to be handled by it so that if you open them, they are
automatically converted to the necessary HTML and then simply viewed by
whatever program you have configured as HTML viewer (so, usually your
browser). The benefit of this approach is that the time needed to write
the utility should be much less, because I don't need to write an actual
viewer. No ETA though :)
Have you looked at the open source view3dscene?
http://castle-engine.sourceforge.net/view3dscene.php

It works with Linux, Mac, and Windows.

I don't use Mac or Windows, but I can confirm it works really well with
Linux and with files produced by ArgyllCMS. It's nice to be able to
revolve color gamuts in three dimensions.

I've use view3dscene with no problems under several versions of Linux.
ICC Examin does also work but the gamut display isn't as nice and I
can't get it to run with full functionality under Gentoo.


Elle Stone
Ivan Tsyba
2014-04-11 11:47:41 UTC
Permalink
Post by Elle Stone
Have you looked at the open source view3dscene?
Yes, I use it on Windows and Linux every time after profile creation. My
script runs chartread->colprof->iccgamut-> viewgam->view3dscene

X3DOM files is good for displaying gamuts to customers without additional
software needed on their side.
Florian Höch
2014-04-11 12:19:38 UTC
Permalink
Thanks, I did not know this project. Briefly tried it on Mac OS X and
Windows too, it worked very well. I couldn't view some of the larger
VRML files I have due to out-of-memory errors though (plenty of RAM
available, so that doesn't seem to be the problem).
Post by Elle Stone
Have you looked at the open source view3dscene?
--
Florian Höch
Graeme Gill
2014-04-11 12:23:54 UTC
Permalink
Post by Florian Höch
What I'm currently planning is a minimal VRML to X3DOM converter with
only support for the subset of functionality that would be needed to
convert Argyll CMS VRML files.
Have you looked at <http://ovrt.nist.gov/v2_x3d.html>,
or <http://meshlab.sourceforge.net/> ?

Graeme Gill.
Florian Höch
2014-04-11 13:04:18 UTC
Permalink
Thanks, I did look at the v2_x3d page, the Meshlab was new to me, and
works very well with Argyll gamut VRML files (also has a pretty user
interface). It didn't seem to want to open any diagnostic testchart VRML
files though (the error I always got was "File without a geometry").
Post by Graeme Gill
Have you looked at <http://ovrt.nist.gov/v2_x3d.html>,
or <http://meshlab.sourceforge.net/> ?
--
Florian Höch
Florian Höch
2014-04-11 21:32:57 UTC
Permalink
I've actually made some progress with this. After struggling a bit with
the library I planned to use for VRML parsing (pyvrml), I gave up on
that and started to implement my own stripped-down parser. It turned out
to be surprisingly straightforward, the whole parser + converter are
only around 125 lines of (pure python) code. So far it can successfully
convert all the Argyll CMS VRML files that I throw at it, which is
encouraging.
Post by Florian Höch
What I'm currently planning is a minimal VRML to X3DOM converter with
only support for the subset of functionality that would be needed to
convert Argyll CMS VRML files. The utility would become part of
dispcalGUI at some point, and you would be able to assign .wrl and .wrz
files to be handled by it so that if you open them, they are
automatically converted to the necessary HTML and then simply viewed by
whatever program you have configured as HTML viewer (so, usually your
browser). The benefit of this approach is that the time needed to write
the utility should be much less, because I don't need to write an actual
viewer. No ETA though :)
--
Florian Höch
Florian Höch
2014-04-13 21:07:33 UTC
Permalink
...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!
Post by Florian Höch
I've actually made some progress with this.
--
Florian Höch
Florian Höch
2014-04-13 21:10:49 UTC
Permalink
(the link at the top of the previous message was broken, let's try again --)

<https://sourceforge.net/p/dispcalgui/wiki/Getting%20the%20latest%20development%20snapshot%20of%20dispcalGUI%20via%20Zero%20Install/>
--
Florian Höch
Ivan Tsyba
2014-04-14 09:18:24 UTC
Permalink
Thanks, Florian, will try this soon.

X3DOM has potential for full featured gamut viewer in browser: changing
transparencies, colors, types of surfaces etc on the fly.
Post by Florian Höch
(the link at the top of the previous message was broken, let's try again --)
<
https://sourceforge.net/p/dispcalgui/wiki/Getting%20the%20latest%20development%20snapshot%20of%20dispcalGUI%20via%20Zero%20Install/
--
Florian Höch
Loading...