liminchen / OptCuts

OptCuts, a new parameterization algorithm, jointly optimizes arbitrary embeddings for seam quality and distortion. OptCuts requires no parameter tuning; automatically generating mappings that minimize seam-lengths while satisfying user-requested distortion bounds.
http://www.cs.ubc.ca/labs/imager/tr/2018/OptCuts/
MIT License
276 stars 47 forks source link

Initial Energy Problem #12

Closed YukiHaruna0824 closed 5 years ago

YukiHaruna0824 commented 5 years ago

When I run a big object (no connected component , not high genus surface , closure surface) , the initial energy's value is to be nan sometimes . How do i solve this problem ?

liminchen commented 5 years ago

Thanks for letting me know!! You can send me the input file that triggers the nan initial energy and I can check what happens.

YukiHaruna0824 commented 5 years ago

https://drive.google.com/open?id=1rwHUBUSeKtz0OPCkJZdNMxu5Oj82lrDv 48.obj is open surface,antoher objects are closure surface use default batch.py to run.

liminchen commented 5 years ago

Hi Yuki,

Thanks for your interest in OptCuts! I've checked the 3 meshes you sent me and it turns out that they all contain triangles with 0 area (e.g. 3 vertices on a single line).

I've added a check in the code so that it will report the triangle and its vertex indices when encountering this situation. I think you could clean up the meshes by removing those 0-area triangles using e.g. mesh simplification tools and then retry.

Thanks! Minchen