gpvigano/AsImpL

Support for faces with more than 4 vertices

gpvigano opened this issue · 7 comments

Currently AsImpL supports faces with 3 or 4 vertices.
A proper triangulation algorithm should be implemented to support faces with more vertices.

Added a very simple triangulation in the OBJ loader (see b388f43), improvements can be done.

The current triangulation does not work for concave polygons, i.e. the guitar model referenced by @LucasWalters in issue #3 looks like this:
guitar_asimpl
(notice the wrong triangulation of the dark polygon in the centre)

Is this inverted face issue solved? do we have a updated plugin now?
And many thanks @gpvigano, this plugin is just awesome :)

Sorry, not yet. I think there's not a trivial solution (a proper triangulation algorithm must be implemented) and I understand this is an important issue, but I haven't a solution, at the moment.
I hope someone will help us.

To ease the integration of external triangulation code in AsImpL I moved triangulation to a proper method in the Dataset/Triangulator.cs script. See my commit.

Here we can find a solution for the triangulation of convex polygons. The author allows integrating that code into AsImpL.

I finally managed to implement a decent triangulation in my last commit, starting from Erik Nordeus's tutorial.
Here you can see how the previous guitar model is loaded now:

asimpl_earclipping_guitar

I hope someone will test this new version and will give me a feedback...

Looks good, thanks for the update!