Obi Official Forum
Help Reduce rope movement? - 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 Reduce rope movement? (/thread-2715.html)



Reduce rope movement? - Xanduffy - 22-01-2021

Hi, I'm currently working on incorporating obi rope into a VR project, and I'm having some difficulty getting the rope to behave realistically/reasonably in response to being thrown or moved as it tends to bounce and swing wildly for far too long. I've tried adjusting the stretching scale and compliance(best results seem to be ~0.7 scale with 0 compliance) however reducing the scale too much presents other issues. Is there a straightforward way to somehow dampen the rebound response so that the rope settles quicker, rather than bouncing for well over a minute?


RE: Reduce rope movement? - josemendez - 23-01-2021

(22-01-2021, 08:22 PM)Xanduffy Wrote: Hi, I'm currently working on incorporating obi rope into a VR project, and I'm having some difficulty getting the rope to behave realistically/reasonably in response to being thrown or moved as it tends to bounce and swing wildly for far too long. I've tried adjusting the stretching scale and compliance(best results seem to be ~0.7 scale with 0 compliance) however reducing the scale too much presents other issues. Is there a straightforward way to somehow dampen the rebound response so that the rope settles quicker, rather than bouncing for well over a minute?

Sure, try increasing the “damping” parameter in the solver. This will cause particles to lose energy faster.

If it’s stretching you’re worried about, use more substeps. This will improve convergence speed, and reduce spurious compliance. See the “simulation” section in the manual for more info.

Compliance should be set to zero (as you want minimal stretching/ bouncing). Remember that compliance is the inverse of stiffness, so 0 compliance is equivalent to infinite stiffness. Stretching scale should be set to 1, as you want the rope to keep its original length, instead of shrinking by 70%.


RE: Reduce rope movement? - Xanduffy - 27-01-2021


(23-01-2021, 01:15 AM)josemendez Wrote: Sure, try increasing the “damping” parameter in the solver. This will cause particles to lose energy faster.

If it’s stretching you’re worried about, use more substeps. This will improve convergence speed, and reduce spurious compliance. See the “simulation” section in the manual for more info.

Compliance should be set to zero (as you want minimal stretching/ bouncing). Remember that compliance is the inverse of stiffness, so 0 compliance is equivalent to infinite stiffness. Stretching scale should be set to 1, as you want the rope to keep its original length, instead of shrinking by 70%.

This worked great, thanks! Having some issues with some of the rope particles occasionally embedding in the floor(currently a large cube), is this a substeps issue or have I missed some other obvious setting/constraint?


RE: Reduce rope movement? - josemendez - 27-01-2021

(27-01-2021, 04:09 PM)Xanduffy Wrote:

This worked great, thanks! Having some issues with some of the rope particles occasionally embedding in the floor(currently a large cube), is this a substeps issue or have I missed some other obvious setting/constraint?

You're welcome Sonrisa

On what circumstances does this happen? Primitive colliders (cubes, spheres, capsules) should project any particles inside of them immediately, as they're "solid". MeshColliders won't however, as they're hollow (only the surface collides).

Can you give some more details about this?


RE: Reduce rope movement? - Xanduffy - 27-01-2021

(27-01-2021, 04:18 PM)josemendez Wrote: You're welcome Sonrisa

On what circumstances does this happen? Primitive colliders (cubes, spheres, capsules) should project any particles inside of them immediately, as they're "solid". MeshColliders won't however, as they're hollow (only the surface collides).

Can you give some more details about this?

Of course, I think I see the issue. My test environment is made up of probuilder shapes which are mesh colliders. It mainly occurs when the player spawns in, as the rope is attached to their hip, which begins at floor level causing the particles to embed underneath the surface collider as you said.


RE: Reduce rope movement? - josemendez - 27-01-2021

(27-01-2021, 04:26 PM)Xanduffy Wrote: Of course, I think I see the issue. My test environment is made up of probuilder shapes which are mesh colliders.

If a particle starts a frame the wrong side of a MeshCollider's surface, it will stay there as MeshColliders have no concept of what "inside" or "outside" means. They're just a paper-thin surface, that prevents other objects from penetrating in either direction. This is because outside/inside tests for arbitrary concave meshes is quite expensive.

Primitives (being convex shapes) do have a inside/outside concept and can project other objects outside if they start the frame inside of them.

Quote:It mainly occurs when the player spawns in, as the rope is attached to their hip, which begins at floor level causing the particles to embed underneath the surface collider as you said.

Best fix would be for your character to spawn with their feet at floor level, then. If your character is a capsule collider, I think you also risk him falling trough the floor otherwise.

Let me know how it goes!


RE: Reduce rope movement? - Xanduffy - 27-01-2021

(27-01-2021, 04:35 PM)josemendez Wrote: If a particle starts a frame the wrong side of a MeshCollider's surface, it will stay there as MeshColliders have no concept of what "inside" or "outside" means. They're just a paper-thin surface, that prevents other objects from penetrating in either direction. This is because outside/inside tests for arbitrary concave meshes is quite expensive.

Primitives (being convex shapes) do have a inside/outside concept and can project other objects outside if they start the frame inside of them.


Best fix would be for your character to spawn with their feet at floor level, then. If your character is a capsule collider, I think you also risk him falling trough the floor otherwise.

Let me know how it goes!

As it's a unity XR rig it always begins at floor level unfortunately, but a simple fix is to spawn the belt higher up and adjust it after the player spawns. Thanks for the help, if you could have a look at the grab rope thread as well that would be great!