Posts: 4
Threads: 2
Joined: Jun 2021
Reputation:
0
Hi guys, I play with Obi Rope 6 for few days and I can`t resolve one simple scenario. I want rope with fixed width(for example 5 meters) and want no stretching at all. But when I add Obi Particle Renderer I see how particles is group 2 by 2 and between every group of 2 particles there is a gap(in pink color) which is stretching. I play around with Obi Solver substeps(set it to 8), with Obi Solver Distance constraint(set it to 30). But I can get simple non stretchy rope.
Second scenario I testing: Just add a bar(cube with sizes 0.2x0.2x4) add Obi collider to it and try to move the rope through this bar. For some time the rope is collide with the bar but in some moment, when the gap between the particles is big enough, the bar just passes through the rope.
Any help will be appreciated.
P.S. This excellent plugin deserves better video tutorials for beginners.
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
18-06-2021, 02:15 PM
(This post was last modified: 18-06-2021, 02:36 PM by josemendez.)
(18-06-2021, 01:27 PM)Tattler Wrote: Hi guys, I play with Obi Rope 6 for few days and I can`t resolve one simple scenario. I want rope with fixed width(for example 5 meters) and want no stretching at all. But when I add Obi Particle Renderer I see how particles is group 2 by 2 and between every group of 2 particles there is a gap(in pink color) which is stretching. I play around with Obi Solver substeps(set it to 8), with Obi Solver Distance constraint(set it to 30). But I can get simple non stretchy rope.
That sounds like you're simply forcing the rope to overstretch. With 8 substeps, there should be zero stretching. Are you using static attachments at the ends of the rope, by any chance?
(18-06-2021, 01:27 PM)Tattler Wrote: (in pink color)
Did you assign a material to the rope at all? Unity will use a flat pink color to draw objects with no material. This is standard Unity behavior, not related to Obi.
(18-06-2021, 01:27 PM)Tattler Wrote: Second scenario I testing: Just add a bar(cube with sizes 0.2x0.2x4) add Obi collider to it and try to move the rope through this bar. For some time the rope is collide with the bar but in some moment, when the gap between the particles is big enough, the bar just passes through the rope.
This is completely normal. If you overstretch the rope by pushing a collider trough the rope or viceversa (I assume you just move the collider by setting its position), at some point the rope will miss collisions. In real life, either the bar or the rope would have snapped.
Simply use forces to move the bar (you will need it to be a rigidbody) instead of forcing it by setting its position, or use dynamic attachments to move the rope. This way, the rope can stop the bar from moving once it's fully stretched.
You can use masses (both for the collider and the rope) to control how easily they push each other. Note this applies to any existing physics engine.
These are basic physics concepts (force coupling, masses, etc), it’s assumed you’re already familiar with them when using Obi.
Let me know if you need further help.
Posts: 4
Threads: 2
Joined: Jun 2021
Reputation:
0
(18-06-2021, 02:15 PM)josemendez Wrote: That sounds like you're simply forcing the rope to overstretch. With 8 substeps, there should be zero stretching. Are you using static attachments at the ends of the rope, by any chance?
Did you assign a material to the rope at all? Unity will use a flat pink color to draw objects with no material. This is standard Unity behavior, not related to Obi.
This is completely normal. If you overstretch the rope by pushing a collider across the rope (I assume you just move the collider by setting its position), at some point the rope will miss collisions. Simply use forces to move the bar, instead of forcing it by setting its position. This way, the rope can stop the bar from moving once it's fully stretched. Note this applies to any existing physics engine, not just Obi.
If your rope resolution is too low (there's gaps in-between particles), you can use surface collisions. See:
http://obi.virtualmethodstudio.com/manua...sions.html
Thanks for your quick answer @josemendez.
Yes I set static attachment to the end of the rope. One end is "pinned" to the wall for example, and other is pinned to sphere. I change position of the sphere(not with forces) and drag center of the rope through the bar I want to collide. Maybe I will try to move the sphere with forces and see if the rope will stretching?
Surface base collision of the rope is checked.
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
18-06-2021, 02:52 PM
(This post was last modified: 18-06-2021, 03:08 PM by josemendez.)
(18-06-2021, 02:39 PM)Tattler Wrote: Thanks for your quick answer @josemendez.
Yes I set static attachment to the end of the rope. One end is "pinned" to the wall for example, and other is pinned to sphere. I change position of the sphere(not with forces) and drag center of the rope through the bar I want to collide. Maybe I will try to move the sphere with forces and see if the rope will stretching?
Surface base collision of the rope is checked.
Then, you’re forcing the rope to stretch. No matter how many substeps/iterations you use.
Think about what would happen in real life if you attached one end of the rope to a iron wall, the other end to a iron sphere (both absolutely immobile), then pushed an infinitely rigid iron bar across the rope with infinite force: the wall, the sphere and the bar can neither move or deform. So the only possible outcome is the rope breaking, no matter how strong.
Static colliders in all physics engines extern “infinite” force. Or rather, they don’t care about forces or physics of any kind. They just move to wherever you tell them to move, no matter if they’re colliding with other stuff.
You need to use rigidbodies and move them with forces, to give ropes and other objects a chance of pushing back and resist stretching.
I’d recommend familiarizing yourself with colliders/rigidbodies/forces/inertia/mass, etc before attempting to use Obi. These are the basic foundation of any physics stuff, otherwise you’re in for a very frustrating experience.
Posts: 4
Threads: 2
Joined: Jun 2021
Reputation:
0
(18-06-2021, 02:52 PM)josemendez Wrote: Then, you’re forcing the rope to stretch. No matter how many substeps/iterations you use.
Think about what would happen in real life if you attached one end of the rope to a iron wall, the other end to a iron sphere (both absolutely immobile), then pushed an infinitely rigid iron bar across the rope with infinite force: the wall, the sphere and the bar can neither move or deform. So the only possible outcome is the rope breaking, no matter how strong.
Static colliders in all physics engines extern “infinite” force. Or rather, they don’t care about forces or physics of any kind. They just move to wherever you tell them to move, no matter if they’re colliding with other stuff.
You need to use rigidbodies and move them with forces, to give ropes and other objects a chance of pushing back and resist stretching.
I’d recommend familiarizing yourself with colliders/rigidbodies/forces/inertia/mass, etc before attempting to use Obi. There are the basic foundation of any physics stuff, otherwise you’re in for a very frustrating experience.
Thanks Jose. Will read more about all you suggest. Cheers!
|