Substeps & Iterations + Retargeting

Hey everyone, so I was asking Marcus, what exactly is the difference between Substeps and Iterations in the Solver and how do they change how the Solver works?

I also have another question about retargeting to IK Controls, is it possible for 1 single marker to retarget its translation values (say for IK Foot) to 1 controller and retarget rotation values to a different controller? (Basically this rig is set-up in such a way that the two are separate for its IK limbs)

EDIT: I figured out how I can transfer rotation values from the IK Rotation controller to the general IK Hand controller. This rig is a nightmare sometimes lol

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. :blush:

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. :smiling_face_with_three_hearts:

1 Like

That’s okay I can make another post about the IK/FK thing :sweat_smile:

So in practice, does this mean more Substeps will give me a better Simulation considering the limits I set up for my markers?

Generally the choice of Substeps and Iterations is a performance/quality tradeoff. More substeps means more quality, at the cost of performance.