ok few think.
NewtonSetSolverModel Is the number of iteration that the iterative lcp system uses when calculation contact reaction forces , the defult is 4
NewtonSetSolverConvergenceQuality is now deprecated,
in newton 1.xx I had a closed from direct solver by that was too slow for scene with many objects
this was very good because the complened I has were about performance not about accuracy
in 2.xx I start experimentation with Iterative LCP and the open a can of worm because I start getting complains about performance and accuracy. so to go around that
I start adding functionality to set the converge rate of the clock diagonal solver,
NewtonSetSolverConvergenceQuality and that what that function is.
I kept tweaking until 3.13 but I wasn't ever satisfied with it
I kwon having an iteration solve that at the core also has an iteration solve is what I always complement all these game engine are doing, and althought I get to be very good, I ken it have to go.
so for 3.14 the block diagonal solver is exact, and the high level solve is iterative. and function
NewtonSetSolverConvergenceQuality is now deprecated. This may make large scenes a little slower
but so far I have no seen that problem.
In Any case the last commit has the three solvers, 1.xx, 2.xx and 3.14
there are not the exact versions because I fix bugs alone the way, by the are mathematically equivalent. Is some is different the can be interchange.
The result so far and by far the best quality/performance of newton I have ever seen.
The doe no apply to joint since they are always exact unless the end application set the to be sift joints.
to summarize you do no have to worry about NewtonSetSolverConvergenceQuality converger quality is
in theory machine precision, I said in theory because is I let the solve solver until machine precision error, the is become thousand of time slower because of arithmetic on denormal number is thousand of time slower. so I set the precision to 1.0e-7
What kind of integrator/solver is newton using, and how is it influenced by NewtonSetSolverModel / NewtonSetSolverConvergenceQuality?
Newton use and RK4 with a modification integration method.
The modification is the weigh factor of the derivatives, which I use 1/4, 1/4. 1/4. 1/4
instead of the normal 1/6, 1/6, 1/6, 1.3
The is not a hack the weigh coefficient are in fact arbitrary, the only requirement is that the add to 1.0, the latest are the result for a east square optimization on the coefficient, but the made the evolution far more expensive for very lethality gain in accuracy.
for a free body the integration is a predictor corrector.
these are the reason Newton is slower than the other engine, I too care about accuracy and correctness. Remarkably with all those extra stuff newton is fasten than most main stream game engines.
finally;
We value accuracy over computational time (the latter you can throw a bigger cpu at ), what would be a practical value for the number of iterations? Can we get metrics on how many iterations were needed?
you should be fine with the default value which is 4,
What doesNewtonSetNumberOfSubsteps, or rather the substeps, do?
That what I want to suggest you look at, instead of take control of the number of passes and doing
you can use that function to subsample the time step.
that what I use in the demoes.
I set the update at 60.0f
and I set the number of substep to 2, this esi the equivalent fo
calling Newton Update (1.0 / 120.0) twice
in your case say you want to simulate at 300, on initialization you call
doesNewtonSetNumberOfSubsteps (5)
and in the update loop you call
NewtonUdate (1/60)
you may say is the same, but it really insect because ether are internal states that are preserve across calls. specially when running the engine asynchronous or when doing CCD.
I hope this was clear.