[ODE] ODE in Chrome Engine
gl
gl at ntlworld.com
Wed Mar 3 16:45:32 MST 2004
That sounds like a great solution for small islands - it wouldn't work so
well in other types of apps, where lots of objects may be touching - in this
case, a single WorldStep body in a large island would still kill the sim
speed.
(thinking aloud) you could of course include thressholds (eg. <25% WorldStep
bodies per island use StepFast instead). Maybe 'MustUseWorldStep' and
'PreferWorldStep' flags would be useful?
--
gl
----- Original Message -----
From: Andrzej Zacharewicz
To: gl
Cc: ode at q12.org
Sent: Wednesday, March 03, 2004 10:49 AM
Subject: Re: [ODE] ODE in Chrome Engine
> Looks amazing. Did you end up using StepFast, and if so, were you able to
avoid the problems that just came up here?
We use a hybrid solution - I think this is good idea to use acuracy of
dWorldStep and speed of dWorldStepFast together.
This is easy:
Every body has another bool field: bStepFastEnabled.
In processIslands routine (where all islands are detected) we check if
current island is "StepfastEnabled". Then we call dInternalStepIsland or
dInternalStepIslandFast accordingly.
We turned bStepFastEnabled on for instance for road tapes and poles - and
for any other objects, for which accuracy is non important. When the car hit
a pole then until the car and the pole exists in one island both will be
simulated by standard WorldStep. But after separating (after 1-2 frames)
pole will be calculated by fast iteration method. Car has bStepFastEnabled
turned off naturally.
And another thing - we calculate every second simulation accuracy factor.
This factor depends on numer of bodies and joints. And upon that factor we
can scale number of iterations.
Of course, there will be not possibility to simulate a thousands of objects
per map (yes - Poland track have about 3600 ODEable objects). We used our
self (but very similar) auto disable and auto enable mechanism, but I can
not describe it here because of intense relation with objects representation
in our engine.
Andrew
Techland
More information about the ODE
mailing list