maria-korosteleva / GarmentCode

A modular programming framework for designing parametric sewing patterns
MIT License
135 stars 10 forks source link

strange cloth intersect #8

Closed LSQsjtu closed 4 months ago

LSQsjtu commented 4 months ago

I face a strange cloth generation when change the arm pose anlge into 80 or others in f_smpl_full_bodied.yaml and keep other parameters.

Snipaste_2024-05-19_15-36-56

But I got a strange intersect render view. It seems be a failure cltoh and can not do simulations.

Snipaste_2024-05-19_15-31-46

Could you tell me how to change the parameters in the body yaml to get a correct configuration?

maria-korosteleva commented 4 months ago

Hi @LSQsjtu! As far as I can tell from the screenshot, the intersections are due to an incorrect stitching orientation assignment done by Qualoth simulator during mesh generation.

Briefly, the standard JSON pattern representation that GarmentCode generates represents stitches as edge-edge pairs. This specification lacks information on which vertex of one edge is connected to which of the two vertices of the other edge, creating two options for stitch orientation. Qualoth determines the stitch orientation automatically based on some heuristics (unknown to us). As in your example, these heuristics sometimes fail.

You can manually correct the stitch orientation by selecting a stitch that looks problematic and tagging the Invert Seam Direction parameter as below:

image

Unfortunately, we do not have access to that part of the pipeline so manual correction is the best I can suggest to you right now 🥲

LSQsjtu commented 4 months ago

Thanks for your quick reply. It really helps me.