Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple obi solvers
#2
(17-01-2022, 10:42 AM)lufydad Wrote: I have a scene with multiple obi solvers, and it make my scene run at 2 fps, with just 3 ropes by obi solver.
When I move the obi rope in a single obi solver and disable all obi solvers I get acceptable performance (30 fps). (ie. https://imgur.com/a/eCAepal)

In the documentation it's written "They can be added to any GameObject in your scene and there can be more than one solver working simultaneously in the same scene.". But does this mean that each solver added will have a great impact on performances ?

Hi there!

The performance difference of one solver vs multiple solvers is negligible. All actors in all solvers are updated in parallel as long as they're all updated by the same ObiUpdater component, so it doesn't matter how many solvers you have.

However having a separate updater for each solver negates any parallelism between solvers, they will be updated sequentially (one after another) resulting in much worse performance. See:
http://obi.virtualmethodstudio.com/manua...aters.html

Quote:Typically, you'd want to have only one updater in your scene. This allows tasks dispatched by all solvers in the updater to be executed in parallel.

If the updater and the solver are in the same GameObject, when you copied the solver you also copied the updater and this is probably the root of the issue. Just make sure all solvers are updated by the same updater.

This alone does not explain the *huge* performance hit you see, thought. The magnitude of the performance drop is due to death spiraling. This happens in any game engine when your game physics steps takes longer to simulate than the amount of "physics time" it is simulating.

If you open up the profiler, you will see more than 1 call to FixedUpdate() per frame. To fix this, go to Project Settings->Time and set your maximum fixed timestep to small value multiple of your timestep. For instance if your timestep is 0.02 (the default), set the maximum to 0.04.
Reply


Messages In This Thread
Multiple obi solvers - by lufydad - 17-01-2022, 10:42 AM
RE: Multiple obi solvers - by josemendez - 17-01-2022, 11:01 AM
RE: Multiple obi solvers - by lufydad - 17-01-2022, 03:21 PM
RE: Multiple obi solvers - by josemendez - 17-01-2022, 08:14 PM
RE: Multiple obi solvers - by lufydad - 19-01-2022, 05:18 PM
RE: Multiple obi solvers - by josemendez - 20-01-2022, 11:00 AM
RE: Multiple obi solvers - by lufydad - 21-01-2022, 03:50 PM
RE: Multiple obi solvers - by josemendez - 21-01-2022, 03:57 PM
RE: Multiple obi solvers - by lufydad - 21-01-2022, 04:39 PM
RE: Multiple obi solvers - by josemendez - 21-01-2022, 06:12 PM
RE: Multiple obi solvers - by lufydad - 24-01-2022, 02:10 PM
RE: Multiple obi solvers - by josemendez - 24-01-2022, 03:05 PM
RE: Multiple obi solvers - by lufydad - 24-01-2022, 04:10 PM
RE: Multiple obi solvers - by josemendez - 25-01-2022, 09:32 AM