VRML to X3D Conversion

I also needed to convert VRML .wrl to .x3d; I tried meshlab (meshlabserver), but unfortunately, the version I have (.deb 2016.12~trusty2 on Ubuntu 14.04) compacts everything to a single mesh, and looses color in the process.

I found that view3dscene can do conversion from the command line, where the materials/colors are preserved in .x3d, as they were in .wrl:

view3dscene mymodel.wrl --write --write-encoding xml > mymodel.x3d

Since view3dscene functions as a viewer for both .wrl and .x3d files, it can also be used immediately, to check if the converted (or the original) file has colors or not.


MeshLab! There's an opensource project called MeshLab that does all sorts of processing on 3D meshes. It also has a command-line tool called MeshlabServer.

Running meshlabserver.exe -i <wrl file> -o <x3d file> performs the conversion (very quickly). Since it's open-source, I don't have any licensing issues.


are you talking about this online converter? http://doc.instantreality.org/tools/x3d_encoding_converter/ you could probably build some scripting to convert the vrml to x3d/x3dom and then store and or display

as well blender aopt and others should be able to convert vrml to x3d on the command line. depending on your servers os this could be batched/scripted as well

im in a rush to get some other work done but hope this helps.

let me know if you need more info or examples and ill see what i can do


ok so i think this is the full solution for you

1) user uploads a vrml file

2) that file gets saved to (file or db)

3) upon confirmation that the vrml file has been saved (and possibly validated as correct vrml syntax) it gets converted and saved to x3d (again as file or db) , with aopt this would be accomplished by aopt -i input.wrl -o output.x3d

FYI: aopt is avail for linux windows and mac

since you use python this maybe a way you could do it as well with blender although there are no full example of vrml to x3d this link should get you started http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/Wavefront_OBJ#Command_Line_Converting

4) display the x3d via x3dom