JML
03-24-2002, 12:48 AM
Hi all,
When calculating animation-paths I use a numerical differential equation solver (ODE). Currently I'm trying to simulate particles, springs and other physics related stuff in real time.
The solver produces results in varying intervals, depending on the required accuracy and the complexity of the used equations.
How can I post-process these results efficiently so I get a nice sequence of values equally spaced in time.
Example:
ODE results at t=0.0, 0.5, 0.6, 0.63, 0.66, 0.7, 0.9, ...
should be converted to
Animation frames at t=0.0, 0.2, 0.4, 0.6, 0.8, 1.0 etc.
I'm trying to build some code from scratch, but I think I really need some more info on how to do this kind of animation stuff. Pointers would be welcome.
The thing I'm currently stuck with is this: how do I keep the input (ODE) and output (OpenGL frames) reasonably synchronised. I do not want the ODE running too far ahead of the actual rendering, but far enough so that when complex calculations start to occur in the ODE the buffer gets empty...
Other issues are:
- how to decide when and what results should be skipped to re-synchronise if the buffer gets overloaded
- what kind of storage mechanism is efficient for this task
Many thanks in advance.
Jean-Marc.
When calculating animation-paths I use a numerical differential equation solver (ODE). Currently I'm trying to simulate particles, springs and other physics related stuff in real time.
The solver produces results in varying intervals, depending on the required accuracy and the complexity of the used equations.
How can I post-process these results efficiently so I get a nice sequence of values equally spaced in time.
Example:
ODE results at t=0.0, 0.5, 0.6, 0.63, 0.66, 0.7, 0.9, ...
should be converted to
Animation frames at t=0.0, 0.2, 0.4, 0.6, 0.8, 1.0 etc.
I'm trying to build some code from scratch, but I think I really need some more info on how to do this kind of animation stuff. Pointers would be welcome.
The thing I'm currently stuck with is this: how do I keep the input (ODE) and output (OpenGL frames) reasonably synchronised. I do not want the ODE running too far ahead of the actual rendering, but far enough so that when complex calculations start to occur in the ODE the buffer gets empty...
Other issues are:
- how to decide when and what results should be skipped to re-synchronise if the buffer gets overloaded
- what kind of storage mechanism is efficient for this task
Many thanks in advance.
Jean-Marc.