Obi Official Forum

Full Version: sewing simulator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi again,
I would like developing a sewing simulator with ObiCloth and ObiRope/Rod in order to emulate a piece of cloth and a needle with its thread. 
I was wondering if it's possible to create like a "sliding constraint" to simulate the movement of the needle and the thread when they pierce the cloth.

Thanks!
(04-05-2022, 09:27 AM)maygdirf Wrote: [ -> ]Hi again,
I would like developing a sewing simulator with ObiCloth and ObiRope/Rod in order to emulate a piece of cloth and a needle with its thread. 
I was wondering if it's possible to create like a "sliding constraint" to simulate the movement of the needle and the thread when they pierce the cloth.

Thanks!

Hi there!

Obi does not offer a "sliding thread" constraint out of the box, since its use cases are rather limited (almost specific to sewing, imho). It's possible for you to write the constraint yourself, but very complex to do. Adding a new constraint type to Obi requires:

A) deep understanding of extended position-based dynamics (the physics framework used by Obi). You can find details here:
https://matthias-research.github.io/page...s/XPBD.pdf

B) familiarity with Obi's implementation (which makes use of Unity's Job system and Burst compiler).

Unless you have prior experience writing physics engines, I think this will prove to be a challenge.

kind regards,