Are there further information about the console physics parameters?


are there further information available for the three parameters of the console concerning the physics?:


Are there any limits for these variables (beside the int and float ranges)?
And what exactly do the max_substeps and the solver_iterations variable do?

I tested it today in my program wired with an Advantech Driver, but there were no influences.

Thank you so lot.

Hi @LilSch,

The physics engine in Factory IO advances the simulation at fixed, same-sized time intervals.
Using a fixed (instead of variable) timestep improves the quality of the simulation by making it more stable, and also more deterministic, which results in less unpredictable behaviour.

The fixed time interval for advancing the physics simulation is exposed in the physics.timestep console command, which defaults to 1/120s.
Shorter time intervals between physics steps will also improve the stability of the simulation.

When a graphical frame advances, Factory IO must execute a number of physics steps to simulate the time passed between frames.
However, the time between graphical frames can vary a lot: different computers have different capabilities, or the computer might be busy doing something else.
As your frames-per-second (FPS) get lower, this time interval grows, and a larger number of physics steps must be executed.
The increate in the number of steps to calculate in a frame can make the frame times even longer, therefore “dooming” the simulation.
So, there is a limit to the maximum number of steps per frame to avoid this doomed situation, exposed by the physics.max_substeps console command.
When the maximum number of substeps is reached, the simulation will “slow down” as the entire timeframe will not be simulated.

Contacts between objects (such as objects standing on top of others, like a box on a pallet or conveyor) are modeled as penetration constraints in the physics engine.
These constraints are solved with an iterative algorithm which will not produce exact results.
physics.solver_iterations commands the number of iterations for the contact solving algorithm.
Increasing the number of iterations will make contacts less ‘springy’ as collisions between objects will be solved with more accuracy. This improvement comes at the cost of performance.

The limits for these parameters are as follows:
physics.timestep is clamped between 1/360s and 1s.
physics.max_substeps has a minimum value of 1.
physics.solver_iterations has no limits.

Information about how to change the parameters can be found in the Console section of the manual.

1 Like