nixon-voxell/GPUClothSimulationInUnity

Technical doubts about the implementation of PBD cloth based on GPU

Opened this issue · 3 comments

Why is it suspended? No maintenance. Is GPU parallel data disordered during collision? Why do you have your own Json format in blender? Is there any problem with the vertex sorting of cloth mesh in the forum of unity? Is it because the algorithm of calculating shader to achieve PBD must be handled in this way?
企业微信截图_a932c948-33fd-4601-b521-5f05a218f4ec
企业微信截图_596899a1-03e8-4274-9771-f49cc763a8f5

Hey there, unfortunately for now, I am unable update the code to the latest version as I had joined a company which now currently owns the code. Alot has happened since then xd. Also yeah, like you said, a JSON format should not be needed as we can now just store data in the form of scriptable objects.

About the second picture, it is actually just to find edges from the mesh from vertex data and triangle data (because unity does not generate edge data for you by default).

I don't know if you have heard about Nv cloth, a library of cloth simulation in Nvidia, which is also based on PBD algorithm. The main thing is how practical it is on the mobile end (CPU used, but SIMD acceleration of neon)? Is GPU's compute shader fast or Nv cloth? Personally, I think nvbatch has helped us solve many problems.
https://gameworksdocs.nvidia.com/NvCloth/1.1/Compiling/index.html#mac

not sure if nvcloth uses CPU or the GPU, but depending on your task, gpu is faster for highly parallel stuff, as your cloth resolution scales, gpu will eventually beat the cpu.