Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Performance issues
#11
Hello,

I haven't been able to develop my game until recent and have looked into this issue again. I have made a brand new project just to test the rope system. Maybe this is intended but in a totally empty unity scene with everything set to default except V-Sync is turned off. I can spawn in about 25 ropes, that's when the lag spikes get to a point that it becomes frustrating. If this is intended then I guess my expectations of the asset were to high. I have also tried both 2dlinerenderer and the regular line extruder, unfortunately not much difference.

I feel like maybe there is settings that may increase fps that I don't know off. The settings that boosted the fps atleast some that I have already used are rope smoothing, I set that to 0 and when using the rope extruder renderer I have the section set to a 4 segment cirlce.  I am kind of clueless on how to further improve fps. I exported the scene to a UnityPackage, if somebody can help would be great I can share the unitypackage so somebody can check my code.

Thanks in advance
Reply
#12
Not 1 developer that can tell if the previous explained issue is an actual issue or if it's just the limit of Obirope?
Reply
#13
(01-11-2019, 06:28 PM)Smurfj3 Wrote: Not 1 developer that can tell if the previous explained issue is an actual issue or if it's just the limit of Obirope?

I'm not getting the same results. Note: I'm not a developer of Obi Products - I'm just a game dev only trying to help.
It took a little more than 40 ropes to start dropping below 60 fps on my desktop.

For Testing,
I created a new unity project, imported Obi Ropes, Opened the RopeShowcase scene file.
Next, I duplicated the animated pinned rope about 38+ times, adjusted the rope positions slightly and pressed play.
It held up quite well.

I had a spike or 2 from Garbage collection, but that's about it.
What are your settings?
What type of machine are you using?

My Machine Specs: Nvidia 1070, 16 GB ram, i7-8700
Reply
#14
(01-11-2019, 06:28 PM)Smurfj3 Wrote: Not 1 developer that can tell if the previous explained issue is an actual issue or if it's just the limit of Obirope?

Hi,

The number of ropes in your scene is pretty much meaningless, what determines performance is the amount of particles and the amount of iterations spent in the physics simulation.

You could have 200 ropes made of 5 particles each, or a single rope made of 1000 particles and performance would be the same. For reference, take a look at our performance measurements:
http://obi.virtualmethodstudio.com/performance.html

Edit:
Made a quick test scene with 50 one meter ropes, 10 particles each, using the line renderer and default solver/Unity settings. Getting roughly 80 fps in editor and +250 fps in standalone. Video:
[video=youtube]https://youtu.be/o0nB7wfSqmc [/video]
Reply
#15
(04-11-2019, 02:19 PM)josemendez Wrote: Hi,

The number of ropes in your scene is pretty much meaningless, what determines performance is the amount of particles and the amount of iterations spent in the physics simulation.

You could have 200 ropes made of 5 particles each, or a single rope made of 1000 particles and performance would be the same. For reference, take a look at our performance measurements:
http://obi.virtualmethodstudio.com/performance.html

Edit:
Made a quick test scene with 50 one meter ropes, 10 particles each, using the line renderer and default solver/Unity settings. Getting roughly 80 fps in editor and +250 fps in standalone. Video:
[video=youtube]https://youtu.be/o0nB7wfSqmc [/video]

Is there any chance you can send me that scene? I cannot seem to get that performance with my version of Unity 2018.3.2f1. I have had GC issues with other things too, which makes me believe it's maybe the version of Unity acting weird. With your scene I could test that theory.

To answer "StudioTatsu", I highly doubt it's my machine but here are my specs:

CPU : I7 7700K
GPU : 1080 GTX TI Strix
RAM : 32 GB Corsair 3000 mhz
Reply
#16
Hello,

I am having similar issues as others have stated regarding performance. In my case, FPS is dropped by 80-100 by one rope (actually 4 rods and ropes). 

V-Sync is turned off. Fixed timestep is 0.01388889 and maximum allowed timestep is 0.02. Tried with 0.04 and 0.05, no luck. Using standard render pipeline (the old one).

I am developing a VR application for Oculus Quest. But the performance issue is same on a PC. Inside the editor, without any of the 6 ropes active, FPS is around 400-500. Activating one rope drops it by 80-100. If all 6 are activated, FPS is around 70-120. 

For each rope/rod I tried reducing the maximum particle count in Obi solver, I lowered the resolution of the rope to a minimum, no luck. I tried deactivating every constraint one by one in the Obi solver but that barely improved performance. Only when either deactivating the Obi Solver component or the whole game object, the performance issue was gone.

Looking at the profiler the 2 main issues can be found in:
1) PlayerLoop -> FixedUpdate.ScriptRunBehaviourUpdate -> FixedBehaviourUpdate -> ObiSolver.FixedUpdate()  = 16.7%, calls 12
2) PlayerLoop -> PreLateUpdate.ScriptRunBehaviourLateUpate -> LateBehaviorUpdate -> ObiSolver.LateUpdate() = 14.7%, calls 6

So 31.4% out of 45.6% (everything else). The rest 53.4% is Editor Loop and 0.8% the profiler. Changing Update Mode of Obi Solver from FixedUpdate to LateUpdate does not improve the FPS. Disabling the ObiRopeExtrudedRenderer makes no difference, so rendering the rope is not a problem. 

Here is an image of one of the rods and its settings:
https://i.imgur.com/z5YOdkx.png

Every constraint in Obi Solver is activated with Interations set to 3 and Relaxation at 1. Everything except Distance, Stretch Shear and Bend Twist are parallel. The rest of the three are Sequential. Chain is disabled.


In the end what I am trying to achieve is something very similar to this:
https://www.reddit.com/r/Unity3D/comment...ng_a_data/

Would that be even possible with Obi Rope on Oculus Quest? Since I haven't found a configuration that works I am trying to use built in physics of Unity. However that has proven to be a pain as well (not performance wise though).

Any help is much appreciated!
Reply
#17
Hi!

Quote:I am developing a VR application for Oculus Quest. But the performance issue is same on a PC. Inside the editor, without any of the 6 ropes active, FPS is around 400-500. Activating one rope drops it by 80-100. If all 6 are activated, FPS is around 70-120. 

Never measure performance in fps, always use milliseconds. A drop of from 500 fps to 420 fps (80 fps less) is 0.3 ms, so barely any drop in performance. Dropping from 420 to 120 fps (8 ms) is however a much larger hit.

This shouldn't happen if your rope physics was being updated once per frame. However your profiler data indicates it's being updated 12 times per frame. This should not be the case if your max fixed timestep is as close to your fixed timestep value as you indicate. Increasing the max fixed timestep value can only worsen performance, never improve it. Try setting your max fixed timestep to the same value as your fixed timestep, report back results.

Judging from the data your provided, my guess is that you have 6 solvers in your scene. Is that the case?
Reply
#18
(09-12-2019, 12:22 AM)josemendez Wrote: Hi!


Never measure performance in fps, always use milliseconds. A drop of from 500 fps to 420 fps (80 fps less) is 0.3 ms, so barely any drop in performance. Dropping from 420 to 120 fps (8 ms) is however a much larger hit.

This shouldn't happen if your rope physics was being updated once per frame. However your profiler data indicates it's being updated 12 times per frame. This should not be the case if your max fixed timestep is as close to your fixed timestep value as you indicate. Increasing the max fixed timestep value can only worsen performance, never improve it. Try setting your max fixed timestep to the same value as your fixed timestep, report back results.

Judging from the data your provided, my guess is that you have 6 solvers in your scene. Is that the case?

Hey,

The drop is around 7-12 ms. Since you asked if I used 6 solvers in the scene I figured that was the problem. So I limited it to one and this now means that it no longer updates 12 times per frame but just one. I also tried setting the "Maximum Allowed Timestep" to the same as the "Fixed Timestep" (0.01388889. This number because it is the refresh rate of the Oculus Quest) but this did not help.

So all in all, while I did get the update count from 12 to 1, the time spent nor the fps were reduced.
Reply
#19
(09-12-2019, 12:53 PM)Wattosan Wrote: Hey,

The drop is around 7-12 ms. Since you asked if I used 6 solvers in the scene I figured that was the problem. So I limited it to one and this now means that it no longer updates 12 times per frame but just one. I also tried setting the "Maximum Allowed Timestep" to the same as the "Fixed Timestep" (0.01388889. This number because it is the refresh rate of the Oculus Quest) but this did not help.

So all in all, while I did get the update count from 12 to 1, the time spent nor the fps were reduced.

Hi,

7 ms for a few ropes is not normal at all, so there must be something off. How big is the particle pool of your solver? In the rod screenshot I saw you were using 5000 particles... surely your rope/rod is not that dense? Try reducing it to somewhere around 500 (even less if your rod does not use up that many particles). That should save some time.

Anyway, I'm unable to reproduce this performance drop. I can take a look at your project if you wish. If possible, send a repro scene to support(at)virtualmethodstudio.com.
Reply
#20
(09-12-2019, 04:23 PM)josemendez Wrote: Hi,

7 ms for a few ropes is not normal at all, so there must be something off. How big is the particle pool of your solver? In the rod screenshot I saw you were using 5000 particles... surely your rope/rod is not that dense? Try reducing it to somewhere around 500 (even less if your rod does not use up that many particles). That should save some time.

Anyway, I'm unable to reproduce this performance drop. I can take a look at your project if you wish. If possible, send a repro scene to support(at)virtualmethodstudio.com.

Hey,

I reduced the max particle count to 600 for the solver but this did not have any notable effect. Used particle count is 165 (noticed this information inside the Solver's inspector).

Sometimes ObiSolver.LateUpdate() and ObiSolver.FixedUpdate() taken up roughly the same amount of time (4ms each) but most of the time LateUpdate() takes around 6ms and FixedUpdate() 2ms.

What should the ms stay at? Doesn't this depend on little bit on the hardware? CPU is 7700HQ and GPU GTX 1070, if that helps. And these measurements are taken from inside the Editor. Perhaps the calculation time is reduced in a build.
Reply