PBD: add new contraints in run-time

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
Posts: 1
Joined: Mon Apr 19, 2021 2:27 am

PBD: add new contraints in run-time

Post by lusyok »


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!
Post Reply