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.
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.
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.
@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?