Live data from Hacker News

Drape – a Fabric Simulator

aatishb.github.io

21–30 of 45 posts

Re: Drape – a Fabric Simulator

#21

Could've used a warning, my shitty i3 laptop went to 80°c

I've got my i7 Macbook Pro coincidentally plugged into a watt meter, and the power consumption went from 8W to 40W. (This is with the lid closed, fully charged, and an external monitor - idle consumption is more like 15W when the internal screen is active. Maybe subtract a bit if it isn't driving a second monitor. Add more if charging the battery.)

I wouldn't have thought 80°C is anything to worry about from the computer's point of view, but if using it on your actual lap I'd advise a degree of caution.

Re: Drape – a Fabric Simulator

#22
post #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…

Very well done, highly mesmerising - loved it. Am just using my S2 Tab now and wasn't expecting such smooth performance (NoSelfIntersect unchecked). Will check out your references.

Re: Drape – a Fabric Simulator

#25

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

Yes. The cloth is modelled as particles connected by springs (semi-stiff rods).

This is Verlet Integration, Verlet is good for cloth as Euler tends to tear cloth.

Solving so many constraints simultaneously would be rather intractable so an approximation is achieved iteratively.

This iterative approximation to simultaneous equations is termed Relaxation, more precisely Gauss-Seidel or Jacobi iteration depending on whether the constraints are applied sequentially or in parallel.

For the sequential version each constraint is applied one after another and this repeated a few times, thus 'relaxing' toward a solution that satisfies all the constraints.

Particle movement may be modelled in a variety of ways, Euler, Verlet, Runge-Kutta, (&c.) each with their own pros and cons.

Euler is the most familiar and tracks position and speed, updating the position with speed times time. Basic Euler applies forces to the velocity vector. Sometimes Euler tracks acceleration and forces are applied as changes in acceleration and updates the velocity vector by acceleration times time.

Verlet Integration does not track speed only last and current positions, speed is implicit. In Verlet Forces are applied simply by moving a particle. Basic Verlet Integration thus has a fixed timestep( variable timestep Verlet and other refinements exist).

The problem with Euler integration is that speed and position can lose sync and so the particle is in the wrong place and the cloth stretches and tears.

As Verlet Integration tracks only position it is more stable (and faster to calculate). Long used in molecular dynamics and galaxy formation simulations, Verlet broke into the mainstream with Thomas Jakobsen's work on Hitman[0] where he used it for fast 'realistic enough' rag doll simulations. Verlet tends to correct itself over time and produces fast 'good enough' simulations, the sweet spot for games.

[0] Jakobsen - Advanced Character Physics http://www.cs.cmu.edu/afs/cs/academic/class/15462-s13/www/le...

Re: Drape – a Fabric Simulator

#26
Dynamic fabric is something I'd love to see more artists working with.

So far the most impressive example I've seen is ZEITGUISED's geist.xyz: https://vimeo.com/150824660 Undulating impossible fabrics with photo-realistic shaders (and a soundtrack that makes my head hurt).

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.

Re: Drape – a Fabric Simulator

#27

Could've used a warning, my shitty i3 laptop went to 80°c

Interesting. It works great on my iPad Mini 4 on Safari. Maybe the problem is either the browser or your graphic drivers, not the CPU.

It's an old laptop with an integrated GPU running Ubuntu so it's a combination of all.

Re: Drape – a Fabric Simulator

#28
post #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…

also...

http://subprotocol.com/system/cloth.html

https://github.com/subprotocol/verlet-js

Re: Drape – a Fabric Simulator

#29
This is neat as a personal project restricted to WebGL and real-time.

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.

http://www.marvelousdesigner.com

http://www.marvelousdesigner.com/product/features

http://www.marvelousdesigner.com/cases/

Post reply on HN