rec.autos.simulators

To RUUD

Sebastien Tixie

To RUUD

by Sebastien Tixie » Fri, 14 Mar 2003 00:04:00

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.racesimcentral.net/
GPLRank Normal:-44.24   Monster:-124.44
LFS GTI Online          1:30:62
LFS GTI Offline (HLVC)  1:31:14

Ruud van Ga

To RUUD

by Ruud van Ga » Fri, 14 Mar 2003 23:25:59

On Wed, 12 Mar 2003 16:04:00 +0100, Sebastien Tixier


>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 ***, 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 ***y 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.racesimcentral.net/
Pencil art  : http://www.racesimcentral.net/

Sebastien Tixie

To RUUD

by Sebastien Tixie » Sat, 15 Mar 2003 01:29:27


hi,

u'r welcome. :)

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 :(
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 !!!

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

ok, no problem.

Cheers,

Sebastien TIXIER - Game Developer
Dynamics and Car Physics
http://www.racesimcentral.net/
GPLRank Normal:-44.24   Monster:-124.44
LFS GTI Online          1:30:62
LFS GTI Offline (HLVC)  1:31:14

Ruud van Ga

To RUUD

by Ruud van Ga » Sat, 15 Mar 2003 01:50:36

On Thu, 13 Mar 2003 17:29:27 +0100, Sebastien Tixier




>>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 :)

Indeed, and a lot of sleep lost. ;-)

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)

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.

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...

...

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/

Sebastien Tixie

To RUUD

by Sebastien Tixie » Sat, 15 Mar 2003 17:56:03

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 :(

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

Ruud van Ga

To RUUD

by Ruud van Ga » Sat, 15 Mar 2003 19:59:50

On Fri, 14 Mar 2003 09:56:03 +0100, Sebastien Tixier


>>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).

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/

Sebastien Tixie

To RUUD

by Sebastien Tixie » Tue, 18 Mar 2003 17:49:26

That was exactly the problem :)

Well, i meant the opposite, physics frequency is 3x collision
frequency!

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.

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

Ruud van Ga

To RUUD

by Ruud van Ga » Tue, 18 Mar 2003 23:20:47

On Mon, 17 Mar 2003 09:49:26 +0100, Sebastien Tixier

...

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).

...

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/

Sebastien Tixie

To RUUD

by Sebastien Tixie » Wed, 19 Mar 2003 16:45:03

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.

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

Ruud van Ga

To RUUD

by Ruud van Ga » Wed, 19 Mar 2003 20:22:14

On Tue, 18 Mar 2003 08:45:03 +0100, Sebastien Tixier


>>>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.

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/


rec.autos.simulators is a usenet newsgroup formed in December, 1993. As this group was always unmoderated there may be some spam or off topic articles included. Some links do point back to racesimcentral.net as we could not validate the original address. Please report any pages that you believe warrant deletion from this archive (include the link in your email). RaceSimCentral.net is in no way responsible and does not endorse any of the content herein.