VRML Loader limitations?

Hi there !

I’m working on a viewer to load VRML files on the browser. I’m new to three.js and I was playing around with the online loader of the official website. I noticed that only the simpliest VRML files that I have was loading correctly, so I was wondering what are the limitations of the VRMLLoader embedded in three.js (is it the file size ? some obscures properties of VRML files not handled ? ). My purpose is to write a parser that “simplifies” the VRML files to make the vrml-loader open them correctly.

Any clues ?

The VRML loader does not support the entire specification. Do you mind sharing a VRML file that can’t be loaded?

Hi Mugen !

Unfortunatly the VRML files that I use are confidential… But I was testing a lot of these files and I suspect that VRMLLoader does not support ROUTE, Sensors and Scripts nodes, I was able to load it by removing all these animation nodes. Also one of the files that I can’t load doesn’t have any fancy animation node but weights more than 400Mb, could it be the issue ?

All these are not supported since they are hard/impossible to map to three.js logic. VRMLLoader focuses on the pure material, geometry and hierarchy data of a VRML asset.

Yes, such large files can be problematic in many ways. Even if the asset gets parsed, the resulting scene is probably so complex that it’s not possible to render it with a proper framerate.

1 Like

Just my opinion: VRML is a very old and inferior (obsolete) format to other newer formats, I wouldn’t recommend using it a all, for any reason. I would try to find a converter to convert the models to GLTF even if not directly (to one or two intermediate formats if necessary), then use them in Three.js. Once you find a reliable conversion-path, you’re done.

1 Like

Thank you for your help !

Thanks, I’ll look this way ! does GLTF have full support with three.js ?

It is the recommended 3D format of the project. More information here:

https://threejs.org/docs/index.html#manual/en/introduction/Loading-3D-models

three.js tries to support glTF a good as possible.

2 Likes

@dllb In our company we have 3D models from simulations in particle physics that only come as VRML.
Can you recommend any software libraries (preferably C# or JavaScript) for converting VRML to GLTF? Are there any best practice libraries for this?

@dllb Do you have any advice for me? I would be extremely grateful.