20-06-2021, 05:49 PM
(This post was last modified: 20-06-2021, 06:32 PM by josemendez.)
(20-06-2021, 05:40 PM)alex798 Wrote: I oriertiered on counter because didn't know about this issue, Yes with profiler on, and turbo I get results similar to Your mac(still weired), but the matn problem is still dip- because my target platworm is Vive Focus(VR), and it's frame in our main scene is about 60-70, and if each small ropeĀ eat 10-20- this is too much for our project(maybe disabling vsync could better situation?)...
Never use fps to measure relative performance, use ms/frame. Fps aren't linear, ms/frame are. A 20 fps drop from 90 to 70 is a much smaller performance hit than it is from 40 to 20, for instance.
The solver in that scene uses 20 distance iterations, 10 pin iterations, etc. which are quite a lot. With these settings, simulation takes 0.8 ms/frame (which should take 90 fps down to around 82 fps).
Performance depends on many factors, not just how large the rope is or how many there are in the scene. Solver settings, rendering settings, timestep settings...all have a big impact. Try setting all iterations to 1, then use 2-3 substeps, that should give you 0.5 ms/frame. Also, rendering has a large impact on performance. Using simpler rendering (line rendering, instead of extruded mesh rendering) will take timings down further.
All these are settings/tradeoffs are detailed in the manual:
http://obi.virtualmethodstudio.com/manual/6.2/
Another tip: be mindful of death spiraling. Once you're above a certain ms/frame threshold for physics, performance will go downhill extremely fast unless you reduce your max fixed timestep. This applies to all physics in any engine that uses fixed timestepping, such as Unity.