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

Non-Convex Faces Not Triangulated Correctly #56

Open
maxattack opened this issue Jun 21, 2020 · 4 comments
Open

Non-Convex Faces Not Triangulated Correctly #56

maxattack opened this issue Jun 21, 2020 · 4 comments

Comments

@maxattack
Copy link

The triangulate() helper function in ofbx.cpp doesn't properly ear-cut non-convex faces, leading to non-internal edges being placed.

image
image

@maxattack
Copy link
Author

maxattack commented Jun 22, 2020

The algorithm is not too tricky -- it's called "ear-cutting." A reference: http://www-cgrl.cs.mcgill.ca/~godfried/teaching/cg-projects/97/Ian/algorithm1.html

Implementation was only ~200LOC

image

@nem0
Copy link
Owner

nem0 commented Jun 22, 2020

Hi, I'm not sure when will I get to this, but if you need this soon you can disable ofbx triangulation and and do correct triangulation on your side.

@maxattack
Copy link
Author

Yeah, that's what I've already implemented. Just putting it on your radar :)

@maxattack
Copy link
Author

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

No branches or pull requests

2 participants