Closed jedidcad closed 8 years ago
VRMLLoader
doesn't support IndexedFaceSet
yet.
thanks for your answer and in my case what is the way to describe an vrml object?
Your vrml is fine. I currently don't have time to implement IndexedFaceSet
into VRMLLoader
so you'll have to wait until someone does it, or try yourself.
/ping @bartmcleod
thanks for your indication, I will check the examples
@jedidcad There is a working loader now, for IndexedFaceSet. But the implementation does not yet meet the full spec. I am working on that (see my github). You need the dev branch. Background branch is current working branch. There will be major changes in how the tree is loaded. I want to mirror the VRML structure as close as possible in the parsed tree (not just have string lines in there).
Hi bartmcleod, many thanks for your great and hard work. I will wait for your next steps and for the moment my best from Italy.
@jedidcad could you try with the latest version?
hi mrdoob and bartmcleod
has anyone added the indexed face set and texture support to the vrml loader code yet ?
Indexed face set is supported. Textures are not (yet) supported.
Dear Mrdoob and bartmcleod,
It is two days I am super stuck with this .wrl, I cannot open it with the latest version of VRNLLoader in github and I don't find the error. Could you please be so kind to give me a hand? Many thanks in advance! Cheers, Isa
Hi Isa,
My guess is that it breaks on these (I can try for myself tonight, this is just my first guess). The parser probably doesn't anticipate these comments:
0.0000 0.0000 -2.1632 # 1
0.0755 -0.0026 -2.1637 # 1
0.0754 -0.0053 -2.1636 # 1
0.0751 -0.0079 -2.1635 # 1
0.0748 -0.0105 -2.1634 # 1
0.0744 -0.0131 -2.1633 # 1
0.0739 -0.0157 -2.1632 # 1
Cheers,
Bart McLeod
Op 19 feb. 2015, om 15:23 heeft ibarbarisi notifications@github.com het volgende geschreven:
Dear Mrdoob and bartmcleod,
It is two days I am super stuck with this .wrl, I cannot open it with the latest version of VRNLLoader in github and I don't find the error. Could you please be so kind to give me a hand? Many thanks in advance! Cheers, Isa
http://pdssbn.astro.umd.edu/holdings/dif-c-hriv_its_mri-5-tempel1-shape-v2.0/data/tempel1_2012_cart.wrl http://pdssbn.astro.umd.edu/holdings/dif-c-hriv_its_mri-5-tempel1-shape-v2.0/data/tempel1_2012_cart.wrl — Reply to this email directly or view it on GitHub https://github.com/mrdoob/three.js/issues/3979#issuecomment-75059135.
Hi, thanks for your answer, it is really much appreciated. Removing all comments and cleaning the model is one of the first things I have tried :-( but unfortunately there must be something else. Sorry to bother. I am quite new with three.js (I love it by the way, see the beautiful Comet 67PGerasimenko) (https://cloud.githubusercontent.com/assets/11073812/6274700/a8761342-b879-11e4-8b1a-12c1d6b03684.png) Cheers! Isa
Hi,
It wasn't in the comments indeed. For the current implementation of the loader, it is assumed that every node is declared on it's own line.
For your model, that means it should start with:
Shape {
geometry IndexedFaceSet {
coord Coordinate {
point [
Then, you will encouter the next error, but at least adding the newlines on top of the file gets the parser a little further.
This is great!! I managed to display it, just giving all parenthesis their own new line!! Thank you so much, I could have spent ages here.
Cheers, Isa
Good to hear that! Maybe that is something we can build into the parser.
@bartmcleod Yeah. We should try making the parser more robust...
Hi. That would be fantastic. This shape models come from datasets already validated from institutes and space instruments teams. So changing the content, even if minor corrections, may suppose a problem. Thank you again so much! Cheers!
Is it closed because someone made the parser more robust, or is it closed because of lack of interest?
Lack of activity...
@mrdoob @bartmcleod - I believe I am suffering from the issue above.
@tribe84 @ibarbarisi There is a new parser now, that you can already use with my fork of ThreeJS, or independently. It will be less forgiving in some respect, but far more accurate. Please try it. If you encounter any errors with my parser based on the PEG.js grammar, please report these at https://github.com/bartmcleod/VrmlParser.
btw, my fork can be found here: https://github.com/bartmcleod/three.js
@ibarbarisi I know it is very late after the fact, but I can load your comet with the new loader, if I get rid of the script nodes and the appearance at the end of the file. The downside is that it then renders as one purple cloud without lighting, as if it has an emissive color only. I will work on the parser to make it load correctly, if possible. The Script node might or might not be supported in the future. [Edit]The appearance did not load, because of the (unexpected) formatting of the float values, written as 1. and 0. I will add support for these, but after writing them as 1.0 and 0.0 the comet loaded just fine. However, the amount of detail is somewhat limited.
dear mrdoob, I have a problem with the VRMLLoader and my vrml 2 model because don't work. I work on MacOS 10.6 with Firefox. Can you help me please because your past examples (issue "VRMLLoader?") I do not have solved the problem? (below the vrml 2 file):
And here is the code of three.js: