(10-12-2019, 12:28 PM)josemendez Wrote: Hi,
How many constraint iterations/solver substeps are you using? 4-7 ms for a bit over a hundred particles is not normal. Should be below half a millisecond in-editor. Depends a bit on the hardware, but with a quad-core CPU it should be even faster.
Edit: I assume you're not using deep profiling?
Hi,
I am not using deep profiling.
An example frame:
Editor loop takes 46.1% of calculations, 2 calls and 8.35 ms. Profiler takes 3% and 0.55 ms.
PlayerLoop in total takes 50.6% and 9.15 ms.
ObiSolver.LateUpdate() takes 21.1% and 3.88 ms.
FixedUpdate.ScriptRunBehaviour takes 6.8% and 1.24ms. 5.9% of 6.8% and 1.09 of 1.24 ms of this is ObiSolver.FixedUpdate().
These two are also the highest performance demanding operation.
Next is FixedUpdate.PhysicsFixedUpdate with 4.7% and 0.87 ms. This has quite a lot of sub calculations with the maximum taking 0.6% (0.11 ms).
Then comes Camera.Render with 3.8% and 0.69 ms.
Substeps property of the solver is set to 1. Every constraint calculation in the solver is active and for each constraint solver the Iteration count is 3 and relaxation is 1.
Sequential evaluation: Distance, Particle Collision, Collision, Skin, Stretch Shear Bend Twist, Chain
Parallel evaluation: Bending, Particle Friction, Friction, Volume, Shape Matching, Tether, Pin, Stitch, Density.
All rods use the following constraints: Stretch Shear, Bend Twist, Chain, Tether, Pin (there is 1-2 pins for each rod).
All ropes use the following constraints: Distance, Bending, Tether, Pin (1-2 pins for each rod).
There are 4 rods and 2 ropes.
Using Unity 2019.1.14f1.