Inochi2D / inochi-creator

Inochi2D Rigging Application
BSD 2-Clause "Simplified" License
878 stars 48 forks source link

[Feature Request] Improve Automesh Algorithm to Reduce Empty Triangles. #452

Open Richardn2002 opened 1 month ago

Richardn2002 commented 1 month ago

Validations

Description

Current automesh algorithm will generate triangles covering no texture (from the human eye perspective), which will usually be erased by riggers immediately after generation. These triangles should be prevented.

Suggested solution

Quoting Luna's comment

Delaunay Refinement + a possible second pass doing texture lookups to remove "dead" vertices at a set distance from textured areas.

Alternative solution

No response

Additional Context

Mentioned by both ChaKun and Luna in #449 .

Richardn2002 commented 1 month ago

Seems like the contour automesh algorithm is good at determining mesh vertices given a texture, but the autoTriangulate() method from IncMesh is reused after vertices are picked to generate the mesh as the last step, throwing away all the texture info.