WebGL 2 Interactive GPU Cloth Simulation
tsherif.github.io
tsherif.github.io
So, yeah, looks like some kind of issue with Apple's AMD graphics driver.
I get okay performance though, but the render looks like someone used the cloth like one of those old punchcards: http://i.imgur.com/JIBfGt7.png
Mid 2015 with AMD Radeon R9 M370X 2048 MB, 16 GB of ram and Core i7
Nice to see WebGL performing well on a seemingly old HW.
Is this a matter of keeping track of forces that work on e.g. a triangular basis element, and doing hit-testing so the triangles cannot move through objects or other triangles?
Here are the two primary references I used: https://viscomp.alexandra.dk/?p=147 http://http.download.nvidia.com/developer/presentations/2005...
I remember when just getting a DOM element to animate smoothly was a challenge...
http://www.shaderific.com/blog/2014/3/13/tutorial-how-to-upd...
System: 2017 Dell XPS 15 with NVidia 1050, NVidia driver Version 373.06, Chrome browser, Windows 10 Home 64 bit.
I tried Microsoft Edge browser, same message.
Thoughts?
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?
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/cl... and the simulation parameters here: https://github.com/tsherif/picogl.js/blob/master/examples/cl...