[ODE] CFM and timesteps

amundbørsand amund at c2i.net
Wed Mar 12 11:33:02 2003


"gl" <gl@ntlworld.com> skreiv:

> The best way to run ODE in real-time is to use a fixed timestep, and simply
> execute it often enough to 'catch up' with the amount of time passed since
> the last frame.  Using variable timesteps is likely contributing to your
> problems.

Why? I see no problems with my simulation. I've inserted a maximum
timestep, in case something freezes for a while, which multitasking
operating systems sometimes do, to keep ODE from crashing or doing
strange things, I guess that could happen if timesteps suddenly get too
big. 

Have you thought of how complicated fixed timesteps would be, and how
inefficient it is to run the physics engine for several times per frame?
Imagine the fps rate changing between 15 and 100 fps, for instance.
Think about all the (time) aliasing problems you'll get, and how jerky
everything would look! Except if you ran the physics many times per
frame, like 10-20 or something, but that wouldn't exactly be very
efficient.

Why should this cause any problems? I've noticed you (all of you)
stressing this, but why? Except for CFM and ERP, if ODE is properly
written physics-wise (and it certainly is as far as I can see), and
except for the possibility of colliding objects travelling through
eachother, there really shouldn't be any problems. Besides, the time
steps will never be bigger than 1/10 sec anyway.