Loader/Converter for VRML/X3D

Hi all,

I recently asked if there was any loader for files in the VRML or X3D format, as I needed to load files from VRML into an application I’m currently developing. As there is neither a VRML/X3D-loader for jME available anywhere on the web nor a tool to properly convert VRML/X3D to formats that jME understands, I took on writing an X3D loader class myself (VRML files can be easily converted to X3D using the tools linked on the homepage of the Web3D Consortium).

This loader is now “complete”: It is able to load a good deal of X3D content into jME. Of course, there are still many featues in X3D that the loader does not support, as X3D is a gigantic standard, but some of these features can not (or only with great effort) be implemented in jME, and the others… Well, I just didn’t need them yet. :wink: I have already tested the loader and it works fine: It loads the scene graph structure from the file with geometry and appearance properties (including bump maps), as well as light sources.

In addition to the possibility to load a scene directly as a jME Spatial with the scene structure attached, I also adapted the loader to jME’s converters (extends FormatConverter, convert(InputStream, OutputStream) implemented). I would like to add this loader to the jME now, so I’d like to know…

  • if and how I can contribute to jME,

  • if this loader has to be tested and approved first (as I have not tested each and every feature extensively yet)

  • or if there is some other way to make this loader avaible here on jmonkeyengine.com, other than posting the code (as it has over 1700 lines, plus the 200 lines of the normal generator class ;) ), so the generator can be used and extended/improved by other developers.

Sounds very interesting.  If you could zip it up and send it my way I'll see it gets evaluated for inclusion in 1.1 and 2.0

>> You've got email! <<

If I detect any bugs in the loader in the future, I'll send you the updates.

EDIT: Whoa, just noticed that the loader's class javadoc comment is a bit outdated. It still says normal generation is not implemented. In fact, it is implemented, I just forgot to update the comment. This also applies to the bug with CloneImportExport: As this has been fixed, this passage can also be removed from the comment.


I was looking for a tool to import X3D, and it seems you have made one… but I can't find the source code…  Is there any way I can get it?

It is part of jME.

Have a look here:


and here is the example:


Hope that helps,