25-08-2025, 02:36 PM
(This post was last modified: 25-08-2025, 02:51 PM by josemendez.)
(25-08-2025, 02:11 PM)Qriva0 Wrote: What is better: 5 substeps and 10 iterations, or 1 substep and 50 iterations? I guess the first one should be better,
The best possible configuration in terms of convergence speed/quality is N substeps, and only 1 iteration. This is what the article I shared demonstrates:
Quote:We make the surprising observation that performing a single large time step with n constraint solver iterations is less effective than computing n smaller time steps, each with a single constraint solver iteration.
In other words: it's costlier to correct constraint error caused by using large time steps (which is what iterations do) than to keep the error from growing in the first place, by using a smaller timestep (more substeps). To correct the error caused by using only 1 substep instead of say, 4 substeps, you need a lot more than 4 iterations.
(25-08-2025, 02:11 PM)Qriva0 Wrote: but at the same time it increases the cost of all other aspects of simulation. However let's assume, there is only one actor and I want to get as good result as possible.
"All other aspects" is just integration - moving state forward in time, which is dirt cheap. Because of this the cost of substeps = N, iterations = 1 and substeps = 1, iterations = N is basically the same. Collision detection is only performed once per full step, and the resulting contact constraints reused for all substeps/iterations.
For this reason, the manual recommends to start by setting all iteration counts to 1 and adjusting substeps first.
Also note that using more substeps dissipates a lot less energy than using iterations and will result in more lively simulations, so what substeps/iterations combination to use can also be a bit of a stylistic choice.
kind regards,