Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Animate physics Lags my other animations
#7
(22-10-2021, 07:22 AM)josemendez Wrote: Hi!

I can't see any profiler screenshot, but down to 70 fps from 280 (10 ms/frame) for a single character sounds way too much. Tip: never ever measure performance in fps, as it's not linear (eg: a performance hit that causes fps to drop from 60 to 30 would not cause fps to drop from 200 to 100, but to 50). Always use ms/frame, as you can compare them regardless of fps, making it much easier to reason about and compare performances.

Some general tips on performance:

- If using the Burst backend (which is recommended for performance, you should basically never use Oni as it's just a fallback), make sure you've disabled the jobs debugger and safety checks. These will very negatively affect performance in-editor. See: http://obi.virtualmethodstudio.com/manua...kends.html

- Make sure you're not using deep profiling. This also affects performance very negatively.

- Use as few substeps as you can get away with. Performance scales roughly linearly with the amount of substeps, so 4 substeps will be 4 times as slow as 1 substep.

- Use as few constraint iterations as you can. For an in-depth explanation of how the simulation works and how iterations/substeps affect it, see:
http://obi.virtualmethodstudio.com/manua...gence.html

- Disable any constraints you're not using.

- Use the simplest cloth rendering mode possible. If not using normal maps, this usually means CopyNormalsFromSimulation. See:
http://obi.virtualmethodstudio.com/manua...modes.html

- For character cloth, more than 1000 vertices on a single character is probably too much (unless there's only one of them on-screen). If you need very complex clothing, don't simulate it directly: use proxies to transfer simulation.

There's lots of other settings (both in Obi and Unity) that greatly affect performance, most of them are common sense but still it's best to use the profiler as your guide when optimizing. Otherwise you'd be just turning knobs at random Guiño.


After lowering the poly count, changing render mode, and disabling certain constraints I was able to get the frame rate up to 200 and the ms to be around 5. My only question is that for some reason burst doesn't seem to be better or worse than oni when I switch between them? Even after I disable safety checks, Job debugger and leak detection they are basically the same. Am i doing something wrong with burst or does burst make a larger difference with mobile than pc?
Reply


Messages In This Thread
RE: Animate physics Lags my other animations - by jeremy2132 - 23-10-2021, 10:20 PM