[ODE] trimesh performance

Ian McMeans imcmeans at telus.net
Sun Mar 6 00:30:38 MST 2005


I'm having some troubles with trimesh performance. I have a network game 
where players control trimesh objects, and the performance is pretty 
terrible when trimeshes have resting contacts (ODE takes 100ms to do the 
physics every frame). When I use a box placeholder, it runs quite fast, 
even with resting contacts (the ODE simulation takes about 0.6 
milliseconds of each frame).

Now, I'm not totally sure what's causing this terrible performance. In 
my test situation, all that happens is a trimesh falls onto a box and 
rests there, it's not even trimesh-trimesh collision. However, when I 
make the trimesh fly (so it's no longer in resting contact), then ODE 
takes barely any time at all. So it seems that this has got something to 
do with trimesh collisions. I'm pretty sure the problem isn't related to 
networking, because the networking code almost never teleports objects, 
and even when I make the game 100% locally simulated, it doesn't improve 
performance.

Does anyone have any idea what would be causing such poor performance? 
It doesn't seem to be fixed by changing the number of max contacts in 
the collision callback. The trimesh is very small, only ~60 tris. Its 
size in-game is about 0.1 units. In other games, I've used trimesh 
terrain and it worked wonderfully, and the terrain had thousands of 
triangles.


More information about the ODE mailing list