hi,
hey Ruud, i answer u about he Obb/Triangles test problem u sent me by
mail , but i don't know if you received it ?
cheers,
Sebastien TIXIER - Game Developer
Dynamics and Car Physics
http://www.eden-studios.fr
GPLRank Normal:-44.24 Monster:-124.44
LFS GTI Online 1:30:62
LFS GTI Offline (HLVC) 1:31:14
On Wed, 12 Mar 2003 16:04:00 +0100, Sebastien Tixier
<stixier@wanadoo[NO_SPAM].fr> wrote:
>
>hi,
>
>hey Ruud, i answer u about he Obb/Triangles test problem u sent me by
>mail , but i don't know if you received it ?
Yes, thanks for that. :)
I didn't really carry on too much with my Tri-OBB, but in hindsight it
might work better than I thought it would, since there were some
problems with the way contacts were actually used (soft penetration
contact lead to situations where the car can hit a fence, and it looks
like rubber, holding the car stuck to its hit point on the fence).
I know am trying a more easily graspable ellipsoid, which seems more
or less ok, and easier to generate contacts for (just 1 per triangle
is needed it seems). I reduce the ellipsoid/triangle to a
unitshpere/triangle situation. Lots of zeroes and 1's that you end up
with in that case, which makes optimizing possible.
I did yesterdaynight investigate more into ODE's tricollider package.
Couldn't get Opcode to compile AT ALL though (an understatement), but
did look at the tricollider code, and it turned out the latest
versions have tri-box and tri-sphere contact generation functions.
Now, the original sphere contact generation functions were however
quite close to what I am doing. :)
Also tried VR3 yesterday to look a bit at how it's interacting with
the environment. Looks solid. :)
Anyway, car-track interaction finally seems to have improved a lot by
now though; the rubbery thing seems gone and I can slide along the
road side fences a bit. Although it was 4:30am yesterday when I saw
that, so it might have just been a dream. ;-)
I might take you up on the Tri-OBB again later though. First I have to
regain energy, do something else, fix some other bugs. You have to
take care of the brain every now & then. ;)
Cheers,
Ruud
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/
On Thu, 13 Mar 2003 14:25:59 GMT, [email hidden] (Ruud
van Gaal) wrote:
hi,
>Yes, thanks for that. :)
u'r welcome. :)
>I didn't really carry on too much with my Tri-OBB, but in hindsight it[SNIP]
>quite close to what I am doing. :)
That's lot of work done :)
>Also tried VR3 yesterday to look a bit at how it's interacting with
>the environment. Looks solid. :)
Thanks but sometimes theres weird behaviour especialy, if the front of
the car touch the ground at the same time with a big compression, then
, sometimes the front rise up in the air :(
Hopefully i corrected this
Lots of stuff have be improved in my new libraries now :) now i'm
using quaternion and a more robust collision responses algorithm.
i also added load sensitivty on tires and a system to desynchronised
objects time integration to collision test. i mean, my collision test
can be tested at T hz when dynamics is refreshed at N x T hz.
As collisions test are way more cpu demanding i could improved my
dynamics without to much cpu cust.
next step is to implement constraint ( contact,joint,etc.. ) in my
rigid body system, seems to be a big stuff !!!
>Anyway, car-track interaction finally seems to have improved a lot by
>now though; the rubbery thing seems gone and I can slide along the
>road side fences a bit. Although it was 4:30am yesterday when I saw
>that, so it might have just been a dream. ;-)
hehehehe :D, i often debug my code when dreaming, that's annoying
because, i have to wake up and write the solution on paper before
falling asleep again :D
>I might take you up on the Tri-OBB again later though. First I have to
>regain energy, do something else, fix some other bugs. You have to
>take care of the brain every now & then. ;)
>Cheers,
ok, no problem.
Cheers,
Sebastien TIXIER - Game Developer
Dynamics and Car Physics
http://www.eden-studios.fr
GPLRank Normal:-44.24 Monster:-124.44
LFS GTI Online 1:30:62
LFS GTI Offline (HLVC) 1:31:14
On Thu, 13 Mar 2003 17:29:27 +0100, Sebastien Tixier
<stixier@wanadoo[NO_SPAM].fr> wrote:
Indeed, and a lot of sleep lost. ;-)
>>Also tried VR3 yesterday to look a bit at how it's interacting with
>>the environment. Looks solid. :)
>
>Thanks but sometimes theres weird behaviour especialy, if the front of
>the car touch the ground at the same time with a big compression, then
>, sometimes the front rise up in the air :(
Hm, too many forces adding up perhaps. I'm curious how the F1 cars
will be doing once I'm done.
(btw those seem to have separate springs for roll and pitch; hm)
>Lots of stuff have be improved in my new libraries now :) now i'm
>using quaternion and a more robust collision responses algorithm.
>i also added load sensitivty on tires and a system to desynchronised
>objects time integration to collision test. i mean, my collision test
>can be tested at T hz when dynamics is refreshed at N x T hz.
Sounds good. In my case that would require state keeping of N
integration steps (or perhaps just 1 actually). Might be expensive,
looking at all the state variables. On the other hand, just letting
things slide, and just storing position/orientation/velocity of the
rigid bodies involved might just do the trick.
>As collisions test are way more cpu demanding i could improved my
>dynamics without to much cpu cust.
>next step is to implement constraint ( contact,joint,etc.. ) in my
>rigid body system, seems to be a big stuff !!!
It is. I'd take a look at ODE's source code. That does LCP. Someone
from Ubisoft has created an iterative solver, which probably is needed
for PS2 work, since ODE still generates big matrices when you get a
bunch of collisions (fortunately you're doing Rally games, lol).
I believe the programmer would make the algorithm available in the
oncoming time.
All this LCP stuff is really not my cup of tea. I'm more into the
graphics and gameplay really...
...
>hehehehe :D, i often debug my code when dreaming, that's annoying
>because, i have to wake up and write the solution on paper before
>falling asleep again :D
Fortunately I don't have that, although I do have a laptop and
paper/pencil around to do some final drawings and ideas before I go to
sleep. But the best ideas come in the mornings.
Off to test the new collision detection again...
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/
Quoted text (8 lines)
>On Thu, 13 Mar 2003 14:25:59 GMT, [email hidden] (Ruud >van Gaal) wrote: > >>I didn't really carry on too much with my Tri-OBB, but in hindsight it >[SNIP] >>quite close to what I am doing. :) > >That's lot of work done :)>>Thanks but sometimes theres weird behaviour especialy, if the front of
>>the car touch the ground at the same time with a big compression, then
>>, sometimes the front rise up in the air :(
>
>Hm, too many forces adding up perhaps.
In fact the problem was that the collision respones didn't take
account of the spring/damper forces . Now, my collision responses
algorithm is called after the computation of the external forces so i
can take account of them. I have no more the problem.
Well, in fact the new project we got 16 cars, that's, for sure,
involved big matrices for the LCP solver :(
>Off to test the new collision detection again...
Have Good tests :)
Sebastien TIXIER - Game Developer
Dynamics and Car Physics
http://www.eden-studios.fr
GPLRank Normal:-44.24 Monster:-124.44
LFS GTI Online 1:30:62
LFS GTI Offline (HLVC) 1:31:14
Quoted text (13 lines)
>I'm curious how the F1 cars >will be doing once I'm done. >(btw those seem to have separate springs for roll and pitch; hm) >>As collisions test are way more cpu demanding i could improved my >>dynamics without to much cpu cust. >>next step is to implement constraint ( contact,joint,etc.. ) in my >>rigid body system, seems to be a big stuff !!! > >It is. I'd take a look at ODE's source code. That does LCP. Someone >from Ubisoft has created an iterative solver, which probably is needed >for PS2 work, since ODE still generates big matrices when you get a >bunch of collisions (fortunately you're doing Rally games, lol).On Fri, 14 Mar 2003 09:56:03 +0100, Sebastien Tixier
<stixier@wanadoo[NO_SPAM].fr> wrote:
>>Hm, too many forces adding up perhaps.
>
>In fact the problem was that the collision respones didn't take
>account of the spring/damper forces . Now, my collision responses
>algorithm is called after the computation of the external forces so i
>can take account of them. I have no more the problem.
Ah, I see. Hm, I might have the same problems then. The contact
constraint forces when colliding do look at the point velocity (in
ODE), but the spring/damper forces are still added as usual.
Interesting, 16 cars. Suddenly car LOD becomes important.
Take care when multiple cars collide; the matrix grows big. Might be
something to step-collide each car by car; the old divide and conquer.
Here I mean if your collision frequency is 3x the physics freq you do
something like:
nCars=4
curCar=0
while(1)
{
stepPhysics();
stepCollide(playerCar,car[curCar]);
curCar=(curCar+1)%nCars;
}
(should be less dependent on the car count, but still)
This more evenly spreads the collision detection between different
objects, so you won't get big matrices which really slow things down.
(well, I profiled Racer yesterday on my laptop; turned out 40% of the
time was spent in a single Z-buffer readpixel to determine whether the
sun was visible or not! So who freaking cares about another physics
step, lol, couldn't find any of that in the top 10, at 500Hz
physics/CD, it was all graphics).
>Have Good tests :)
Thanks. Seems to work well! Racer v0.5.0 final is expected within a
week (careful with those comments, Ruud!). ;-)
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/
Quoted text (7 lines)
>>It is. I'd take a look at ODE's source code. That does LCP. Someone >>from Ubisoft has created an iterative solver, which probably is needed >>for PS2 work, since ODE still generates big matrices when you get a >>bunch of collisions (fortunately you're doing Rally games, lol). > >Well, in fact the new project we got 16 cars, that's, for sure, >involved big matrices for the LCP solver :(Quoted text (8 lines)
>>In fact the problem was that the collision respones didn't take >>account of the spring/damper forces . Now, my collision responses >>algorithm is called after the computation of the external forces so i >>can take account of them. I have no more the problem. > >Ah, I see. Hm, I might have the same problems then. The contact >constraint forces when colliding do look at the point velocity (in >ODE), but the spring/damper forces are still added as usual.Quoted text (7 lines)
>This more evenly spreads the collision detection between different >objects, so you won't get big matrices which really slow things down. >(well, I profiled Racer yesterday on my laptop; turned out 40% of the >time was spent in a single Z-buffer readpixel to determine whether the >sun was visible or not! So who freaking cares about another physics >step, lol, couldn't find any of that in the top 10, at 500Hz >physics/CD, it was all graphics).On Mon, 17 Mar 2003 09:49:26 +0100, Sebastien Tixier
<stixier@wanadoo[NO_SPAM].fr> wrote:
...
>>Ah, I see. Hm, I might have the same problems then. The contact
>>constraint forces when colliding do look at the point velocity (in
>>ODE), but the spring/damper forces are still added as usual.
>
>That was exactly the problem :)
Aha, so if an intersection is found, I might turn off all the other
forces for that step. Might be ok.
Yes, that was the intent. Although I might have written it poorly, I
don't know for sure anymore. But even so, if your physics run at
100Hz, you can still have 100Hz collision detection, BUT only check a
subset of all the collidable objects during each collision detection
function call. This would make CD faster, AND give smaller matrices
when you do find a collision.
The only requirement for this is that penetrations ARE allowed (most
Magic Software functions more or less silently assume no penetrations,
so the intersection functions don't work for my sim).
...
>Well, on PS2, graphics are VERY fast, and CPU not, so collision and
>physics is what it take the more CPU. So i can't have 500hz, collision
>run at 50hz and physics at 100hz. So i prefer had to have robust and
>stable collisions reponses alogrithm, that's why i'll try to implement
>a constraint rigid body system.
ODE allows penetrations, which is a requirement if you run CD at a
lower frequency than physics. You might want to take a look at its ERP
(Error Reduction Parameter) and CFM (Constraint Force Mixing)
variables on how it is crucial to keep constraints from exploding.
Cheers,
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/
Quoted text (7 lines)
>>Interesting, 16 cars. Suddenly car LOD becomes important. >>Take care when multiple cars collide; the matrix grows big. Might be >>something to step-collide each car by car; the old divide and conquer. >>Here I mean if your collision frequency is 3x the physics freq you do > >Well, i meant the opposite, physics frequency is 3x collision >frequency!>>That was exactly the problem :)
>
>Aha, so if an intersection is found, I might turn off all the other
>forces for that step. Might be ok.
Well, i'm not doing that. When computing collision response force, i
take care of external forces. For exemple if my car touch the ground
from 1 contact say front/left, i compute the external forces at this
contact from the external forces. And i reduce/increase the collision
response of that value depending of force direction. If there's more
contact points, i compute the average of external forces for each
contact, that's not an exact solution, but its work enough for
car/'non moving stuff' contact.
>ODE allows penetrations, which is a requirement if you run CD at a
>lower frequency than physics. You might want to take a look at its ERP
>(Error Reduction Parameter) and CFM (Constraint Force Mixing)
>variables on how it is crucial to keep constraints from exploding.
hmmm... this ODE thing seems interesting, where can i found a paper
about that ?
cheers,
Sebastien TIXIER - Game Developer
Dynamics and Car Physics
http://www.eden-studios.fr
GPLRank Normal:-44.24 Monster:-124.44
LFS GTI Online 1:30:62
LFS GTI Offline (HLVC) 1:31:14
On Tue, 18 Mar 2003 08:45:03 +0100, Sebastien Tixier
<stixier@wanadoo[NO_SPAM].fr> wrote:
Sounds good enough. :) As long as you're hitting the ground anyway, a
collision response quickly looks ok-ish.
It's for download at: http://opende.sourceforge.net/
Latest version is v0.035 but don't let the low number fool you.
The documentation describes a bit on how it works. Has LCP solvers and
all that. The docs also explain CFM and ERP.
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/


































