Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some geometries seems to be incomplete - few triangles missing #5

Closed
ram-sellamuthu opened this issue Sep 5, 2018 · 6 comments
Closed
Assignees
Labels

Comments

@ram-sellamuthu
Copy link

Hi,
I was testing the same WRL file with Three.js and VrmlParser.js. I get slightly different visualizations. The WRL file has only one shape primarily IndexedFaceSet. I am herewith attaching the WRL file and also screenshots from two different browsers.

Requesting your inputs in this regard.

01_caster_assembly.zip

rendering_with_threejs
rendering_with_vrmlparser

Thanks,
Rajaram

@ram-sellamuthu
Copy link
Author

@bartmcleod tagging you as I am not sure if you have received any notification from Git. I have imported the same WRL to blender and it looks fine.
While rendering using VrmlParser, it looks like some triangles are missing. Looking forward to your response.

@ram-sellamuthu ram-sellamuthu changed the title Some geometries seemed to be wrong Some geometries seems to be incomplete - few triangles missing Sep 5, 2018
@bartmcleod
Copy link
Owner

@ram-sellamuthu Thanks for tagging me and thanks for your feedback, it is much appreciated. I will look into it. This might either be a serious issue, or just a few flipped triangles (triangles that are specified ccw while all others are cw, or the other way round).

Please note that the VrmlParser library and threejs are not in sync, as my pull requests towards threejs are not merged yet (as far as I know). Keeping them in sync requires a separate pull request. You could verify the outcome based on my branch of threejs, if you like.

@bartmcleod bartmcleod added the bug label Sep 5, 2018
@bartmcleod bartmcleod self-assigned this Sep 5, 2018
@bartmcleod
Copy link
Owner

bartmcleod commented Sep 5, 2018

@ram-sellamuthu Would it be possible for you to create a test case example that includes just one of the cylinders and presents the same behaviour? [Edit: nvm I can easily isolate a single indexed faceset from the file]
[Edit] It is a bug and is has existed for a few years, since the introduction of the new parser. My first guess is that it has to do with the face indexes being specified three on a line, while I tested with only one face specification per line. This might or might not provide a workaround for you, I will test this to see if that is the cause.

@bartmcleod
Copy link
Owner

bartmcleod commented Sep 5, 2018

@ram-sellamuthu Ok, so here it is: the last face defined in each IndexedFaceSet should also end with -1, (at least for my parser). It might not by strictly needed for the VRML 97 spec.

[Edit]The last set of indices does not need to be followed by , -1 according to the VRML 97 spec, so this is still a bug.

@bartmcleod
Copy link
Owner

Fixed in v0.7.4

@ram-sellamuthu
Copy link
Author

ram-sellamuthu commented Sep 10, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants