I'm working on this scene where I have a chain that is connected to 2 hooks. Both particle attachments are set to static. In the first attached image "Editor Setup" you can see how the setup looks in the editor. When I run this scene, the green mesh rotates downwards (due to the rigidody and hinge components) and we get the second image "Scene Running (Static)". Up until now everything is behaving as expected.
Since I want the amount of strain on the chain to influence the rotation of the bottom hook (green mesh) I make the bottom particle attachment dynamic (and add the needed obi collider and rigidbody components to the bottom hook). When I don't change the settings of the chain, running the scene will lead to very erratic behavior: The chain immediately disconnects and all the components just start shaking uncontrollably (seen in image 3 "Dynamic No Changes").
I then tried modifying the chain constraints but it always results in a chain that doesn't have enough strain on it and that doesn't connect to the the mesh properly (as seen in image 4 "Dynamic With Stretch Compliance").
In the fifth attachment "Constraints" I have the constraints I used for the static image and the dynamic one + the Obi Solver settings. I tried tweaking every possible constraint to get a working dynamic attachment but nothing has worked. Any ideas what I could possibly be doing wrong?
12-02-2025, 10:26 AM (This post was last modified: 12-02-2025, 10:36 AM by josemendez.)
(12-02-2025, 09:34 AM)NoahAtlas Wrote: Since I want the amount of strain on the chain to influence the rotation of the bottom hook (green mesh) I make the bottom particle attachment dynamic (and add the needed obi collider and rigidbody components to the bottom hook). When I don't change the settings of the chain, running the scene will lead to very erratic behavior: The chain immediately disconnects and all the components just start shaking uncontrollably (seen in image 3 "Dynamic No Changes").
Hi!
The most probable cause for this is the rope colliding with the hook. This will lead to an impossible to solve situation, as the rope can't simultaneously intersect the collider (what the attachment strives to achieve) and not intersect the collider (what collisions strive to do). As a result, the simulation will shake/jitter as it attempts to meet both conditions in vain.
(12-02-2025, 09:34 AM)NoahAtlas Wrote: I then tried modifying the chain constraints
I think you're confusing chain constraints with chain rendering, which is a completely different thing. Chain constraints are only used by rods. Ropes (regardless of how you render them) use distance constraints.
(12-02-2025, 09:34 AM)NoahAtlas Wrote: but it always results in a chain that doesn't have enough strain on it and that doesn't connect to the the mesh properly (as seen in image 4 "Dynamic With Stretch Compliance").
I think you refer to stress, not strain? Strain = deformation due to stress. So what you actually want is to have as little strain as possible, that is, stress forces must not deform the rope but instead rotate the hook. To achieve this, stretch compliance must be set to zero (since compliance = elasticity). Any other setting will take you further from your goal.
The most probable cause for this is the rope colliding with the hook. This will lead to an impossible to solve situation, as the rope can't simultaneously intersect the collider (what the attachment strives to achieve) and not intersect the collider (what collisions strive to do). As a result, the simulation will shake/jitter as it attempts to meet both conditions in vain.
I think you're confusing chain constraints with chain rendering, which is a completely different thing. Chain constraints are only used by rods. Ropes (regardless of how you render them) use distance constraints.
I think you refer to stress, not strain? Strain = deformation due to stress. So what you actually want is to have as little strain as possible, that is, stress forces must not deform the rope but instead rotate the hook. To achieve this, stretch compliance must be set to zero (since compliance = elasticity). Any other setting will take you further from your goal.
let me know if I can be of further help,
kind regards,
Hi and thanks for the quick reply!
Quote:The most probable cause for this is the rope colliding with the hook. This will lead to an impossible to solve situation, as the rope can't simultaneously intersect the collider (what the attachment strives to achieve) and not intersect the collider (what collisions strive to do). As a result, the simulation will shake/jitter as it attempts to meet both conditions in vain.
I also thought this might be the issue but to my understanding my collider should be setup properly where that should not be the reason why. In the attached image "Collider" you can see my setup for which I had followed the manual (perhaps I misunderstood something? It looks ok to me).
Quote:I think you're confusing chain constraints with chain rendering, which is a completely different thing. Chain constraints are only used by rods. Ropes (regardless of how you render them) use distance constraints.
Apologies, this is just as a result of my poor wording. I'm aware of the difference, as I have read that part in the manual. I was just referring to all the constraints of my rope which is rendered as a chain.
Quote:I think you refer to stress, not strain? Strain = deformation due to stress. So what you actually want is to have as little strain as possible, that is, stress forces must not deform the rope but instead rotate the hook. To achieve this, stretch compliance must be set to zero (since compliance = elasticity). Any other setting will take you further from your goal.
Apologies for this misnomer as well. You are right, I do not want the rope to stretch. In the beginning of the scene the rope should be as stretched as it will ever be, as the top hook is in the highest position. In this position the bottom hook should be angled upwards toward the top hook due to the rope being attached to both. When the top hook is moved down I want the bottom hooks to also rotate down with it in a realistic manner due to the chain no longer experiencing as much stress.
Removing the stretch compliance sadly does not fully fix the attachment not properly attaching to the bottom hook as seen in image "Attachment issue". It clearly has the attachment as it is angled towards it but its just too far away. I'm not sure how to fix this.
12-02-2025, 11:10 AM (This post was last modified: 12-02-2025, 11:15 AM by josemendez.)
(12-02-2025, 10:59 AM)NoahAtlas Wrote: I also thought this might be the issue but to my understanding my collider should be setup properly where that should not be the reason why. In the attached image "Collider" you can see my setup for which I had followed the manual (perhaps I misunderstood something? It looks ok to me).
The collider in your image is clearly intersecting the chain (unless I'm misunderstanding the image) which is what the manual tells you to avoid. So unless you set up collision filtering to disable collisions between the collider and the part of the chain attached to it -I don't see your filter settings in any of the attached images?- then it's rather likely this is the problem.
A simple way to tell whether this is the problem is to globally disable collision constraints in your solver, under the "constraints" foldout. If simulation becomes well-behaved after disabling collisions, then the problem is unwanted collisions.
(12-02-2025, 10:59 AM)NoahAtlas Wrote: Removing the stretch compliance sadly does not fully fix the attachment not properly attaching to the bottom hook as seen in image "Attachment issue". It clearly has the attachment as it is angled towards it but its just too far away. I'm not sure how to fix this.
What's the mass ratio between the rope and the platform? as in any engine, high mass ratios require more substeps to converge (you're only using 4 substeps in your solver, I'd recommend to use at least 10 for this). If the platform is much heavier than the rope(s), you'll need to spend more substeps for the simulation to reach an acceptable result. See: https://obi.virtualmethodstudio.com/manu...gence.html
Also I see your solver is using asynchronous mode, which will yield a 1-frame delay with rigidbodies. You should use Synchronous Fixed instead. The manual contains an in-depth explanation of all sync modes and how they bolt on to Unity's physics simulation: https://obi.virtualmethodstudio.com/manu...eloop.html
12-02-2025, 11:21 AM (This post was last modified: 12-02-2025, 11:22 AM by josemendez.)
(12-02-2025, 11:10 AM)josemendez Wrote: The collider in your image is clearly intersecting the chain (unless I'm misunderstanding the image)
I was indeed misunderstanding the image, sorry! Didn't realize the last link in the chain (the white one) is part of the hook object. Still, depending on the size of your rope particles vs the chain link meshes, it could be intersecting the chain.
Try disabling collisions in the solver, as a test for checking whether collisions are having a negative impact.
12-02-2025, 11:34 AM (This post was last modified: 12-02-2025, 11:38 AM by NoahAtlas.)
(12-02-2025, 11:10 AM)josemendez Wrote: The collider in your image is clearly intersecting the chain (unless I'm misunderstanding the image) which is what the manual tells you to avoid. So unless you set up collision filtering to disable collisions between the collider and the part of the chain attached to it -I don't see your filter settings in any of the attached images?- then it's rather likely this is the problem.
A simple way to tell whether this is the problem is to globally disable collision constraints in your solver, under the "constraints" foldout. If simulation becomes well-behaved after disabling collisions, then the problem is unwanted collisions.
What's the mass ratio between the rope and the platform? as in any engine, high mass ratios require more substeps to converge (you're only using 4 substeps in your solver, I'd recommend to use at least 10 for this). If the platform is much heavier than the rope(s), you'll need to spend more substeps for the simulation to reach an acceptable result. See: https://obi.virtualmethodstudio.com/manu...gence.html
Also I see your solver is using asynchronous mode, which will yield a 1-frame delay with rigidbodies. You should use Synchronous Fixed instead. The manual contains an in-depth explanation of all sync modes and how they bolt on to Unity's physics simulation: https://obi.virtualmethodstudio.com/manu...eloop.html
kind regard,
Quote:The collider in your image is clearly intersecting the chain (unless I'm misunderstanding the image) which is what the manual tells you to avoid. So unless you set up collision filtering to disable collisions between the collider and the part of the chain attached to it -I don't see your filter settings in any of the attached images?- then it's rather likely this is the problem.
I think you are misunderstanding the image. The last part of the chain is a red link. The white part is a coupling link that is part of the hook mesh. The last particle of the chain is a good bit outside the collider.
Quote:What's the mass ratio between the rope and the platform? as in any engine, high mass ratios require more substeps to converge (you're only using 4 substeps in your solver, I'd recommend to use at least 10 for this). If the platform is much heavier than the rope(s), you'll need to spend more substeps for the simulation to reach an acceptable result. See: https://obi.virtualmethodstudio.com/manu...gence.html
The wooden box has a mass of 1. The small hook has a mass of 0.001. I'm not sure about the weight of the rope, I can't find out where I can see/change that value. Is it part of the solver or the rope? I can't seem to find anything related to that.
As for the substeps, increasing that to 10 doesn't seem to have a positive effect. Increasing the substeps just leads to erratic behavior similar to how I described it previously (where the bottom hook starts moving around and rotating to fast it almost looks like its teleporting).
Thanks for the continued help so far!
(12-02-2025, 11:21 AM)josemendez Wrote: I was indeed misunderstanding the image, sorry! Didn't realize the last link in the chain (the white one) is part of the hook object. Still, depending on the size of your rope particles vs the chain link meshes, it could be intersecting the chain.
Try disabling collisions in the solver, as a test for checking whether collisions are having a negative impact.
I have now tried disabling both the "Collision" and "Particle Collision / Queries" in the solver but that doesn't seem to impact the simulation.
Additionally, increasing the substeps to 30 seems to amplify the erratic behavior of the rope and bottom hook.
12-02-2025, 11:41 AM (This post was last modified: 12-02-2025, 11:45 AM by josemendez.)
(12-02-2025, 11:34 AM)NoahAtlas Wrote: I think you are misunderstanding the image. The last part of the chain is a red link. The white part is a coupling link that is part of the hook mesh. The last particle of the chain is a good bit outside the collider.
Yes, I did misunderstood as explained in my previous message, sorry about that. Still, I'd check whether collisions are the issue, since the fact that the chain is visually outside the collider is no guarantee that the particles are physically outside the collider.
(12-02-2025, 11:34 AM)NoahAtlas Wrote: The wooden box has a mass of 1. The small hook has a mass of 0.001.
That's a 1:100 mass ratio. Unity advises not to exceed 1:10 to guarantee simulation stability. Obi has a similar limitation.
(12-02-2025, 11:34 AM)NoahAtlas Wrote: I'm not sure about the weight of the rope, I can't find out where I can see/change that value. Is it part of the solver or the rope? I can't seem to find anything related to that.
It's part of the rope. You set it per-control point in the path editor, same as all other particle data like radius, color, collision filter, etc.
(12-02-2025, 11:34 AM)NoahAtlas Wrote: As for the substeps, increasing that to 10 doesn't seem to have a positive effect. Increasing the substeps just leads to erratic behavior similar to how I described it previously (where the bottom hook starts moving around and rotating to fast it almost looks like its teleporting).
This only confirms my suspicion that collisions are the issue. Try disabling collision constraints in the solver, see if things improve. If they do, the issue is that the rope is colliding against the hook.
(12-02-2025, 11:34 AM)NoahAtlas Wrote: I have now tried disabling both the "Collision" and "Particle Collision / Queries" in the solver but that doesn't seem to impact the simulation.
Additionally, increasing the substeps to 30 seems to amplify the erratic behavior of the rope and bottom hook.
That's really weird. Would it be possible for you to send your scene to support(at)virtualmethodstudio.com so that I can take a closer look at it?
(12-02-2025, 11:44 AM)josemendez Wrote: That's really weird. Would it be possible for you to send your scene to support(at)virtualmethodstudio.com so that I can take a closer look at it?
kind regards
E-Mail sent!
I hope my explanation of the scene is good enough for you to see what I was trying to accomplish.
12-02-2025, 02:52 PM (This post was last modified: 12-02-2025, 02:53 PM by josemendez.)
For other users reading this thread: the issue was that Obi was being used together with Filo (another cable simulation package) but they don't "talk" between them. So they were both involved in the same simulation, but oblivious to the presence of each other which yielded wrong results.
In this case the solution was to replace the rigidbody+dynamic attachment with a script that copies the rope's last element orientation to the object. This correctly rotates the hook without the need of two-way coupling between both engines.