maria-korosteleva / GarmentCode

A modular programming framework for designing parametric sewing patterns
MIT License
148 stars 15 forks source link

Simulation getting stuck #12

Open detectiveli opened 2 months ago

detectiveli commented 2 months ago

Hi,

This is a really great work and the results looks fantastic! I would like to try it but I met some problems when I use the gui.py file.

After I run the gui.py and upload the ./assets/design_params/t-shirt.yaml and ./assets/bodies/mean_male.yaml, I got some errors "drape current design". The results are showed below.

Could you please offer me some help or suggestions to help me? Thanks!

Screenshot from 2024-09-03 16-40-14 Screenshot from 2024-09-03 16-40-52

maria-korosteleva commented 2 months ago

Hi! Thank you for reporting a problem

Judging by the simulation log, the simulation process failed (cannot finish draping properly -- static equilibrium not achieved), so the only geometry you will be able to get is the pre-simulation state -- boxmesh, as on the image you posted. This could happen sometimes since the simulation is imperfect and may fail in certain cases

Now it's weird that it failed on a basic t-shirt example though. I could not reproduce it right away, but I would look into it more. Could you try the same setup multiple times? There is some randomness in simulation process, so sometimes it fails because the stars aligned wrong in that moment 😑

detectiveli commented 2 months ago

Many thanks for your kind reply! And I am also digging into it for now.

I also check the command line: python test_garmentcode.py python test_garment_sim.py -p /path/to/pattern_specification.json

And I got some results which might be helpful for finding the problem.

t-shirt__240903-20-53-08_specification.json sim_props.log

maria-korosteleva commented 2 months ago

The spec file you shared drapes fine for me.

Maybe there is an issue with the warp running on your GPU. Which GPU are you using and which CUDA version?

Also, please, send the full log folder with this example (the .zip file you are downloading or the directory with the examples logs saved by test_garment_sim.py