Hi, thanks for voting this up! I created this with a few colleagues. Our goal was to make a fabric simulation tool that might inspire creative exploration among artists and engineers. I hope you find it fun to play with, and welcome any feedback and suggestions on how to improve this.<p>We started from a three.js cloth simulation example and made a bunch of modifications. The cloth is modeled as a grid of point masses (particles) connected by springs. We've got options for horizontal & vertical springs (simulating cross grain, where the cloth threads run parallel to the edges), diagonal springs (simulating bias grain, where the cloth threads run diagonally), and springs that connect particles two units apart (simulating drape / bending stiffness, similar to a starched tablecloth). It's kind of amazing how a simple system of particles and springs can result in such rich cloth-like behavior. Other than the springs (which are modeled as constraints on the distance between particles), the only forces on the particles are wind and gravity. In addition we have constraints that account for collisions and simulate friction-like behavior.<p>We've submitted a paper that explains the details of how this works which I'll share once it's published, but for now if you're interested in learning more here are a few references, or google 'verlet integration constraints'. Also happy to try to answer your questions.<p><a href="https://graphics.stanford.edu/~mdfisher/cloth.html" rel="nofollow">https://graphics.stanford.edu/~mdfisher/cloth.html</a>
<a href="http://www.pagines.ma1.upc.edu/~susin/files/AdvancedCharacterPhysics.pdf" rel="nofollow">http://www.pagines.ma1.upc.edu/~susin/files/AdvancedCharacte...</a>
<a href="http://kucg.korea.ac.kr/education/2005/CSCE352/paper/provot95.pdf" rel="nofollow">http://kucg.korea.ac.kr/education/2005/CSCE352/paper/provot9...</a>
<a href="http://luthuli.cs.uiuc.edu/~daf/courses/Games/SimList/Papers/Baraff-1998-LSC.pdf" rel="nofollow">http://luthuli.cs.uiuc.edu/~daf/courses/Games/SimList/Papers...</a>
This is neat as a personal project restricted to WebGL and real-time.<p>The state-of-the-art in commercially available cloth/clothing creation simulation these days is Marvelous Designer and it is available for ~$400. It does produce results that are pretty phenomenal and hard to tell from real-life.<p><a href="http://www.marvelousdesigner.com" rel="nofollow">http://www.marvelousdesigner.com</a><p><a href="http://www.marvelousdesigner.com/product/features" rel="nofollow">http://www.marvelousdesigner.com/product/features</a><p><a href="http://www.marvelousdesigner.com/cases/" rel="nofollow">http://www.marvelousdesigner.com/cases/</a>
Dynamic fabric is something I'd love to see more artists working with.<p>So far the most impressive example I've seen is ZEITGUISED's geist.xyz: <a href="https://vimeo.com/150824660" rel="nofollow">https://vimeo.com/150824660</a> Undulating impossible fabrics with photo-realistic shaders (and a soundtrack that makes my head hurt).<p>It's definitely an experimental art film but it feels more like an impressive tech demo for what they've been able to accomplish with textile simulation. Sadly like most art pieces, there's very little in the way of technical on how they pulled off such interesting stuff.
That's pretty cool! Do you have any plans to have it respect the boundaries of solid objects it comes in contact with such as the poles it's tethered to? Currently, the cloth will go through the poles instead of interacting with the poles as solid objects.
I disabled cross-grain and drape and it billowed and exploded:
<a href="https://twitter.com/eigenbom/status/738887973559668736" rel="nofollow">https://twitter.com/eigenbom/status/738887973559668736</a><p>Not sure if bug or if those parameters are not in the space of valid options.<p>Cool project btw!
Reminds me of an old PhysX demo I found in a game years ago.<p>Can't seem to find much besides this video though: <a href="https://www.youtube.com/watch?v=eoCbSL2kis4" rel="nofollow">https://www.youtube.com/watch?v=eoCbSL2kis4</a>
I think I posted this last time this link was shared. But just yesterday I uploaded my code to github after a request on the video.<p>It is cloth with tearing and verlet integration. Nothing fancy or even difficult but it is probably a nice starting point.<p>Video: <a href="https://www.youtube.com/watch?v=G05M_Y6NQVM" rel="nofollow">https://www.youtube.com/watch?v=G05M_Y6NQVM</a><p>Code: <a href="https://github.com/jontelang/VerletClothTearing" rel="nofollow">https://github.com/jontelang/VerletClothTearing</a>
As a note: this works for me in Chrome 51, but Pale Moon 26 and Firefox 46 both reported that my GPU seems to be incapable of WebGL, when I first tried it. I had to force it to be enabled in my about:config settings, after which the demo displayed nicely.<p>I'm not sure if there's something that I've done wrong, or what.