zalo / TetSim

Javascript Tetrahedral FEM Simulation
https://zalo.github.io/TetSim/
37 stars 8 forks source link

Cloth GPU sumulation #6

Closed arpu closed 10 months ago

arpu commented 10 months ago

Hey,

i see your fantastic work in physx-jni repo, would it be possible to use this GPU simulation for cloth?

like this webgl2 demo https://github.com/TimvanScherpenzeel/Thesis

zalo commented 10 months ago

I’m in the process of adding the tetrahedral baking functionality right now… I don’t really have plans for non-solid shapes though 🤔

If I take it in the direction of FLeX, then, in theory, the same particle based representation should be able to handle soft bodies, cloth smoke, fluid, etc… but that’s way down the line 😅

Currently, my stretch goal is to have a slick three.js demo for a “MultiTarget GPU Computation Renderer”, to demonstrate how to do GPGPU things without WebGPU.

arpu commented 10 months ago

Thanks for clarification! and this is awesome demo to learn from

zalo commented 10 months ago

For context, I have a separate, isolated demo of the TetMesh baking in that thread you mentioned: https://github.com/fabmax/physx-jni/issues/43#issuecomment-1871699139

It doesn't have import or export, but the principal for accepting arbitrary inputs appears to be sound... Also, I have a strong suspicion that it will generate thin tetrahedra if a single-triangle thick surface is fed in, which could act like cloth 😅