Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Performance issues
#2
(24-01-2018, 04:00 PM)khalvr Wrote: I'm using Obi Rope to simulate cords and wires in a VR truck service simulator. Since it was extremely unpractical and unstable to let Obi manage the rope length constraints, i decided to make all rigidbodies kinematicForParticles and use spring joints between the plugs (and dummy rigidbodies pinning the ropes together at all junctions) to keep them connected, just using ObiRope to simulate the aesthetics of the cords with pin constraints. The results are not 100% accurate, but it looks good enough for my purposes. Despite this, and despite rendering over 30 million triangles in the scene, ObiRope still stands for over 60% of the CPU load. This is despite the fact that i only use 2 solvers (one in each sub-scene), each with all constraints except pin, stitch, distance and collision disabled, and iteration counts set to 3 and below. There are maybe around 50 obi colliders in the scene. I also have a resolution of below 0.2 on all my ropes - in total, there are roughly 700 particles simulating. If i hang ropes on the wall (by attaching a fixed joint to one of the plug ends), obi will eventually even crash unity very suddenly and without warning. I have changed it so that the solvers run in LateUpdate, and reduced the advection radius to 0.05, but the performance is still utter crap. Am i doing something wrong, or does it simply not get better than this?

Hi,

Mi take on this would be that the bottleneck is either rope rendering, or collision detection. Keep in mind that MeshColliders are extremely performance heavy, and should only be used sparingly, just in case you're over-using them. I'd need to see a pic of the profiler in deep profiling mode to be able to tell, though. 700 particles is well below the maximum that you can simulate with Obi.

Btw, advection radius is only useful in conjunction with Obi Fluid. Advection is used to move particles along with the fluid flow, so it will not make any difference in your case. You should check your timestep though, 0.01-0.02 is the preferred range. You'll find it in Unity's "Time" settings.

cheers,
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