Obi Official Forum
Help Forcing obi rope through rings - 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: Help Forcing obi rope through rings (/thread-3986.html)



Forcing obi rope through rings - Henning - 30-08-2023

Hi,

My goal is to create a series of rings where the user needs to drag the rope through. The end of the rope is attached to a rigid body that can be controlled.
[attachment=1861]

However, the rope often penetrates the rings. This even happens when the rigid body is moving very slowly.

I have tried so far to increase the sub-steps of the updater (to 20), and increase the iterations of the distance/collision constraints (I increased them to 15 separately). Their effects are not really observable. Increasing the number of particles did not lead to positive results either (as the surface collision has always been on).

I understand that this 'tunneling' issue is very difficult to solve, but by any chance are there other solutions for me to explore?  Gran sonrisa

If there is none, the first trick that I can think of is to create the rings with obi ropes, rather than thin shell meshes. However, how can I stop the rope rings from moving? As I understand, disabling the ropes would remove the particles from the solver, and therefore no more collision detection.

Another way to cheat is to add a constraint that says one of the particles has to be at the centre of the ring with the same orientation, but how can I add such a constraint to the solver (if possible)? 

Many thanks in advance!


RE: Forcing obi rope through rings - josemendez - 31-08-2023

(30-08-2023, 10:57 PM)Henning Wrote: If there is none, the first trick that I can think of is to create the rings with obi ropes, rather than thin shell meshes.

Hi!

I'm assuming you're using MeshColliders for the rings, this is rather frail since they have infinitely thin surfaces and won't recover from any missed collisions.

Using signed distance fields (or a "ring" of capsule colliders) instead of MeshColliders will improve robustness (and performance) without the need for using ropes. Anyway, the thinner the ring the more prone to tunneling it will be regardless of the type of collider you use.


(30-08-2023, 10:57 PM)Henning Wrote: Another way to cheat is to add a constraint that says one of the particles has to be at the centre of the ring with the same orientation, but how can I add such a constraint to the solver (if possible)? 

It's not currently possible to inject position-level custom constraints in the main solver loop. You could however add a velocity-level constraint (essentially a force) that drives the closest point in the rope towards the ring center. See the manual for details on how to access particle data:
http://obi.virtualmethodstudio.com/manual/6.3/scriptingparticles.html

To get the closest point in the rope, you can iterate trough its elements and project the ring's center onto them. See: http://obi.virtualmethodstudio.com/manual/6.3/scriptingropes.html

kind regards,


RE: Forcing obi rope through rings - Henning - 04-09-2023

HI Jose and the community!

Just for the reference of users with the same problem in the future, I tried all the methods that Jose mentioned in his reply.

1. The signed distance fields did not show much effect. I suppose it is because my rings are too small.

2. I did manage to find the closest particles, added external forces and directly modified the velocities of the closest 2 particles. The rope would still penetrate if moving fast. Then I tried to directly modify the position to force the closest particles to be aligned with the normal of the ring. This resulted in some unpredicted behaviours where the rope section close to the ring jumps around sometimes.

3. Eventually I decided to just use 24 capsules to form a ring and that worked quite well. It did increase the thickness of the ring significantly tho, whoever wants to do the same trick should also take this into consideration.

Many thanks again!