Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  help me to improve rope behaviour
#1
Hi!
Have a rope and don't understand how to achieve this behaviour: when the end of a rope follows the direction of attached collider. Do I need additional points? Weight settings? I've added a couple of images what I have now and what I want to achieve.
Cheers, hope for your awesome support


Attached Files Thumbnail(s)
       
Reply
#2
(02-10-2023, 02:22 PM)kebab_traume Wrote: Hi!
Have a rope and don't understand how to achieve this behaviour: when the end of a rope follows the direction of attached collider. Do I need additional points? Weight settings? I've added a couple of images what I have now and what I want to achieve.
Cheers, hope for your awesome support

Hi!

Just attach two consecutive points in the rope. You can see an example of this in the RopeShowcase sample scene, the ropes attached to the left wall are kept perpendicular to it using this technique.

This works just like in real life: there's infinite straight lines that pass trough one point, only one line can passes trough two points though. So for example if you hammer a stick to the wall using a single nail, the stick will be free to rotate around it. However if you use two nails then the stick is no longer able to rotate.

kind regards,
Reply
#3
(03-10-2023, 06:51 AM)josemendez Wrote: Hi!

Just attach two consecutive points in the rope. You can see an example of this in the RopeShowcase sample scene, the ropes attached to the left wall are kept perpendicular to it using this technique.

This works just like in real life: there's infinite straight lines that pass trough one point, only one line can passes trough two points though. So for example if you hammer a stick to the wall using a single nail, the stick will be free to rotate around it. However if you use two nails then the stick is no longer able to rotate.

kind regards,
Thanks for the quick reply. I've added a point. And here're some questions. In RopeShowcase example second point is attached to the rope itself because it's (the point) static. In my case I have dynamic object. So should I attach second point to the same collider as the first point? And in general - should I attach those points? Because if I don't - it doesn't affects the rope. But when I attach the second point to the same collider - have this effect on a screenshot. There're some images in attachments.


Attached Files Thumbnail(s)
           
Reply
#4
(03-10-2023, 09:55 AM)kebab_traume Wrote: So should I attach second point to the same collider as the first point?

Yes, you should attach it to the same collider. This works the same way regardless of the attachment being static or dynamic, it's just basic geometry:

- Infinite lines pass trough one point.
- Only one line passes trough two points.

Since you don't want the rope to freely rotate around one point, just use two.

(03-10-2023, 09:55 AM)kebab_traume Wrote: And in general - should I attach those points? Because if I don't - it doesn't affects the rope. But when I attach the second point to the same collider - have this effect on a screenshot. There're some images in attachments.

Make sure your rope isn't colliding against the collider it's attached to, otherwise you'll end up in an impossible to solve situation: the rope can't simultaneously inside and outside the collider, so it will behave weirdly. See "Attachments inside colliders" in the manual: http://obi.virtualmethodstudio.com/manua...ments.html

kind regards,
Reply
#5
(03-10-2023, 11:39 AM)josemendez Wrote: Yes, you should attach it to the same collider. This works the same way regardless of the attachment being static or dynamic, it's just basic geometry:

- Infinite lines pass trough one point.
- Only one line passes trough two points.

Since you don't want the rope to freely rotate around one point, just use two.


Make sure your rope isn't colliding against the collider it's attached to, otherwise you'll end up in an impossible to solve situation: the rope can't simultaneously inside and outside the collider, so it will behave weirdly. See "Attachments inside colliders" in the manual: http://obi.virtualmethodstudio.com/manua...ments.html

kind regards,
Making like you said, there's a certain effect but still shaking and strange bending in an area between points despite that collision category on both points is set to nothing. Is a placement of points correct on an attached screenshot?


Attached Files Thumbnail(s)
       
Reply
#6
(03-10-2023, 03:15 PM)kebab_traume Wrote: Making like you said, there's a certain effect but still shaking and strange bending in an area between points despite that collision category on both points is set to nothing. Is a placement of points correct on an attached screenshot?

Point placement looks ok, but I'd use a ObiParticleRenderer component to visually inspect particles since that's what matters at the end of the day.

I can see in your screenshot that your rope's stretching scale parameter is set to 2.4. That will make the rope stretch to 240% of its actual length, which is definitely not what you want in a "normal" rope. The default value of 1 (100%) is what you should use most of the time.
Reply
#7
(04-10-2023, 06:36 AM)josemendez Wrote: Point placement looks ok, but I'd use a ObiParticleRenderer component to visually inspect particles since that's what matters at the end of the day.

I can see in your screenshot that your rope's stretching scale parameter is set to 2.4. That will make the rope stretch to 240% of its actual length, which is definitely not what you want in a "normal" rope. The default value of 1 (100%) is what you should use most of the time.
Yeah, stretching definitely was a part of a problem. Now I have this, and here's the partcle render as well. What causes such angle? Does aligned/free parameter (point) affects the angle? In general: what's wrong and how to smooth that angle?
P.S. Really appreciate your help


Attached Files Thumbnail(s)
       
Reply
#8
(04-10-2023, 10:20 AM)kebab_traume Wrote: Yeah, stretching definitely was a part of a problem. Now I have this, and here's the partcle render as well. What causes such angle? Does aligned/free parameter (point) affects the angle? In general: what's wrong and how to smooth that angle?
P.S. Really appreciate your help

This is caused by lack of bending resistance. Set your rope's max bending and bend compliance both to zero, then in your ObiSolver set your bending constraint evaluation mode to sequential and increase the amount of bending constraint iterations until you're happy with the results.

Note there's no need to have hight rope resolution if the rope isn't meant to bend much. Reducing rope resolution will improve bending (and stretching) resistance as well as performance, so it's often a good idea.
Reply
#9
(05-10-2023, 06:29 AM)josemendez Wrote: This is caused by lack of bending resistance. Set your rope's max bending and bend compliance both to zero, then in your ObiSolver set your bending constraint evaluation mode to sequential and increase the amount of bending constraint iterations until you're happy with the results.

Note there's no need to have hight rope resolution if the rope isn't meant to bend much. Reducing rope resolution will improve bending (and stretching) resistance as well as performance, so it's often a good idea.
Thanks, this worked for me. Your support is super nice.
Reply