Posts: 5
Threads: 3
Joined: Jul 2017
Reputation:
0
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.
Posts: 6,313
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(08-07-2017, 11:15 AM)chanddu Wrote: 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.
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.
Posts: 5
Threads: 3
Joined: Jul 2017
Reputation:
0
(14-07-2017, 06:57 PM)josemendez Wrote: 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. 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.
Posts: 6,313
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(17-07-2017, 07:24 AM)chanddu Wrote: 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.
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;
if (movementDelta.magnitude > threshold)
{
movementDelta = movementDelta.normalized * maxSpeed
}
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.
Posts: 5
Threads: 3
Joined: Jul 2017
Reputation:
0
(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):
Code: movementDelta = userPosition - oldPosition;
if (movementDelta.magnitude > threshold)
{
movementDelta = movementDelta.normalized * maxSpeed
}
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.
Thanks, I will try this and see.
Regards.
Posts: 68
Threads: 11
Joined: Oct 2019
Reputation:
0
(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.
Posts: 6,313
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
04-08-2021, 08:54 AM
(This post was last modified: 04-08-2021, 08:56 AM by josemendez.)
(03-08-2021, 05:30 PM)TheMunk Wrote: 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.
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.
|