omegaiota / DiffCloth

Code repository for our paper DiffCloth: Differentiable Cloth Simulation with Dry Frictional Contact
https://people.csail.mit.edu/liyifei/publication/diffcloth/
MIT License
358 stars 33 forks source link

How to set param in FabricConfiguration? #14

Open sihengz02 opened 2 years ago

sihengz02 commented 2 years ago

Hi, YIfei.

I'm tring to add a tie in this simulator and I notice that the simulation results differ greatly as I change params k_stiff_stretching, k_stiff_bending and density in FabricConfiguration (src/code/optimization/OptimizationTaskConfigurations.cpp), which are closely related to the material of cloth.

So, generally, how can I specify the value of these three params when I try to add a new type of cloth?

omegaiota commented 2 years ago

Hi, My experience was that the bending stiffness is a very strong force so minimal changes will result in drastic change in the cloth's behavior and should be kept at a very small value; k_stretching and density shouldn't be as sensitive. Let me know if you have further questions. Also I actually implemented a GUI window that let's you play with different material configs interactively for forward simulation in the code but I hid the entry for it in the current released version. If you think that would be helpful I can try clean it up and release it.

sihengz02 commented 2 years ago

Thanks for your insights.

It will be helpful for me if the author can release this interface.