[ODE] Need performance tips
Frederic Ferland
fref at videotron.ca
Tue Apr 22 08:28:02 2003
Hi!
I have written a small test system for learning about ODE. I have a flat
terrain represented by a box geom (until I add support for ODE planes) and
20 crates also represented by box geoms. All the crates start life in the
air and fall on the ground in a pile.
The movement and performance is fine while the boxes are falling, but when
all the crates are on the ground or on another crate, performance suffers
quite a bit. I know that this is happening because a lot of contact joints
are being generated when the boxes are on the ground, but I don't really
know how to improve the system.
So my question is: what can I do about it? I though about detecting that
the crates have stopped moving (how can this be detected in the first
place?) and stop generating contact joints for crates that are no longer
moving. However, I think this will make the boxes fall through the ground,
which is not really what I want :). If I disable the crate bodies so that
they don't fall through the ground, they will no longer interact with
whatever might happen in the world (say another box falling in the pile for
some reason.) So what are my options? Surely there's something that can
be done about this? How do games that deal with large worlds handle such
problems?
Thanks for any help you can give!
______________________________________________________________
Frederic Ferland <fref@bigfoot.com>