[ODE] Making simulation speed independant from computer speed

Jon Watte hplus-ode at mindcontrol.org
Thu Nov 11 15:37:20 MST 2004

> Would it work if you varied the time step size every say 10 or 30 
> frames instead of every frame?  What causes the instability, is it the 
> frequency that the step size is changed or the simple act of changing 
> it?

The problem with varying the step size is that penalties that would 
come to an equilibrium with a fixed time step, won't when you vary the 
step size. For example; each time you dWorldStep() with a number 
different from what it was last time, you will introduce an impulse 
"spike" in anything that's "mostly resting" because of the way that 
gravity pushes objects into support objects.

> It would be nice if the system ran at the fastest (i.e. smoothest) pace 
> possible depending on what is happening in the simulation.  So if you 
> have a mix of more intensive and less intensive scenes, the less 
> intensive ones can benefit from the extra CPU cycles.

I find that varying the fidelity of simulation (or rendering, or 
whatever) just serves to confuse and/or aggravate the user. It's better 
to make sure the system runs as well as you need it to run under the 
maximum stress that you intend to put on it. And, because you won't put 
more stress on it than that, and it runs as good as it needs to, you 
don't need to worry about optimizing the other cases -- that'd be like 
optimizing the speed of your idle loop :-)


			/ h+

More information about the ODE mailing list