[ODE] Performance question
STenyaK (Bruno Gonzalez)
stenyak at gmx.net
Thu Sep 14 18:59:13 MST 2006
Doh... i answer myself... It's my fault. It's taken me 1 year to realize
what the problem is.
It looks like i was not properly handling collisions between suspension
rods. I've removed their geoms and framerates are back to normal.
This makes sense, since the rods collide with uprights by default, so a
bug in my collision callback could be allowing those collisions joints to
So i'll leave those geoms uncreated, and then when the suspension gets
damage, joints break and some rod detaches from the vehicle, i'll recreate
the collision geom and everything should behave as supposed (rods falling
to the ground and rolling, then colliding with other incoming vehicles or
Ps.: gussimulator, yes, i speak spanish, and i'm spanish :)
On Fri, 15 Sep 2006 03:15:03 +0200, STenyaK (Bruno Gonzalez)
<stenyak at gmx.net> wrote:
> On Fri, 15 Sep 2006 02:52:23 +0200, Jon Watte (ODE)
> <hplus-ode at mindcontrol.org> wrote:
>> Is this in release mode or debug mode?
> Debug mode.
>> Are you using floats or doubles?
>> How big is your step size?
> Doesn't matter for this problem (the problem happens indepndently of step
> size), but i'm currently running physics at 300Hz.
>> Do you empty your contact joint group every step? (doesn't hurt to ask)
>> On what kind of client hardware?
> Amd Sempron 2Ghz + 512kb L2, 512megs of ram (no swapping is needed at any
> time during simulation), on a gentoo linux 2.6.16 or so. No other apps
> taking the cpu. It's been reported to also happen in windowsXP + msvc,
> to also be solved by replacing all suspension physics with hinge2 joints.
>> If you run a profiler on the program while it's getting 1-4 fps, where
>> does it say you're spending your time?
> Running a profiler takes too much cpu time (simulation can't run
> so graphics are not rendered anymore, and there are more side effects),
> i profile the important parts myself, using SDL timers (which give a
> precission of msecs). The slowdown is definitely due to ODE (which takes
> up to 95% of total app time, but usually 40-50%), but the timing is too
> little precise to know if the problem is collision detection or the
> (i get an average of 50% time of the sum spent on each of them, so i
> what to think about it).
Site: http://1ksurvivor.homeip.net <1kSurvivor>
Mail: stenyak AT gmail DOT net
More information about the ODE