03-02-2018, 04:13 AM
Wow! This is really great. Thank you for doing this. It has transformed the difficulty of using this asset for me.
Have you thought about putting a simple rope generator in a static function?
So I've got the rope generating and something hanging from it, but I'm having the same problem as a lot of other people again - the rope is unusably elastic like a rubber band. In your comments you wrote:
/// Further explanation: there's no way to correlate iteration count or weight to length in order to maintain constant stiffness (not in Obi, nor any existing engine). You could create a single
/// tether constraint joining the first and last particle in the rope, and set its length to be rope.RestLenght. This is a common workaround in many physics engines.
I realize it's not possible to have perfectly uniform and predictable elasticity of the rope with this asset, however it has to be possible and it's absolutely critical to get it somewhere in the ballpark of not behaving like a rubber band. Will the settings for making this happen always be the same (and if so why isn't the rope configured like that by default) or will they vary depending on the length and attached mass of the rope? If they will vary depending on the length and attached mass then there must be some algorithm that can evaluate those variables and output at least approximate settings.
It might be necessary to derive that algorithm through trial and error, which is what I've been trying to do. But this is what I've run into.
The three factors I've found that play into this are rope mass (INV_MASSES), distance constraint iterations, and tethers.
By adjusting the distance constraint iterations while the application is running in editor, I have not been able to observe any difference in rope behavior. I ran into the same situation when I tried adding a pin constraint while the application is running. Are these things that can only be done when the application is stopped?
I tried adding tethers but I can't seem to make anything happen. Does nothing:
tether_constraints = rope.GetComponent<ObiTetherConstraints>();
tether_constraints.stiffness = .99f;
tether_constraints.tetherScale = .99f;
tether_constraints.PushDataToSolver();
This changes the values displayed in inspector but does not change the behavior of the rope.
Also does nothing:
rope.GenerateTethers(ObiActor.TetherType.Hierarchical);
I can click generate tethers in inspector while the application is running, and the behavior of the rope changes (although it looks like it won't be a complete solution) - and also whenever I change the length of the rope with cursor.ChangeLength the tethers get completely messed up.
Thanks,
Jon
Have you thought about putting a simple rope generator in a static function?
So I've got the rope generating and something hanging from it, but I'm having the same problem as a lot of other people again - the rope is unusably elastic like a rubber band. In your comments you wrote:
/// Further explanation: there's no way to correlate iteration count or weight to length in order to maintain constant stiffness (not in Obi, nor any existing engine). You could create a single
/// tether constraint joining the first and last particle in the rope, and set its length to be rope.RestLenght. This is a common workaround in many physics engines.
I realize it's not possible to have perfectly uniform and predictable elasticity of the rope with this asset, however it has to be possible and it's absolutely critical to get it somewhere in the ballpark of not behaving like a rubber band. Will the settings for making this happen always be the same (and if so why isn't the rope configured like that by default) or will they vary depending on the length and attached mass of the rope? If they will vary depending on the length and attached mass then there must be some algorithm that can evaluate those variables and output at least approximate settings.
It might be necessary to derive that algorithm through trial and error, which is what I've been trying to do. But this is what I've run into.
The three factors I've found that play into this are rope mass (INV_MASSES), distance constraint iterations, and tethers.
By adjusting the distance constraint iterations while the application is running in editor, I have not been able to observe any difference in rope behavior. I ran into the same situation when I tried adding a pin constraint while the application is running. Are these things that can only be done when the application is stopped?
I tried adding tethers but I can't seem to make anything happen. Does nothing:
tether_constraints = rope.GetComponent<ObiTetherConstraints>();
tether_constraints.stiffness = .99f;
tether_constraints.tetherScale = .99f;
tether_constraints.PushDataToSolver();
This changes the values displayed in inspector but does not change the behavior of the rope.
Also does nothing:
rope.GenerateTethers(ObiActor.TetherType.Hierarchical);
I can click generate tethers in inspector while the application is running, and the behavior of the rope changes (although it looks like it won't be a complete solution) - and also whenever I change the length of the rope with cursor.ChangeLength the tethers get completely messed up.
Thanks,
Jon