[ODE] ODE is massively slow
David McClurg
dmcclurg at pandemicstudios.com.au
Thu Jan 30 16:46:33 2003
put all your terrain geoms (the 16 boxes) in a geom "group" so they do not self-collide.
-----Original Message-----
From: Chris Brodie [mailto:Chris.Brodie@macquarie.com]
Sent: Friday, 31 January 2003 9:20 AM
To: 'ode@q12.org'
Subject: [ODE] ODE is massively slow
...now that I have your attention, on to the details.
I've just finished integrating ODE in to my engine. I have a number of problems, the most obvious is that with a simple test case of 16 static geomBox's. My ingame profiling system tells me that 60% of my games time is spent on :
dSpaceCollide(m_Space, 0, &ProximityTest);
Of that 60% the proximity test measures 16%. The proximity test is essentially just what we have in the BuggyTest. My system is a 1.2g Celeron, 384mb 133 ram with a GF2. My build was debug running a release ODE.lib.
I have a terrain, as a simple test case, I decided to just place a geombox around each one and tumble a handful of cubes down the hill. Very primitive test. I'm not using any triangle collider at all yet. The terrain consists of 4 * 4 boxes of varying heights based on the terrain patch's extents. Therefore each box shares sides with other boxes. I didn't get as far as adding the dynamics objects.
Now since all objects are associated with the default space (0) I would asume that no collisions would be detected, but I get 136 calls to proximity test per second with an step rate of 0.05 (20fps).
The docs say:
"In other words, how can you create a body that doesn't move, but that interacts with other bodies? The answer is to create a geom only, without the corresponding rigid body object."
So to create my box's all I call is :
Terrain.cpp
NewTile->Geom = dCreateBox(CDynamics::GetInstance().GetSpace(), NewTile->BoundingBox.GetWidth(), NewTile->BoundingBox.GetHeight(), NewTile->BoundingBox.GetDepth());
I've check the coordinates, they don't overlap or anything, but as I see it, it's a static object and should be free from collision tests. I use a hash space created as follows:
Dynamics.cpp
m_Space = dHashSpaceCreate(0);
dHashSpaceSetLevels (m_Space, 2, 16);
Any idea's on why this is happening? From whats I've noticed inserting a static object in the world appears to produce the same amount of collision work as a geom linked to a body.
Many thanks,
Chris
NOTICE
This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank.
_______________________________________________
ODE mailing list
ODE@q12.org
http://q12.org/mailman/listinfo/ode