Live data from Hacker News

Tearable Cloth Simulation in JavaScript

codepen.io

61–70 of 159 posts

Re: Tearable Cloth Simulation in JavaScript

#63
post #38

Very cool physics simulation. I think it needs a little damping though; if I cut all the cloth off I end up with a creepy wiggling pile of cloth at the bottom. (To reproduce: slowly cut across the top of the cloth so it all falls into one pile.)

After you have the pile on the bottom you could throw it up and try to move it without falling down :)

Re: Tearable Cloth Simulation in JavaScript

#64
Without wishing to appear negative, I do find it odd the way that a technical crowd react to these online demos. Would you have found this impressive if it was a compiled executable? Because this is just the same thing, just running slower because it's on the web. It's not technically novel in any way.

If you're curious about the algorithm, then take a look at the presentation 'Advanced Character Physics' by Jacobson. They were used in published games at least 13 years ago and are very widely known and implemented.

I get that there's some novelty to this stuff, but we already know that asm.js can achieve performance within a factor of 2 of compiled C code. Since we know that exists, I don't really see what's interesting about seeing each individual piece of code ported to work on the web.

Re: Tearable Cloth Simulation in JavaScript

#66

Without wishing to appear negative, I do find it odd the way that a technical crowd react to these online demos. Would you have found this impressive if it was a compiled executable? Because this is just the same thing, just running slower because it's on the web. It's not technically novel in any way. If you're curious about the algorithm, then take a look at the presentation 'Advanced Character Physics' by Jacobson…

Yes, I would find it impressive. Problem is, there's about a 5% chance I'd ever get to downloading and running it.

Especially since it very likely wouldn't be compiled for mac or linux (the only systems I have) and I very very likely wouldn't feel inclined to compile it myself.

That's why we love javascript demos. We're lazy sods.

Re: Tearable Cloth Simulation in JavaScript

#67
post #66

Without wishing to appear negative, I do find it odd the way that a technical crowd react to these online demos. Would you have found this impressive if it was a compiled executable? Because this is just the same thing, just running slower because it's on the web. It's not technically novel in any way. If you're curious about the algorithm, then take a look at the presentation 'Advanced Character Physics' by Jacobson…

Yes, I would find it impressive. Problem is, there's about a 5% chance I'd ever get to downloading and running it. Especially since it very likely wouldn't be compiled for mac or linux (the only systems I have) and I very very likely wouldn't feel inclined to compile it myself. That's why we love javascript demos. We're lazy sods.

In which case the impressiveness must be coming from the lack of domain familiarity. It's basically getting excited about a game physics 'Hello World'.

I remember a good few years ago a colleague writing a fully textured 3D cloth sim that would remotely unfurl on your screen, displaying a given message on the cloth. He used it to display goatse.cx to me, which I wasn't very pleased about. This was developed in python and took him a few hours over a weekend as far as I remember, which seems about right.

Re: Tearable Cloth Simulation in JavaScript

#68

Without wishing to appear negative, I do find it odd the way that a technical crowd react to these online demos. Would you have found this impressive if it was a compiled executable? Because this is just the same thing, just running slower because it's on the web. It's not technically novel in any way. If you're curious about the algorithm, then take a look at the presentation 'Advanced Character Physics' by Jacobson…

I often get the same feeling. The fact that it's running in the browser on one hand is an amazing achievement of those who brought canvas and etc. to the web. On the other hand the idea itself can perfectly run as a standalone demo, and the browser doesn't really enhance it in any way (if not making it slower).

Re: Tearable Cloth Simulation in JavaScript

#69
post #66

Earlier quoted context omitted.

Yes, I would find it impressive. Problem is, there's about a 5% chance I'd ever get to downloading and running it. Especially since it very likely wouldn't be compiled for mac or linux (the only systems I have) and I very very likely wouldn't feel inclined to compile it myself. That's why we love javascript demos. We're lazy sods.

In which case the impressiveness must be coming from the lack of domain familiarity. It's basically getting excited about a game physics 'Hello World'. I remember a good few years ago a colleague writing a fully textured 3D cloth sim that would remotely unfurl on your screen, displaying a given message on the cloth. He used it to display goatse.cx to me, which I wasn't very pleased about. This was developed in python…

My familiarity with game physics ended somewhere in the early 00's when I went fully Linux. Since then the most visually impressive game I've played has been Diablo3. Intuitively I still think games look like counter-strike and when I see anything better, I am impressed.

But you missed the more important point in my post: if this wasn't in a browser, I'd never see it.

Re: Tearable Cloth Simulation in JavaScript

#70
Don't get me wrong, this is a cool demo, but as someone who experimented with verlet based physics before I don't understand what is so impressive about a basic implementation in JavaScript.

The math behind it is ridiculously easy and JS got faster over the years. And as someone already mentioned there is a 13 years old paper about verlet physics in games so this is everything but new.

Post reply on HN