Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Newby lost, Trying to make a robe bridge
#1
Hi,
Sorry for my bad english, it's not my first language.

I'm new to using obi rope and rod, so the solution is probably simple, but i can't figure it out despite looking at the video and reading the manual.

I'm tryinig to make a simple rope bridge, with a couple plank pin to two ropes. Before i use a static 3D model (see image model), but I would like to recreate those model with obi rope so they react to the player passing on them.
   

I wasn't sure if i should use robe or Rod so i try to set up both to see what would work the best (i don't need them to move much). In Red plank is the rope and in green the rod. Both use the same solver value, but i have 2 solver in my scene (one for each).I added a particule renderer on all the rope and rod and 2 particule attachement to pin the rope/rod to the plank on each side. The attachement are in static, but changing them to dynamic don't change anything to the result. They also have similar path with a little down curve. They also have a resolution of .5 thickness of 0.1

If they stay about as such, it would be fine for me, but when i press play...

   

they get all twisted in the middle and i don't understand what's causing this and with this happening when i just try to link a rope to 2 fix plank, i worry about what it will be when i try to add plank to this bridge.

Please help, i'm at a lost.


Attached Files Thumbnail(s)
       
Reply
#2
Hi there!

To me it just seems like your ropes are being forced by some external agent (maybe a collider at their ends?) They’re extremely overstretched at the ends, causing them to coil in the middle.

Can you share more details about your collider setup?
Reply
#3
(18-03-2022, 06:04 PM)josemendez Wrote: Hi there!

To me it just seems like your ropes are being forced by some external agent (maybe a collider at their ends?) They’re extremely overstretched at the ends, causing them to coil in the middle.

Can you share more details about your collider setup?

Sorry for the delay i was out all last week,

At each end there's dupplicate of the same box here his value :
   

if I set both the rope/rod and the collider to collide with nothing, they act more 'normal' but i doubt that how this should work?
Reply
#4
(28-03-2022, 09:36 AM)oppay Wrote: At each end there's dupplicate of the same box here his value :

if I set both the rope/rod and the collider to collide with nothing, they act more 'normal' but i doubt that how this should work?

If you attach a rope inside a collider that's set to collide with the rope, the simulation will behave in a weird way. Think about it: you're asking the rope to stay inside a collider using an attachment, but at the same time to stay outside of it (since that's what collisions do). That's simply impossible to achieve, an object cannot be simultaneously inside and outside a volume.

You should use collision filters to solve this. Note that you don't need to set both the entire rope and the collider to "collide with nothing", you just want to set the endpoints of the rope to not collide with the collider's collision category. For more info on how filters work, see:
http://obi.virtualmethodstudio.com/manua...sions.html
Reply
#5
(28-03-2022, 09:58 AM)josemendez Wrote: If you attach a rope inside a collider that's set to collide with the rope, the simulation will behave in a weird way. Think about it: you're asking the rope to stay inside a collider using an attachment, but at the same time to stay outside of it (since that's what collisions do). That's simply impossible to achieve, an object cannot be simultaneously inside and outside a volume.

You should use collision filters to solve this. Note that you don't need to set both the entire rope and the collider to "collide with nothing", you just want to set the endpoints of the rope to not collide with the collider's collision category. For more info on how filters work, see:
http://obi.virtualmethodstudio.com/manua...sions.html

So to make my rope bridge i will need to attach all the plank to the rope, but set them in a different collider filter then the one of the rope? It sound pretty redundant to add a attachment manually for each plank. Is there a better way to connect them?
Reply
#6
(28-03-2022, 10:34 AM)oppay Wrote: So to make my rope bridge i will need to attach all the plank to the rope, but set them in a different collider filter then the one of the rope?

Correct.

(28-03-2022, 10:34 AM)oppay Wrote: So to make my rope bridge i will need to attach all the plank to the rope, but set them in a different collider filter then the one of the rope? It sound pretty redundant to add a attachment manually for each plank. Is there a better way to connect them?

You must attach the planks to the rope somehow, right?. You can't magically have planks attached to the rope without actually telling the engine they must be attached and where along the rope(s) you wish to attach them.

If you were to use Unity's joints to do this, you'd be in the exact same situation: you would need to manually create all individual joints in-between the planks and attach them to the plank rigidbodies. For long bridges with a lot of planks this is a huge time sink indeed.

However doing this manually isn't the only option. You can also create attachments programmatically, or even just the underlying constraints. This does require some C# scripting skills on your part. See Adding/removing constraints in the scripting section of the manual: http://obi.virtualmethodstudio.com/manua...aints.html

If you're going to have multiple bridges in your game, writing yourself some sort of BridgeBuilder script that automatically creates the ropes, places the planks, and attaches them to the ropes would be a time saver in the long run.
Reply
#7
(28-03-2022, 10:42 AM)josemendez Wrote: Correct.


You must attach the planks to the rope somehow, right?. You can't magically have planks attached to the rope without actually telling the engine they must be attached and where along the rope(s) you wish to attach them.

If you were to use Unity's joints to do this, you'd be in the exact same situation: you would need to manually create all individual joints in-between the planks and attach them to the plank rigidbodies. For long bridges with a lot of planks this is a huge time sink indeed.

However doing this manually isn't the only option. You can also create attachments programmatically, or even just the underlying constraints. This does require some C# scripting skills on your part. See Adding/removing constraints in the scripting section of the manual: http://obi.virtualmethodstudio.com/manua...aints.html

If you're going to have multiple bridges in your game, writing yourself some sort of BridgeBuilder script that automatically creates the ropes, places the planks, and attaches them to the ropes would be a time saver in the long run.


I do have some skill in C#, so i'm going to take a look to make a bridge builder, if i can only have to place the 'start' and 'end' of the bridge and have it create bridge it would be quite faster then doing it by hand. I'm surprise to not see obi use to make bridge.
Reply
#8
(28-03-2022, 10:56 AM)oppay Wrote: I'm surprise to not see obi use to make bridge.

Bridges are usually built as a sequence of rigidbodies and joints. If you think about it, the ropes are pretty much always completely tensed up in between planks due too their own weight. In a bridge they never have a chance to bend, curl up, intersect themselves, each other or other geometry in the level: they're there just to support the planks. Since there's pretty much zero visible rope dynamics going on in a typical bridge, there's no benefit in using a rope simulation for this.

You can use ropes if you want very detailed dynamics (the bridge twisting on itself, planks detaching from one of the 2 ropes...) or if your bridge is destructible and you really want to see dangling ropes when the bridge is destroyed. But for typical bridges joints are simpler, faster to setup and don't require using a third party physics engine.
Reply