Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Performance issues
#4
Thank you for your quick response!

There are various reasons as to why the obi tethers have proven to be unreliable, i will try to list a few:
  • Pin constraints are rarely properly resolved and almost always leaves a gap between the pinned body and the rope.
  • Distance constraints are not really properly enforced either unless you set the iteration count to something ridiculously high. I want the cord to behave less like a rubber band and more like a proper cord.
  • We are using NewtonVR to handle interactions, which works through applying physical forces to objects to keep them near the hand. To prevent ObiRope from pulling the plugs out of their position in your hand, we'd set the ObiRigidbody to kinematic whenever it was held, but this also creates issues since it's often unclear when an object should stop being kinematic - for instance, i noticed that objects behave much better when hung on the wall (with a fixed joint) if it is set to kinematicForParticles, because otherwise you'd get the gap between the cord an the object as a result of pin constraints not converging. Generally, everything just started acting much better when we just set all the ObiRigidbodies to kinematic.
  • The resolution of the rope actually affects how much it bends (ugh), and having too low resolution will result in the cords passing through tables and other flat surfaces. The poor convergence of the distance constraint also means that the distance between the particles easily grows when you are holding one end.
  • It is hard to handle junctions in cords nicely, even with stitchers. This is problematic for us since we have a cord with 19 ends(!).

Also, to clarify about the spring joint solution: we don't actually use a full chain of rigidbodies since PhysX can't really handle this stably. What i mean is that we have one spring joint for each plug and each junction in the cord, just to enforce the max distance between these parts. The result is of course that the cord can't properly hang off an edge, but at least it won't start snaking around or acting all rubber-bandy like it did before. There was also an unproportionally large force excerted by the cord to the plugs, though that would likely be related to the low mass of each plug (0.1kg, similar to a single obi particle) - i never messed around with that too much. It would be nice to be able to input the link mass in the rope editor, i didn't realize you could change this until after a week or so.

I don't use any mesh colliders with ObiColliders attached to them, only primitives. Right now my greatest issue is the crash i mentioned.

Also, i ran some deep profiling, and apparently the mesh updating stands for almost all of it, and takes 40-50 ms.

On a different note, is there a scripting API documentation for interacting with Obi particles somewhere?
Reply


Messages In This Thread
Performance issues - by khalvr - 24-01-2018, 04:00 PM
RE: Performance issues - by josemendez - 24-01-2018, 04:09 PM
RE: Performance issues - by josemendez - 24-01-2018, 04:24 PM
RE: Performance issues - by khalvr - 24-01-2018, 06:21 PM
RE: Performance issues - by josemendez - 25-01-2018, 10:10 AM
RE: Performance issues - by khalvr - 25-01-2018, 12:42 PM
RE: Performance issues - by josemendez - 25-01-2018, 01:24 PM
RE: Performance issues - by khalvr - 25-01-2018, 02:16 PM
RE: Performance issues - by josemendez - 25-01-2018, 02:35 PM
RE: Performance issues - by khalvr - 25-01-2018, 03:11 PM
RE: Performance issues - by josemendez - 25-01-2018, 03:32 PM
RE: Performance issues - by khalvr - 25-01-2018, 05:39 PM
RE: Performance issues - by khalvr - 26-01-2018, 01:09 PM