[ODE] Selective Time step & Collision Enery Loss
nlin at nlin.net
nlin at nlin.net
Fri Dec 5 11:25:33 MST 2003
On Thu Dec 4 02:46:19 MST 2003, Manohar B.S (sciphilog at yahoo.com) wrote:
> The PART of the simulated world which is influenced
> only by OO should have a time step of over 1000 fps.
> That is, the collection of bodies which are touching &
> interacting with OO should be updated at a faster
> rate.
> Where do I have to tweak in??????
I have not implemented this, but I have thought about the problem. I would
implement this as follows:
1. Define a conservative bounding box around your object OO which encompasses
the entire _range_ of motion and _range_ of influence of OO. This may need
to be updated per frame (e.g. if OO is moving)
2. ODE divides processing of rigid bodies into "islands", connected groups
of bodies. Each island can be simulated separately (see ode.cpp) For all
islands touching your bbox in step (1), simulate with higher frequency
(including collision detection). For all other islands, simulate
with lower frequency. Make sure that the total simulation times for
high-frequency and low-frequency processing are the same, so that the
high-frequency and low-frequency islands stay "in sync".
In this way, any island which even partially touches OO's region of influence
gets simulated at higher frequency (and thus higher accuracy). Only islands
that are completely outside of OO's region of influence get simulated at lower
frequency. You need to use a bbox as mentioned in (1) because you can't just
simulate OO's island at higher frequency, since this ignores collision
processing, allowing low-frequency objects to collide with the
high-frequency OO island (which would lead to inaccuracy, likely defeating
the entire purpose of simulating OO at high speed). Thus you need to use
a bounding volume of some kind so that any island which _might_ collide
with OO in the next timestep also gets simulated at higher frequency,
ensuring that when a separate island actually does finally touch OO,
its collision time will have been computed at the higher, more accurate
simulation frequency.
This should theoretically work. If you can implement this in a general
way, this could be a useful addition to the ODE core.
-Norman
More information about the ODE
mailing list