Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rope Disable/Enable
#1
Hello there, so we're running into an issue as well when disabling the ObiRope component and enabling it.

This is very easy to recreate and doesn't require any custom code

1. Create a plane and add an Obi Collider to it
2. Create a rope (you can use the rope prebuilt menu)
3. Position the rope above the plane
4. Pin one of the ropes ends so that the rope will hang down onto the plane
5. Press play and wait until the rope is draped against the plane
6. Disable the rope
7. Re-enable the rope - you will see that the rope falls through the collider and gets stuck inside the plane

This isn't mission critical for us yet, but we are disabling ropes as a performance optimization so we will need a fix to this issue eventually. Thanks!
Reply
#2
I cannot get it to happen, even tried to change the solvers Simulation Order. Are you on 3.2? You also might want to check your ObiSolver Collision Constraint Parameters. Try to crank it up the iteration and maybe put it on sequential.
Reply
#3
(08-09-2017, 06:35 PM)niZmo Wrote: I cannot get it to happen, even tried to change the solvers Simulation Order. Are you on 3.2? You also might want to check your ObiSolver Collision Constraint Parameters. Try to crank it up the iteration and maybe put it on sequential.

Yes, I downloaded it yesterday. This is Unity 2017.1.0p4 and I just started a new project from scratch, imported Obi Rope from asset store and recreated it as well.

Here is a zip of the project - you will need to import Obi Rope for it to work

https://www.dropbox.com/s/zblb2gy5ryeaaq...t.zip?dl=0

Press Play and watch the rope start dangling, disable the Obi Rope component (not the game object) and it will pause - mesh will still be visible. Then enable and you'll see it drop through the floor.

I didn't change any of the defaults for any components

OK so this is weird - I just opened up the test project that I attached above and pressed Play and it didn't do it this time.

But I know i'm not imagining this because I've been able to recreate it multiple times
Reply
#4
I use unity 2017 beta 10, haven’t updated stable version in a while. Opening your project, importing Obi rope then playing it, it doesn’t glitch through the plane. Tried different thing and it’s working perfectly fine. Maybe try duplicating your project and open it in beta 10, and see if it happens.

I would update unity but I have to go to work. Maybe someone else can try.
Reply
#5
OK so it is definitely sporadic but if a rope is lying against the ground, and you toggle enable a few times, you can get it to fall through

Falling Through Gif

Here's another example, I just made the rope longer (more particles = more likely to happen) you don't even have to pin one end

Stuck 2

I just toggle enable a bunch of times. You'll see that the end goes through quickly and then the body does as well

So in my experimentation, I found that disabling the Obi Solver instead of the Rope does not cause any problems.

I have been trying to figure out the best way to have massive numbers of ropes on the screen without causing performance issues and I finally came up with a solution which seems to work fine (I do NOT need ropes to collide with each other)

1. Each rope gets its own Obi Solver as opposed to sharing
2. I have a component which monitors the average velocity of the rope particles and if it falls below a threshold that I set, I disable the solver
3. When the player starts to interact with the rope again, I enable the solver

Previously after about 15 ropes all sharing a single solver with about 250 particles each, I would see my FPS dip down to 30 or lower

Now I have over 30 ropes on the screen, but since most of the solvers are disabled, it doesn't affect FPS at all.

Clearly this would only work if you know definitively when a rope is going to need to be simulated, but for my purposes this is an acceptable solution until the Enable/Disable collider issue can be resolved.

Here is a video of a scene I made with tons of ropes being disabled due to low velocities - note the FPS stability

http://imgur.com/a/uwxGE
Reply
#6
OK did some more testing regarding performance and I was able to have 125 ropes in a scene (stopped adding more after that) with NO performance implications by disabling the solvers when the ropes are idle.

I am giving every rope its own solver and I am disabling the solvers after the rope has settled down.

It appears that the solver itself uses very little memory and when they are disabled, there is no overhead CPU wise. This seems to be the best way performance wise to ensure no FPS dips.

I am not disabling the Obi Rope component at all, just the Obi Solvers and this is working great
Reply
#7
(08-09-2017, 08:53 PM)ptrick Wrote: OK did some more testing regarding performance and I was able to have 125 ropes in a scene (stopped adding more after that) with NO performance implications by disabling the solvers when the ropes are idle.

I am giving every rope its own solver and I am disabling the solvers after the rope has settled down.

It appears that the solver itself uses very little memory and when they are disabled, there is no overhead CPU wise. This seems to be the best way performance wise to ensure no FPS dips.

I am not disabling the Obi Rope component at all, just the Obi Solvers and this is working great

I know this is an old thread, but I just wanted to say thanks for recording these findings in a place others can see it.  I have problems with a crash relating to try to attach a static ObiSolver to a dynamically instantiated prefab, and I had concerns about performance loss for making a gazoodle of ObiSolvers when I put it directly in the prefab I'm instantiating (which solves the crash).  

You just saved me a lot of worry that I might be causing myself some performance problems by doing something which on the surface seemed wrong to me.
Reply
#8
(09-08-2018, 04:48 PM)Lluluien Wrote: I know this is an old thread, but I just wanted to say thanks for recording these findings in a place others can see it.  I have problems with a crash relating to try to attach a static ObiSolver to a dynamically instantiated prefab, and I had concerns about performance loss for making a gazoodle of ObiSolvers when I put it directly in the prefab I'm instantiating (which solves the crash).  

You just saved me a lot of worry that I might be causing myself some performance problems by doing something which on the surface seemed wrong to me.

You are welcome! It's been a long time since I've been working with obi rope and I'm sure things have improved stability wise since that time
Reply