Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Feedback How to Controll Rope Elements/segmrents and have better collision
#1
What im trying to do with OBI Rope is a simple weaving mechanics. In which i have rows of cylinders and then I use the rope in this case the wefts to move across and wrap around thos columns back and forth:

Notes
Im using OBI-Rope Version 7
Im using the Cursor to add new segements/Particles at the end of the rope

Main Issuses


  1. When I hit the down or up arrows using rigidbody force to move the rope 1 unit along a clyinder,, the whole rope is affected, But what i want is on ly for the last one or last to segments to be affected by this force and all the previous one should stay where they at. ( Shown at the end of the attched video)
  2. When the rope is moving faster the collision breaks and rope goes through the columns/warps. but if I move it slower it seems to act good which brings us to issue #3
  3. Im building on top of the Wrap-The-Rope  Sample scene, which by default has a tension. I can stop this tension by making the start attchment as Static by then i lose the colliding 
My questions are
  • How to control specific segemnts as to freeze their position once created and only move the last n-ones
  • How to have collison not be broken no matter how fast or streched is the rope
  • How to stop/ disable the tension without the comprimising the dyniamic bhaviour of the attched ends
  1.  
Reply
#2
Hi!

(25-08-2024, 02:14 AM)Barax94 Wrote: Shown at the end of the attched video

There's no videos attached to your post. Maybe you forgot to paste the link - or if using the forum's attachment system, to click "AddAttachment" after selecting the file?

(25-08-2024, 02:14 AM)Barax94 Wrote: How to control specific segemnts as to freeze their position once created and only move the last n-ones

Just set the particle's inverse mass to zero. This will make them ignore any dynamics simulation and just stay in place. See:
http://obi.virtualmethodstudio.com/manua...icles.html

(25-08-2024, 02:14 AM)Barax94 Wrote: How to have collison not be broken no matter how fast or streched is the rope

That's simply impossible. You can't expect the rope (or any other simulated object for that matter) to move infinitely fast or stretch an infinite amount and collision detection to still work robustly, as that would essentially require infinite spatial and temporal simulation resolution and hence, infinite memory. CCD can only work to an extent, and when the rope is too stretched (under too much tension) collisions will be missed.

To improve simulation quality, you can increase rope blueprint resolution (spatial resolution) and/or increase the amount of solver substeps (temporal resolution). Another typical solution used in many games is to simply limit how fast the user can move objects around. See our troubleshooting guide: http://obi.virtualmethodstudio.com/manua...oting.html

(25-08-2024, 02:14 AM)Barax94 Wrote: How to stop/ disable the tension without the comprimising the dyniamic bhaviour of the attched ends

Not sure what you mean here: tension is a force along the length of the rope that keeps it from stretching. If you disabled tension, you'd essentially have no rope simulation and all rope particles would be free to move anywhere.


(25-08-2024, 02:14 AM)Barax94 Wrote: I can stop this tension by making the start attchment as Static by then i lose the colliding 

This doesn't stop tension but quite the opposite: allows it to increase indefinitely. The attached rigidbody will ignore the tension force (the rope is still fully affected by it), so no matter under how much tension the rope is the object attached to the rope will be able to move around and continue stretching the rope - increasing tension. Once the tension in the rope is sufficiently high, collisions will start failing: in the real world, that would be the equivalent of the rope and/or the objects it's colliding against snapping/breaking.

I'm not sure I understand your use case, to be honest. If you could share a video of what you're looking to achieve it would help.

kind regards,
Reply
#3
(25-08-2024, 12:20 PM)josemendez Wrote: Hi!


There's no videos attached to your post. Maybe you forgot to paste the link - or if using the forum's attachment system, to click "AddAttachment" after selecting the file?


Just set the particle's inverse mass to zero. This will make them ignore any dynamics simulation and just stay in place. See:
http://obi.virtualmethodstudio.com/manua...icles.html


That's simply impossible. You can't expect the rope (or any other simulated object for that matter) to move infinitely fast or stretch an infinite amount and collision detection to still work robustly, as that would essentially require infinite spatial and temporal simulation resolution and hence, infinite memory. CCD can only work to an extent, and when the rope is too stretched (under too much tension) collisions will be missed.

To improve simulation quality, you can increase rope blueprint resolution (spatial resolution) and/or increase the amount of solver substeps (temporal resolution). Another typical solution used in many games is to simply limit how fast the user can move objects around. See our troubleshooting guide: http://obi.virtualmethodstudio.com/manua...oting.html


Not sure what you mean here: tension is a force along the length of the rope that keeps it from stretching. If you disabled tension, you'd essentially have no rope simulation and all rope particles would be free to move anywhere.



This doesn't stop tension but quite the opposite: allows it to increase indefinitely. The attached rigidbody will ignore the tension force (the rope is still fully affected by it), so no matter under how much tension the rope is the object attached to the rope will be able to move around and continue stretching the rope - increasing tension. Once the tension in the rope is sufficiently high, collisions will start failing: in the real world, that would be the equivalent of the rope and/or the objects it's colliding against snapping/breaking.

I'm not sure I understand your use case, to be honest. If you could share a video of what you're looking to achieve it would help.

kind regards,

Sorry for the confusion and thanks for your reply.

- 1st I cannot attatch video files due to fromat issue i tried MP4 and other formats. what format are acceptable?

- By tension i meant like pulling-force that in Wrap-a-Rope the Tenser object is pulling the Player object. If i wanted to stop this pulling i make the attachment static, but i noticed that i the colliders doesn't hold any more only for few sec then by pass other objects.


- When i said no matter how fast or stretched mainly i meant on reasonable level as how to control that (I'll try to play with resolution and see). as the intended behaviour is that the rope will act as a thread/weaving:
  • the start attachment will be fixed not moving.
  •  And then through VR controller i move the end attchment across an array of cylinders up and down (Im using the cursor to increase the length here)
  • once i reach the end of the array of cylinders i go back and forth same way until the end of the cylinder length
But the issue as im going through the cylinders theres pulling/force which i need to increase the acceleartion of the player to overcome it

and regarding going next row ill try to make invers mass to zero and see

   
Reply
#4
(26-08-2024, 04:44 AM)Barax94 Wrote: Sorry for the confusion and thanks for your reply.

- 1st I cannot attatch video files due to fromat issue i tried MP4 and other formats. what format are acceptable?

Hi,

If you're attaching a somewhat long video, it's best to paste a link and host it in a video hosting service (youtube, facebook, live leak, vimeo, twitch, etc. see the "insert a video" button in the post editing toolbar) since most online forums can't host but small files. If every user decided to upload videos directly to the forums, our hosting costs would skyrocket! Guiño

(26-08-2024, 04:44 AM)Barax94 Wrote: - By tension i meant like pulling-force that in Wrap-a-Rope the Tenser object is pulling the Player object. If i wanted to stop this pulling i make the attachment static, but i noticed that i the colliders doesn't hold any more only for few sec then by pass other objects.

In that scene, there's a rigidbody attached to the bottom of the rope, that pulls the rope down and strives to keep it somewhat tense. As I explained in my previous post, making the attachment static will increase tension - which is the exact opposite of what you want. Move the rigidbody upwards and making it kinematic will ensure tension in the rope is kept to a minimum, but then of course the rope will just flail around since it has very little tension.

(26-08-2024, 04:44 AM)Barax94 Wrote: - When i said no matter how fast or stretched mainly i meant on reasonable level as how to control that (I'll try to play with resolution and see).

The manual contains a very in-depth explanation of how the engine works internally, and how substeps and iterations (the main controls for quality vs performance) as well as the amount of particles/constraints (resolution) affect results. See: http://obi.virtualmethodstudio.com/manua...gence.html

(26-08-2024, 04:44 AM)Barax94 Wrote:
  • the start attachment will be fixed not moving.
  •  And then through VR controller i move the end attchment across an array of cylinders up and down  (Im using the cursor to increase the length here)
  • once i reach the end of the array of cylinders i go back and forth same way until the end of the cylinder length
But the issue as im going through the cylinders theres pulling/force which i need to increase the acceleartion of the player to overcome it

Ok, so you have a fixed length of thread, statically attached on one end, and you're able to freely move the other end. You weave it past an array of cylinders, and once the rope is completely taut... then what? How do you use the cursor to increase length and allow the user to keep weaving?

(26-08-2024, 04:44 AM)Barax94 Wrote: and regarding going next row ill try to make invers mass to zero and see

Setting particle inverse mass to zero (that is, fixing these particles in place by giving them infinite mass) won't work for an obvious reason: How are you going to keep the rope sliding past the cylinders it's already been woven around? You can't just fix it in place can you? You need the entire rope to be simulated at all times, otherwise it won't be able to slide past the cylinders as you continue weaving.

The way I would approach this is to drive the change in rope length (cursor) using a measure of rope strain: the amount of stretching caused by tension, which is the rate of current length vs length at rest:

Code:
float strain = rope.CalculateLength() / rope.restLength;

When strain increases, you increase rope length until strain goes down to a given range. When strain decreases, you reduce rope length until it's back within range. This way the tension in the rope is more or less constant, and it dynamically resizes as you pull it around.

Also note that the longer the rope, the costlier the simulation, so there's a limit to how much rope you can realistically have.

kind regards,
Reply