Live data from Hacker News

Drape – a Fabric Simulator

aatishb.github.io

11–20 of 45 posts

Re: Drape – a Fabric Simulator

#11

I wish I had more knowledge of the math behind it. Is it done by solving multiple partial differential equations using finite difference method?

A good, older introduction can be found here:

http://www.gamasutra.com/resource_guide/20030121/jacobson_pf...

If you want to look into more rigorous and advanced version, reading position based dynamics papers (http://matthias-mueller-fischer.ch) will give you a lot to chew on. Generally speaking Googling "verlet physics" or "position based dynamics" will give you a lot of resources.

Re: Drape – a Fabric Simulator

#12
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.

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.

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.

https://graphics.stanford.edu/~mdfisher/cloth.html http://www.pagines.ma1.upc.edu/~susin/files/AdvancedCharacte... http://kucg.korea.ac.kr/education/2005/CSCE352/paper/provot9... http://luthuli.cs.uiuc.edu/~daf/courses/Games/SimList/Papers...

Re: Drape – a Fabric Simulator

#14

I wish I had more knowledge of the math behind it. Is it done by solving multiple partial differential equations using finite difference method?

It looks like they create particles in a grid, and constraints between the particles to bind them together. Then they create springs and apply forces that simulate what wind would look like.

Re: Drape – a Fabric Simulator

#15
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.

I'm not sure if there's something that I've done wrong, or what.

Re: Drape – a Fabric Simulator

#17

I wish I had more knowledge of the math behind it. Is it done by solving multiple partial differential equations using finite difference method?

Probably some form of verlet integration: http://gamedevelopment.tutsplus.com/tutorials/simulate-teara....

Author's github page also has links to a list of cloth simulation resources.

Re: Drape – a Fabric Simulator

#19

I wish I had more knowledge of the math behind it. Is it done by solving multiple partial differential equations using finite difference method?

Probably some form of verlet integration: http://gamedevelopment.tutsplus.com/tutorials/simulate-teara... . Author's github page also has links to a list of cloth simulation resources.

That might be what the physics engine does, but the demo is just using a physics engine to build a constrained array of particles with springs.
Post reply on HN