问题
I have a legacy application that generates VRML 1.0 files. I'd like to build a WebGL-based web interface that can display these VRML files. Is there an easy way to do so?
Edit: Specified that they are VRML 1.0.
回答1:
If you can get it to VRML 2.0 (VRML '97) using a tool like the above-referenced one from Parallelgraphics, you can use the Fraunhofer Institute's tools (see discussion and links to InstantReality at http://www.x3dom.org/?page_id=532) to go from VRML 2 to either X3DOM or X3D. With Firefox or Chrome and a current graphics card and driver, you've got the WebGL support needed to run X3DOM. X3DOM handles only a subset of X3D, but can be referenced straight from XHTML and CSS, or plug-ins required. It's at a much higher level and easier to deal with than dealing directly with WebGL.
回答2:
As I understand it, X3D is a development from VRML, and there's a WebGL-based renderer for it called X3DOM. Converting over is unlikely to be zero-effort, but it might be easier than trying to make the jump all the way to a "native" WebGL format.
回答3:
VRML can be pretty complex with lots of interactivity and it doesn't look like a ont-to-one converter is available. However, here is what you could try:
- Convert your VRML file to a standard OBJ file using something like MeshConv
- Import the converted file in CopperLicht (Free) or CopperCube (Not free)
You will then have some kind of conversion of your VRML file which you can fine-tune.
来源:https://stackoverflow.com/questions/4927250/view-vrml-file-with-webgl-capable-browser