Thanks for asking this, I’ve been meaning to elaborate on this in the main documentation also.
In short, Substeps
are “frame subdivisions”, and Iterations
is the number of times the solver tries to find a solution to a collision or constraint before giving up.
In practice, you’ll want to increase these whenever you need to use very high Stiffness
value, both for poses and limits. A default of 4
covers most cases, 8
should cover the rest and 16
is Ultra Nightmare mode and will likely start eating into your framerate.
Substeps
Sounds more complicated than it is. The simulation is running at your FPS, multiplied by this value.
FPS = 24
Substeps = 4
Simulation = 24 x 4 == 96 FPS
So to the solver, your animation is effectively running in slow-motion. Any problem, like an intersection, is much easier to solve in slow-motion, because there will be less of an intersection to deal with. The same goes for any Stiffness
value. The attribute tries to match the simulation to your animation and if there is less of a difference between the two, the easier it is to solve.
This can be good to know if your FPS is 48 or 60. You’ll need much less substeps!
Iterations
Now this one is actually complex.
In practice, you can think of there being a perfect solution to any simulation, but Ragdoll rarely finds it. It wouldn’t be worth it. It gets you 99.99% of the way there, but leaves the last 0.01% behind. Why? Because performance. It can give you 99.99% of the answer for 0.01% of the effort, which is how it’s so fast!
You might wonder who even bothers with the 0.01%? That would be physicists and roboticists. They love that percentage, which is why their simulations take days instead of milliseconds (and why you can rely on the results for science).
Now the theory. Frankly, I haven’t found this knowledge particularly useful for making cool simulations. But if you’re a geek like me and want to know anyway then this is the best explanation I know. The key words being “local solver” and “iterative solver”.
Does this help? Was this what you were looking for?
To your second question, let’s keep one question per thread so as to keep the conversation focused.