Page 1 of 1

PBD: add new contraints in run-time

Posted: Tue Jul 12, 2022 8:53 am
by lusyok
Hello!

I want to ask whether anyone has ever tried to add, new sretching constraints during simulation in PBD. I am trying to implement a cutting simulation in Unity using Position Based Dynamics(PBD), however it requires new constraints to be created in runtime. In my simulation I add new vertices(positions) and create stretching constraints between them. I do update compute shader according to new positions and constraints number, but still my simulation runs into the same problem.

The Unity complains on collision mesh like the following: "Failed extracting collision mesh because vertex at index 0 contains a non-finite value (nan, nan, nan)."

The simulation runs well if I only add new positions. But when I update constraints everything breaks.

If anyone has an experience in adding new constraints in PBD, you are welcome to add your comments and suggestions. Thank you in advance!