maria-korosteleva / Garment-Pattern-Generator

Official implementation of Generating Datasets of 3D Garments with Sewing Patterns
MIT License
176 stars 24 forks source link

How is a set of sewing patterns "stitched" before conducting physical simulation? #1

Closed deepshwang closed 1 year ago

deepshwang commented 2 years ago

First, thanks for releasing the dataset :)

Can you briefly explain how a generated set of sewing patterns is "stitched" together before going through a physical simulation to retrieve 3d garments?

Thanks in advance :)

Sungwon Hwang

maria-korosteleva commented 2 years ago

Hi Sungwon!

The stitching information for a sewing pattern sample is passed on from the template spec. Design sampling does not change the pattern topology, only the shapes of panel edges, so transferring stitches is trivial. In the code, you can see that the stitching section of the pattern spec is simply left as is and not updated when new parameter values are applied. Check out this funtion: https://github.com/maria-korosteleva/Garment-Pattern-Generator/blob/4f2c3d655e6f9e739c6349fea31f91c15186e75e/packages/pattern/core.py#L652

We then apply that stitching information on loading the pattern to the Qualoth simulator, and Qualoth takes care of generating geometry correctly (lucky us 😄). You can see it in this function: https://github.com/maria-korosteleva/Garment-Pattern-Generator/blob/4f2c3d655e6f9e739c6349fea31f91c15186e75e/packages/mayaqltools/mayascene.py#L116

Let me know if that answers your question!