![]() |
For creating runtime tight knot - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: For creating runtime tight knot (/thread-31.html) |
For creating runtime tight knot - chanddu - 08-07-2017 Hi, I was working on the obi rope to tie a knot,How to make a tight knot without collapsing with rope thickness under 0.2. We are trying to simulate suture threads. What sort of values and parameters would be ideal for this. I tried the self-collisions and different collision iterations, particle iterations but it didn't solve my purpose. Regards. RE: For creating runtime tight knot - josemendez - 14-07-2017 (08-07-2017, 11:15 AM)chanddu Wrote: Hi, Hi chanddu, Ideal settings for this are high distance constraint iteration count (ObiSolver->Distance Constraint Parameters->iterations), and high particle collision iteration count. However, given that Obi is an iterative solver, there will always be a limit at which constraints won't be able to be perfectly met. So no matter how much you increase these, there will be a threshold force that, once surpassed, will cause the knots to undo. Best approach for this is clamping the amount of force that can be exerted by the user by pulling the rope. Also for suture threads you'll most likely need a type of constraint usually known as a "sliding" constraint. They allow to constraint the rope particles to pass trough a point in space, which is essential to accurately simulate sutures. Obi does not provide these, as they are pretty much used just for this very specific scenario. RE: For creating runtime tight knot - chanddu - 17-07-2017 (14-07-2017, 06:57 PM)josemendez Wrote: Hi chanddu,Hi josemendez, Thanks for the reply,can you please tell me how to clamp the force that exerted by the user by pulling the rope? Regards. RE: For creating runtime tight knot - josemendez - 17-07-2017 (17-07-2017, 07:24 AM)chanddu Wrote: Hi josemendez, Depends on your particular application. For instance, you can measure how much has the user moved since the last frame, and if the movement is too aggressive do this (pseudocode): Code: movementDelta = userPosition - oldPosition; This gets rid of very fast and sudden movements, forcing user movements to never exceed maxSpeed. But doesn´t prevent the user from pulling too much, albeit slowly. To prevent this, measure the amount of stress in the rope (actualLenght/restLength) and if it's much larger than 1, freeze the user position. RE: For creating runtime tight knot - chanddu - 19-07-2017 (17-07-2017, 09:40 AM)josemendez Wrote: Depends on your particular application. For instance, you can measure how much has the user moved since the last frame, and if the movement is too aggressive do this (pseudocode): Thanks, I will try this and see. Regards. RE: For creating runtime tight knot - TheMunk - 03-08-2021 (14-07-2017, 06:57 PM)josemendez Wrote: Also for suture threads you'll most likely need a type of constraint usually known as a "sliding" constraint. They allow to constraint the rope particles to pass trough a point in space, which is essential to accurately simulate sutures. Obi does not provide these, as they are pretty much used just for this very specific scenario. Hi there! What's the current state of supporting this fancy thing called "sliding" constraints? It's exactly what I need, but I have no clue of how to integrate it myself in Obi. RE: For creating runtime tight knot - josemendez - 04-08-2021 (03-08-2021, 05:30 PM)TheMunk Wrote: Hi there! Hi! Sliding constraints are a quite specific use case, almost only useful for suturing. I don't think they will be added to Obi anytime soon. Adding new constraints to the Burst backend can be done, but requires in-depth knowledge of Obi's architecture as well as position-based dynamics. You could also add it in the form of a velocity-based constraint outside the main constraint loop, which would be easier to do but not as effective: basically you have a point "P" in space trough which the rope must pass, get the rope segment "S" closer to it, calculate the velocity of "S" relative to "P" and project it to the plane orthogonal to the edge, then negate the result and distribute it between the two particles at the ends of the segment. It's a rough idea but would work. |