[ODE] trimesh performance
Ian McMeans
imcmeans at telus.net
Sun Mar 6 12:37:30 MST 2005
Oh, I hadn't been doing that. However, adding the cache clearing doesn't
seem to fix things (I'm doing it once a frame for now).
Okay, I just tried using two different meshes in place of the one I was
previously using - one is a simple box (about 10 verts), and it
performed very well. The second mesh is decently complex (it's a 68kb
3ds file), and it also performs quite well.
Any idea what would be wrong with my "problem mesh"? It didn't seem to
have a specific region of the mesh that was problematic - when it was
resting upside down, or on its side, or right-side-up, things were
equally slow.
Thanks for your suggestion, though - ODE is back down to ~6
milliseconds, which is nice. I'll upload the problematic mesh somewhere
if people want it for testing (to see if they get the same problems I do
- it's only 29kb). I could also share (parts of) my program.
Ian
Megan Fox wrote:
>If I understand correctly, you're using a trimesh with a body (vs your
>previous experience with terrain, which would not have a body).
>Wouldn't this be a case where the trimesh's temporal coherence cache
>would be active? Have you tried clearing it periodically?
>
>-Megan Fox
>
>
>
>>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.
>>_______________________________________________
>>ODE mailing list
>>ODE at q12.org
>>http://q12.org/mailman/listinfo/ode
>>
>>
>>
>
>
>
More information about the ODE
mailing list