Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Performance issue and massive frame drops
#2
(01-01-2020, 10:14 AM)Maria Wrote: Hi 

The idea is to have a costume consisting of approx 50 non-stretchy ropes, attached to an avatar (animated with mocap suit) and previewed in VR in real-time. 
The problem is that even a simple prototype with 6 ropes with low resolution and length is running 10fps only, which makes it unusable for my use case.

What I have done
-created Rope Blueprint (thickness: 0.003, resolution: 0.1, pooled particles: 0, length: 0.3m)
-set up 1 obi solver (distance constraint iterations: 10, substpes: 1)
-created 6 ropes (used particles: 55)
-attached each rope to joint of low-poly avatar (using obi particle attachment)
-added 4 capsule colliders to avatar to avoid ropes going through body

I'm using Obi 5.0 in Unity 2019.2.9f1 on a PC with i7-6700 processor and GeForce GTX1070. 

The question is what is causing the performance issue? Does it have to do with the rope setup itself (and if so how to set up the rope in order to be efficient in terms of performance and also look quite stiff)? Is it because each rope is attached to the avatar's join which is moving quite fast? Or what else can be causing and and how it can be fixed?

Thank you in advance

Whenever a performance issue arises, profiling is the answer. 6 low-res ropes at 10 fps is not normal. I'd expect around 200-300 fps at the very least, even more in a standalone build. We got 50 1-meter ropes running at 60 fps in an iPad, so a i7 should be able to handle many more.

My take would be this is a case of death spiraling. Take a look at the profiler and see how many times per frame is FixedUpdate() being called. More than once per frame would confirm my guess. If that's the case, lower Unity's max timestep setting.

Also a hint: use substeps instead of iterations if possible. They boost convergence (roughly translates to increased stiffness) a lot more, for the same cost. This is thoroughly explained in the manual, see:
http://obi.virtualmethodstudio.com/tutor...gence.html
Reply


Messages In This Thread
RE: Performance issue and massive frame drops - by josemendez - 07-01-2020, 11:05 AM