Discussion:
ODE collision problem with soya 14
Jacques Rebourcier
2010-12-25 11:09:41 UTC
Permalink
Hi all (and happy hristmas !) ,

I decided to resume the dvpt of a 3 years old bugged home made game (need to
fix some physics issues).

So I installed soya and tutorial on my mandriva (2010.0 and also tried
2010.1).

But I can't manage to get ode working properly (for my game and tutorial too),
I get this fatal error each time a collision occurs :
[
ODE INTERNAL ERROR 2: Please call ODE initialization (dInitODE() or similar)
before using the library in dCollide()
]

Seems to me this is a compatibility issue between soya 14 and libode 11.1 :
libode1-0.11.1-1mdv2010.0

See this on soya web site for the new version (15rc1) :
[
* January 2009 : Soya3D 0.15rc1 * ODE 10 compatibility (required) *
]

Could someone confirm this version will fix my pb ?

Could someone help me to find mandriva rpm for soya15rc1 ? (only found 14
version on official media -including cooker, is jiba gone to another distro ?)
or should I install from sources ?

Thanks
Jacques
Jacques Rebourcier
2010-12-26 18:54:18 UTC
Permalink
Post by Jacques Rebourcier
Hi all (and happy hristmas !) ,
I decided to resume the dvpt of a 3 years old bugged home made game (need
to fix some physics issues).
So I installed soya and tutorial on my mandriva (2010.0 and also tried
2010.1).
But I can't manage to get ode working properly (for my game and tutorial
[
ODE INTERNAL ERROR 2: Please call ODE initialization (dInitODE() or
similar) before using the library in dCollide()
]
libode1-0.11.1-1mdv2010.0
[
* January 2009 : Soya3D 0.15rc1 * ODE 10 compatibility (required) *
]
Could someone confirm this version will fix my pb ?
Could someone help me to find mandriva rpm for soya15rc1 ? (only found 14
version on official media -including cooker, is jiba gone to another distro
?) or should I install from sources ?
Thanks
Jacques
_______________________________________________
Soya-user mailing list
https://mail.gna.org/listinfo/soya-user
Hi,

Effectively, a build fresh of 15rc1 fixed the ode problem.

Still have issues with my simulation stability (shperes interpenetrating
terrain, popping, dancing or traversing), depending of parameters.

Is there a documentation of ode integration, and where to tune parameters (as
for example simualtion stepping (in regards to round duration) ?

Best regards
Jacques Rebourcier
2010-12-29 17:51:22 UTC
Permalink
Hi all,

Tested this feature, seems to do nothing for linear velocity threshold :

auto_disable_linear_threshold

NB : Other threshold (auto_disable_angular_threshold) works fine.

Best Regards

Jacques
Jacques Rebourcier
2010-12-31 13:35:28 UTC
Permalink
Hi all,

Nobody here ? Every one disconnected for christmas holliday season ?

I am struggling with my simulation game. This is a marble racing game that
looks like ode-collision-8-terrain.py tutorial.

Actually, if you toggle this turial in wireframe mode, you will see some of my
issues (let simulation lasts a while).

1) Slow :
The simulation is too slow, as in a planet with low gravity. I noticed ode
stepsize = soya round_duration. Effectively, reducing round_duration under
0.005 is better but still not perfect (seems to be less stable). I suspect
that visting world during each round (begin, advance, and end) make a latency
between ode stepping, and so fluidity/realism of simulation is bounded by this
round visiting mechanism. Correct or not ?

2) Jiterring :
Looks like the ball is some time "bouncy and dancing", small pops with small
linear and angular velocity. Occurs at low energy (when balls are very slow),
and frequency of contact is very high. Seems quite random (more "bouncy" when
CFM is higher).

3) Violent popping :
Can occurs at medium-low energy, when rolling, receiving a very stong vertical
impulse (generally angular velocity is low).
Other case is terrain collision at medium-high energy when angle with contact
normal is in the midle (neither horizontal, nor vertical collision).
Tried to fix with "contact_max_correcting_velocity", but doesn't work as I
expected...

4) Falling :
Some time balls are falling (rare) with no apparent reason.
I noticed that when stepsize is longer and whith certain size ratio betwen
sphere and terrain surfaces, it is more frequent.

=> All these are show stopper for my game idea (except 1) that could be Ok). I
tried several stability tricks from ode documentation, some seems to work a
little, some time i didn't notice any effect (as if ode binding was "silently"
broken), but never achieved something really stable.
=> I don't know how to debug/help, we are in Pyrex and ode binding black
magic.
=> I suspect matrix random computation insatbility (error margin), or Terrain
Collider weird integration with ode that could be at the heart of problem, but
the code seems to complicated for me.
=> Could someone help me ?

Best Regards
Jacques
Jacques Rebourcier
2010-12-31 16:23:13 UTC
Permalink
Post by Jacques Rebourcier
Hi all,
Nobody here ? Every one disconnected for christmas holliday season ?
I am struggling with my simulation game. This is a marble racing game that
looks like ode-collision-8-terrain.py tutorial.
Actually, if you toggle this turial in wireframe mode, you will see some of
my issues (let simulation lasts a while).
The simulation is too slow, as in a planet with low gravity. I noticed ode
stepsize = soya round_duration. Effectively, reducing round_duration under
0.005 is better but still not perfect (seems to be less stable). I suspect
that visting world during each round (begin, advance, and end) make a
latency between ode stepping, and so fluidity/realism of simulation is
bounded by this round visiting mechanism. Correct or not ?
Looks like the ball is some time "bouncy and dancing", small pops with
small linear and angular velocity. Occurs at low energy (when balls are
very slow), and frequency of contact is very high. Seems quite random
(more "bouncy" when CFM is higher).
Can occurs at medium-low energy, when rolling, receiving a very stong
vertical impulse (generally angular velocity is low).
Other case is terrain collision at medium-high energy when angle with
contact normal is in the midle (neither horizontal, nor vertical
collision). Tried to fix with "contact_max_correcting_velocity", but
doesn't work as I expected...
Some time balls are falling (rare) with no apparent reason.
I noticed that when stepsize is longer and whith certain size ratio betwen
sphere and terrain surfaces, it is more frequent.
=> All these are show stopper for my game idea (except 1) that could be
Ok). I tried several stability tricks from ode documentation, some seems
to work a little, some time i didn't notice any effect (as if ode binding
was "silently" broken), but never achieved something really stable.
=> I don't know how to debug/help, we are in Pyrex and ode binding black
magic.
=> I suspect matrix random computation insatbility (error margin), or
Terrain Collider weird integration with ode that could be at the heart of
problem, but the code seems to complicated for me.
=> Could someone help me ?
Best Regards
Jacques
_______________________________________________
Soya-user mailing list
https://mail.gna.org/listinfo/soya-user
Noticed that some Null vector are "Nan" rather than "0.0" in Soya causing Ode
to bug (add_froce, add torque).

Then incresasing surface contact layer more (0.2) help greatly (but still some
pb).
Jacques Rebourcier
2011-01-01 23:59:36 UTC
Permalink
Hi,

I want the same World to be seen by different camera, alternately. In fact,
this is a a turn game with several player, and each player should see the
world by its third person Camera.

Another last camera should be a fixed top view of the World, where menu is
displayed.

My question is how react soya when several camera are in the world (or in
several world)? Is soya calling every camera to render there own view
(possibly not disaplyed in a viewport)? Is there a perfromance penalty to do
so ? Or is soya able to elect one at a time, and in this case, how soya decide
which is the active camera (first found, last called) ?

Actually, I don't know if I should use only one camera and move it around, or
if I should place and move several ones, and switch display from one to
another depending of gameplay event (prefer this approach but don't know how
to switch and perfromance impact).

Thanks

Jacques
Jiba
2011-01-02 14:21:00 UTC
Permalink
Hi,
Post by Jacques Rebourcier
I want the same World to be seen by different camera, alternately. In fact,
this is a a turn game with several player, and each player should see the
world by its third person Camera.
Another last camera should be a fixed top view of the World, where menu is
displayed.
My question is how react soya when several camera are in the world (or in
several world)? Is soya calling every camera to render there own view
(possibly not disaplyed in a viewport)? Is there a perfromance penalty to do
so ? Or is soya able to elect one at a time, and in this case, how soya decide
which is the active camera (first found, last called) ?
Actually, I don't know if I should use only one camera and move it around, or
if I should place and move several ones, and switch display from one to
another depending of gameplay event (prefer this approach but don't know how
to switch and perfromance impact).
You can use more than one camera.

If you want to display several view at the same time, you need several camera. If you want to display only one view at a time, you can do as you want : either several camera, or a single camera that you move. There is no performance impact as long as only one camera is performing the rendering.

To select the camera used for rendering, you need to use the soya widget system (either soya.widget or the newer soya.gui ; see soya.gui.CameraViewport).

For your ODE-related questions, I'm sorry but I cannot help :-(

Jiba
Jacques Rebourcier
2011-01-02 18:41:35 UTC
Permalink
Post by Jiba
Hi,
Post by Jacques Rebourcier
I want the same World to be seen by different camera, alternately. In
fact, this is a a turn game with several player, and each player should
see the world by its third person Camera.
Another last camera should be a fixed top view of the World, where menu
is displayed.
My question is how react soya when several camera are in the world (or in
several world)? Is soya calling every camera to render there own view
(possibly not disaplyed in a viewport)? Is there a perfromance penalty to
do so ? Or is soya able to elect one at a time, and in this case, how
soya decide which is the active camera (first found, last called) ?
Actually, I don't know if I should use only one camera and move it
around, or if I should place and move several ones, and switch display
from one to another depending of gameplay event (prefer this approach but
don't know how to switch and perfromance impact).
You can use more than one camera.
If you want to display several view at the same time, you need several
camera. If you want to display only one view at a time, you can do as you
want : either several camera, or a single camera that you move. There is
no performance impact as long as only one camera is performing the
rendering.
To select the camera used for rendering, you need to use the soya widget
system (either soya.widget or the newer soya.gui ; see
soya.gui.CameraViewport).
For your ODE-related questions, I'm sorry but I cannot help :-(
Jiba
Hello Jiba !

Thank for your reply !

Ok, for the camera, I tried with new gui system (use one view port and call
set_camera several times), seems ok. (New gui seems really great :) )

By the way, you forgot to update online doc for some module (including ode and
new gui system).

For ode, just one question, do you see spheres falling from time to time
(toggle to wired frame help to see that) in ode terrain tutorial ? Because as
I rebuilt from source with libode 11.1, I don't know if this is coming from my
system only (incompatibility), or if this a problem everybody has ?

Best regards

Jacques
Pierre-Yves David
2011-01-03 13:29:05 UTC
Permalink
Post by Jacques Rebourcier
Nobody here ? Every one disconnected for christmas holliday season ?
Exactly I'm just back from holliday
Post by Jacques Rebourcier
I am struggling with my simulation game. This is a marble racing game that
looks like ode-collision-8-terrain.py tutorial.
Actually, if you toggle this turial in wireframe mode, you will see some of my
issues (let simulation lasts a while).
The simulation is too slow, as in a planet with low gravity. I noticed ode
stepsize = soya round_duration. Effectively, reducing round_duration under
0.005 is better but still not perfect (seems to be less stable). I suspect
that visting world during each round (begin, advance, and end) make a latency
between ode stepping, and so fluidity/realism of simulation is bounded by this
round visiting mechanism. Correct or not ?
If the ODE simulation is too slow (but that the soya rendering is fine). you
just need to change physic value of your simulation. For example increasing
mass of you object of gravity of the system. I would be possible to have a
stepsize != soya round duration but I don't think this is necessary.

If the soya simulation is too slow you need to optimise you code or to check
compilation flags used when building soya.
Post by Jacques Rebourcier
=> I suspect matrix random computation insatbility (error margin), or Terrain
Collider weird integration with ode that could be at the heart of problem, but
the code seems to complicated for me.
In another message you pointed NaN value in ODE matrix which look suspiscious.
Investigation and fix of this issue will probably fix most of this issue.

Anyway, the current terrain collider if weird and complicated. It was a "necessary"
evil when the original ode integration stuff have been written. However ODE now
provide and heighfield terrain shape that could be used in soya instead. If the
old terrain implementation is too buggy it might be a good reason to switch.
Post by Jacques Rebourcier
=> All these are show stopper for my game idea (except 1) that could be Ok). I
tried several stability tricks from ode documentation, some seems to work a
little, some time i didn't notice any effect (as if ode binding was "silently"
broken), but never achieved something really stable.
Ok, do you have a strick list of the one you tested but didn't seems to have
any effect ? Can you provide simple testcase showing the issue. (if possible
with the python's unittest framework so we can integrate them to the soya test
suite)
Post by Jacques Rebourcier
=> I don't know how to debug/help, we are in Pyrex and ode binding black
magic.
=> Could someone help me ?
I can help you. I'm the one who integrate the old ODE binding into soya
mechanism therefor I know the internal pretty well. (or at least I knew). The
main issue is that I'm currently not very available at the moment. you have
several options:

- Make clear bug report and wait for fix I could provide in the following months (can't grantee sooner).

- Ask for pointer or help on specific subject and use them to try to fix it
yourself with me as "support". I'm available using, email, irc, jabber/xmmp,
or real live meeting if you are in the Paris Area (as you seems to be french).

Thanks you for you interest in soya and I hope we'll be able to fix the annoying small issue you encounter.

Happy new Year.

--
Pierre-Yves
Jacques Rebourcier
2011-01-03 16:43:15 UTC
Permalink
Post by Pierre-Yves David
Post by Jacques Rebourcier
Nobody here ? Every one disconnected for christmas holliday season ?
Exactly I'm just back from holliday
Post by Jacques Rebourcier
I am struggling with my simulation game. This is a marble racing game
that looks like ode-collision-8-terrain.py tutorial.
Actually, if you toggle this turial in wireframe mode, you will see some
of my issues (let simulation lasts a while).
The simulation is too slow, as in a planet with low gravity. I noticed
ode stepsize = soya round_duration. Effectively, reducing round_duration
under 0.005 is better but still not perfect (seems to be less stable). I
suspect that visting world during each round (begin, advance, and end)
make a latency between ode stepping, and so fluidity/realism of
simulation is bounded by this round visiting mechanism. Correct or not ?
If the ODE simulation is too slow (but that the soya rendering is fine).
you just need to change physic value of your simulation. For example
increasing mass of you object of gravity of the system. I would be
possible to have a stepsize != soya round duration but I don't think this
is necessary.
If the soya simulation is too slow you need to optimise you code or to
check compilation flags used when building soya.
Post by Jacques Rebourcier
=> I suspect matrix random computation insatbility (error margin), or
Terrain Collider weird integration with ode that could be at the heart of
problem, but the code seems to complicated for me.
In another message you pointed NaN value in ODE matrix which look
suspiscious. Investigation and fix of this issue will probably fix most of
this issue.
Anyway, the current terrain collider if weird and complicated. It was a
"necessary" evil when the original ode integration stuff have been
written. However ODE now provide and heighfield terrain shape that could
be used in soya instead. If the old terrain implementation is too buggy it
might be a good reason to switch.
Post by Jacques Rebourcier
=> All these are show stopper for my game idea (except 1) that could be
Ok). I tried several stability tricks from ode documentation, some seems
to work a little, some time i didn't notice any effect (as if ode binding
was "silently" broken), but never achieved something really stable.
Ok, do you have a strick list of the one you tested but didn't seems to
have any effect ? Can you provide simple testcase showing the issue. (if
possible with the python's unittest framework so we can integrate them to
the soya test suite)
Post by Jacques Rebourcier
=> I don't know how to debug/help, we are in Pyrex and ode binding black
magic.
=> Could someone help me ?
I can help you. I'm the one who integrate the old ODE binding into soya
mechanism therefor I know the internal pretty well. (or at least I knew).
The main issue is that I'm currently not very available at the moment. you
- Make clear bug report and wait for fix I could provide in the following
months (can't grantee sooner).
- Ask for pointer or help on specific subject and use them to try to fix it
yourself with me as "support". I'm available using, email, irc,
jabber/xmmp, or real live meeting if you are in the Paris Area (as you
seems to be french).
Thanks you for you interest in soya and I hope we'll be able to fix the
annoying small issue you encounter.
Happy new Year.
--
Pierre-Yves
_______________________________________________
Soya-user mailing list
https://mail.gna.org/listinfo/soya-user
Hi Pierre Yves !

Hope you enjoy your vacation break, and best wishes for this new year too !

Yes, I am french (Toulouse). Do not thank me for my soya interest, it is easy
to be interested by this good game engine ;) ! It is rather me to thank you
(and jiba and other developer) for your work !

Just for introduction, this project is just for "fun" for me, my children and
my nevews (playing and doing it, so no stress). The idea is mabrle racing
game, a turn game where players shot a marble to advance their car on the
terrain track, followers can bounce on other cars to turn, or shot othre
marble to push them offtrack, I plan to use bonus or traps like Maria kart
racing, so the gameplay is between foo billard and mario kart ;) . Idea seems
promissing to me, could be also a net game... But I am a poor coder and I do
not know python very well, nor 3D concepts (used to code, but a stopped for a
while). I am pretty sure I've done some coding mistake (Its an old code -
coded with different soya version" , and I learned meanwhile coding, so it's
messy and patchy). There is something stange (random) that seems to become
worse with time, or when number of player increase. But error is "silent" (no
error message). Like something not well intialized (for example ode binding)
or drifting with time (like looping on object creation). I need to clean up or
use simplified testcase to find out, will tell you...

But some specifics things I can tell you now (if you have any idea) :

It is possible I have an incompatibility between soya (15rc1 straight compile
with setup and without Pyrex) and precomiled libode (11.1). But, this is an
old code, and I already had this pbs before (with various soya / ode
combinatory), so more probable this a soya bug for me and related to terrain
collision. All other ode tutorial or basic test but terrain seems to work !
For terrain collision, just turn renderer to wireframe (to see what hapens
behind the terrain) in the tutorial, on my system, I sometime see ball falling
or boucing abnormally, do you on yours ?

Then, throw a sphere on a terrain with auto-disable feature on. Set up
angular_velocity threshold, for example 0.1, you see ball rolling, then stop
when disabled ! Do the same thing replacing angular velocity by linera
velocity threshold (for example 0.1 or even 100, or 1000, or any velocity you
are sure you never exceeds), in my case, the sphere never stops.

Then, I tried "contact_max_correcting_velocity", idea was. Ok in case of
violent poping, the speher is ejected with a linera velocity >1000, so I
decided to set max velocity at 1000 (and even less), but the sphere continued
to pop with the same velocity, perhaps I misunderstandood the parameter ?

For the "NaN" values, it is because I use an home made "rolling" damping
(proportional to angular velocity), and another drag damping (proportional to
sqare linera velocity) ("resistance de roulement et resistance de trainée
aerodynamique" in french). And when the sphere were disabled and ask velocity
for damping computation (retrun a Vector), velocity was null, and created
damping Vector was inited with "NaN" values, which make ode crash, when I
called AddForce, or AddTorque with this vector as parameter !

And I also see, that bounce (bounciness) is not managed the same when
colliding object are regular geom, and when it is "terrain" geom (the general
attribute "bounce" is not used to preset bouncyness of contact).

Another thing i found "weird" is that you code geom.attribute=value, and if
attribute does not exists, it will silently create a new attribute (so syntax
error are not easy to find).

Ok, will do my home work and give you more prrecise inputs.

Regards
Jacques
Jacques Rebourcier
2011-01-03 17:30:02 UTC
Permalink
Post by Jacques Rebourcier
Another thing i found "weird" is that you code geom.attribute=value, and
if attribute does not exists, it will silently create a new attribute (so
syntax error are not easy to find).
I found a syntax error on a supported binding, but this is also why i found
that some ode tweaks were inoperants, because I looked at ode documentation,
and tried to set some parameters, and as not exception occured, I thought
binding was implemented but "broken", but in fact, binding simply does not
exists, but no warning is emitted.

Regards
Jacques

Loading...