4 ms·
Pretty cool! Anyone know why the cloth looks so stretchy and why gravity looks like it is on the moon? Is it too expensive to run the solver up to a realistic
by santaclaus 9y ago
Pretty cool!
Anyone know why the cloth looks so stretchy and why gravity looks like it is on the moon? Is it too expensive to run the solver up to a realistic level of inextensibility?
- matt4077 9y agoI'm pretty sure that's deliberate. If you replicate this in the real world, it's just over too fast.
- santaclaus 9y agoI don't know if that is true -- I'm looking at a flag flapping around out my window and there is tons of interesting dynamics! Think also dresses or other clothing.
- tsherif 9y agoYeah, I was fiddling with the parameters until I found something I kind of liked. A couple of important factors: 1. Stiffness of the cloth depends on the number of particles vs. the number of iterations you do to resolve the constraints (maybe there's a way to speed this up?). So making things stiffer (at the same grid resolution) does take more time. 2. The faster things are moving, the higher the likelihood that that collisions will be missed. You can already see this if you move the ball very quickly, it can pass through the cloth. With higher gravity, I found the cloth would often get pushed through the ball. If you want to fiddle around with it, you can clone and tweak the physics parameters here:https://github.com/tsherif/picogl.js/blob/master/examples/cloth.html#L64-L66 https://github.com/tsherif/picogl.js/blob/master/examples/cl... and the simulation parameters here: https://github.com/tsherif/picogl.js/blob/master/examples/cloth.html#L334 https://github.com/tsherif/picogl.js/blob/master/examples/cl...