rec.autos.simulators

Explanation of GPL physics engine

Simon Brow

Explanation of GPL physics engine

by Simon Brow » Sat, 19 May 2001 09:59:26

I presume you mean either MathEngine's 'Karma' or 'Vortex' by Critical Mass
Labs, a subsidiary of MathEngine.

Either way, it really doesn't matter how good their libraries are, or how
talented their physicists, mathematicians and programmers are, since they
don't write games and you can't buy any racing sims based on their code.
What MathEngine might be capable of doesn't make GPL any less realistic, or
make any other game any more realistic.

Also based on how professional their website looks, I'd say their products
are likely to be even more expensive than Fastcar.

I don't see the point you are trying to make.  Why does it matter whether
they know more or less than Papy about writing physics simulations, since
they don't make computer games.

I'm not going to comment on F1RC because I haven't seen it, but as for every
other racing game/sim I *have* seen, the only two products that I would
class as 'simulations' and not just 'games' are GPL and N4.



Gregor Vebl

Explanation of GPL physics engine

by Gregor Vebl » Sat, 19 May 2001 17:33:51

Stephen,

are you sure? I always felt as if only aligning torque was modelled but
that caster was is if it was 0 (esp. since when you turn the wheel a lot
there is a point of the force actually starting to push into the
direction you are turning).

Then again, you probably know better what's really happening than I do.
:)

-Gregor


> Jim(s)

> Caster is modeled.  You can feel it with a FF wheel.

> --Steve Smith

Gregor Vebl

Explanation of GPL physics engine

by Gregor Vebl » Sat, 19 May 2001 18:26:03

Hi David,

those who claim that the core physics engine is sooo much better than
anything else are surely wrong. However, the GPL and, furthermore, the
N4 engine sure are the most refined car physics engines used in
entertainment software to this day.

I would say that, in the majority of the titles we consider sims these
days, the core of the physics engine is largely the same, meaning that
it's a rigid body model with 6DOF with forces/torques acting on it. But
the refinements of the tyre, drivetrain (esp. differential) and subtle
interactions between parts is what sets them apart.

However, if that was all that was to it, most people wouldn't even
notice. What is, I believe, more important is how this physics model is
presented to the player, which means how the feedback is handled. This
goes for graphics (head movement), sound (tyre squeal at the proper
point) and actual force feedback, and this is what makes the experience
of the physics engine the best in GPL and Nascar 4, and in fact it is
also the reason why I prefer GP3 to the feel of any other modern F1 sim.
The modern F1 sims really aren't all that different in fidelity and if
slightly tweaked can to some extent be made to respond quite similarly,
but the 'feel' will be vastly different because the most difference just
might be in the feedback part.

Also, it takes a lot of knowledge and ingeniuity to create a widely
general physics engine (such as the one you mention), but for a, let's
face it, relatively simple problem such as car simulation, a general
University course in physics and maths is quite adequate, especially
since the knowledge on how to do it is widely available.  Sure, more
knowledge can help you to find the most optimal ways of doing it, but
it's mostly overkill in a problem like this.

-Gregor


> Jan,

> He asked, "Does anyone know how much detail has ever been released about
> the GPL physics engine?" and,  "Can any of you help me find anything at all
> technical to do with the GPL engine?"

> Your answer does not go into very much detail and is not very technical.
> Questions as to what the makes the GPL physics sooooo much better than
> anything else have always been answered in a vague manner because no one
> really knows the details. Never have. Never will.

> Tell me, what makes the GPL physics engine "better" than F1RC's? Technical
> details please. Do you know the technical details of both physics engines?

> BTW, I know where a person can simply purchase and download a physics engine
> made by a team of 50 physicists, mathematicians and computer programmers
> located in Oxford, England and five other facilities around the world. Of
> course, they probably don't have a 1/4 of the knowledge the Papyrus
> employees do.

> David G Fisher

Andre Warrin

Explanation of GPL physics engine

by Andre Warrin » Sat, 19 May 2001 18:42:23

On Fri, 18 May 2001 11:26:03 +0200, Gregor Veble

<snip>
Too bad F1RC has none of these :(

<snip rest of excellent post>

Andre

Ruud van Ga

Explanation of GPL physics engine

by Ruud van Ga » Sat, 19 May 2001 21:17:21



Geesh, just because you have a computer doesn't mean you can create a
nice game.
Just because you have a physics engine doesn't mean you can create a
racing game.

GPL has a great feel, that's why most people will agree that it feels
technically the most advanced. On the other hand, GPL doesn't use
wings, and wings take frequency (the 288Hz) because all frequencies in
the car tend to go up (stiffer springs, tires, motions etc). This
*does* make GPL a perfect example of what physics models can feel
like; I have N4 (didn't see it in the shops in Holland, but got it
from cdexpress.nl for a minor amount of cash) but I must say I can't
really find back the same feel in that game as I did with GPL.
However, in what sim can you steer your car by rotating your
(spinning) wheels in the air? For example.

Car sim designers themselves regard GPL as top of the bill, and they
know what they're doing. What's wrong with that?
I can also say that we're all in the Matrix and none of you are alive
and probably just the latest Turing simulation exe from Donald Knuth,
but that doesn't matter; it's the reality as *I* see it, as *I*
experience it. I can always say that it may be completely different,
but that's no use as you don't feel it.

Ruud van Gaal, GPL Rank +53.25
Pencil art    : http://www.marketgraph.nl/gallery/
Free car sim  : http://www.marketgraph.nl/gallery/racer/

Ruud van Ga

Explanation of GPL physics engine

by Ruud van Ga » Sat, 19 May 2001 21:22:32

On Fri, 18 May 2001 10:14:12 +1000, "Shane Lowry"


>FastCar is still being worked on ( www.oxforddynamics.co.uk)  ... but does
>seem pretty good so far. Functionality is being added farily frequently and
>it does seem to run quite fast. That reminds me ... must shoehorn FastCar
>into my code to see if i can get it to run.

I don't believe you can just try it in your source; it's not really
for free.

I would say, catch a grip on the lack of mass. At 100Hz, my tires are
doing reasonably fine, although I think at 250Hz the jitters become
invisible. But ofcourse this highly depends on how you're doing
things, not trying to boast.

Yep. Like 'slow_rebound' and fast_Rebound. You can tell by looking at
that that there's no curve for example (it's the suspension rate when
compressing/extending). So you know how it is implemented fairly
accurately.
The sim physics are not so complicated by themselves, it's the
combination of a lot of them that makes the stuff work.

Right, GPL has the wonderful attribute in that it is able to *EXPOSE*
its physics model more clearly, as motion are slower in general
(frequencies, like car bouncing up and down). This gives a great feel.
Winged cars are much more jumpy.

Ruud van Gaal, GPL Rank +53.25
Pencil art    : http://www.marketgraph.nl/gallery/
Free car sim  : http://www.marketgraph.nl/gallery/racer/

Jan Verschuere

Explanation of GPL physics engine

by Jan Verschuere » Sun, 20 May 2001 02:51:46

I wasn't answering the original posters question, I was answering Eldred's
question. And yes, I do have a tendency to speak in a non-technical manner
about technical subjects. Bit of a one man campaign to demistify technology
and electronics/computers in particular actually. These subjects really
aren't *that* difficult for the average person to understand, but there
exists this "language barrier" around them.

We know even less of the inner workings of other games, but that's not
really important. Even if you treat them as black boxes, there is a lot of
information that can be gleaned from their interaction with the user. To me,
and I imagine to others too, GPL gives me the most believable experience and
throws up the least number of inconsistencies with the real world as I
understand and perceive it. Ergo it's, IMO, the best simulation regardless
of how it was made and I'm willing to take the developers' word for it some
of the reason for this is because of the "technical" parameters I outlined
in
my post. Continued below your next comment

The point is: neither do you, or you do and are unwilling to share the data.

If I experience one of the aforementioned inconsistencies in sim X, and go
on draw a certain conclusion on how this sim relates to GPL from this
incident, I'm going on circumstantial evidence, true. But unless you can
present just as valid circumstantial or hard evidence of the contrary, it
will be hard to dissuade me from that position. You have yet to produce
*any* riposte other than "unless we have details on both simulation we can
never be sure". This might be sufficient in the academic sense, but it's
just not the way things work in the real world (e.g. try rationalizing
against the fear of GM foods). I therefore hold you have no reason to, by
extention, call me stupid, immature and emotionally unstable just because,
IMO, GPL still is the benchmark racing simulation.

I will forgo on a comparison to F1RC... I haven't had a chance to drive it
yet.

Pity we can't simply purchase and download a real-time, multiplayer racing
simulation game from them.

Jan.
=----
"Pay attention when I'm talking to you boy!" -Foghorn Leghorn.

Gerry Aitke

Explanation of GPL physics engine

by Gerry Aitke » Sun, 20 May 2001 03:31:53


> No, as you can see from the few responses, no one here can help you. Not a
> surprise to some of us.

And I can't help either...if that makes you any happier.

Gerry

"He said I said that when he said what he said." -- David G Fisher

J. Todd Wass

Explanation of GPL physics engine

by J. Todd Wass » Sun, 20 May 2001 08:12:50

  Hmmm...  You two talkin' about me?  :-)  Ruud, shame on you.  Just because
you figured out how to make SAE555..whatever work and I still haven't got
around to it ;-)  

  My rotations are stable and fine at about the same frequencies you're talking
about.  I crank mine up to 3000Hz so I can switch to the low-speed ring-type
model at a lower speed, and it doesn't slow things down enough to notice yet
anyway.  I should take another look at later though and prevent any possible
overkill.  The 30,000- 60,000 Hz was for radio controlled car tires, which
don't like 100 to 250 (or even 3000Hz) very much at all :-).

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

Shane Lowr

Explanation of GPL physics engine

by Shane Lowr » Sun, 20 May 2001 10:02:01

Heya JT ... your name slipped my mind there :) ... I remembered that due to
the lack of mass of the RC wheels that you had to crank the engine freq.

FastCar is free to evaluate, but it takes a stamp of your HD so you can't
distribute the code ... can't even move it to another drive. Seems ok ...
but 20k is a little steep for a hobby project so I'll just write my own :)
... we might even end up with a nice little community of physics experts.

regards

Shane


Ruud van Ga

Explanation of GPL physics engine

by Ruud van Ga » Mon, 21 May 2001 02:47:08


Sorry Todd. ;-)
I didn't really figure out SAE950311. I've thrown it out for lateral
forces. I still use the longitudinal one, but use a different kind of
damping; when 'u' reverses sign. Works much better (see v0.4.5, just
released).
But you don't have mass in the wheels then?? Surely there's inertia...

Ah yes. I noticed 250Hz will get away with jittering here. Note that I
do wheel velocity reversal detection; when the sign of the wheel
velocity changes, I hold on to the speed and set it at either -0.0001
or +0.0001 depending on what direction it was going. This works quite
well; I had problems otherwise when pressing the brakes. Now I just
let the brake torque rise up and it gives me no trouble.

Ouch, groceries!

Ruud van Gaal, GPL Rank +53.25
Pencil art    : http://www.marketgraph.nl/gallery/
Free car sim  : http://www.marketgraph.nl/gallery/racer/

J. Todd Wass

Explanation of GPL physics engine

by J. Todd Wass » Mon, 21 May 2001 08:21:39

   No mass in the wheels, so vertical tire spring rate doesn't effect anything
unless I combine the "wheel rate" with a sequential spring system using both
rates.  I do use rotational moments of inertia though!  ;-)  Gotta have it!

  Interesting how you set the velocities this way.  Instead, I check for
reversal and set the state to "locked" for that tire.  After that, each time
through the loop, if it's still locked, it checks to see if the torque at the
wheel is greater than the torque applied by the brakes.  If it isn't, it stays
locked, if it is, it unlocks it and lets it rotate according to both forces.
This works great.  I also do the same thing for the clutch, so any torque
capacity clutch can be used and there aren't any instabilities.  Gotta remember
to tighten the clutch when you put a huge engine in, or it slips.  This got me
a couple times!  I thought the tires were spinning, but the car kept going
straight anyway.  Whoops..

  Hehe.  I gotta eat soon.....  Must... eat...fooood....
Too....much....programming...... :-P

  BTW, I got sound working through the Waveout.. functions (now using OpenGL
like you, although nowhere near as pretty).  I play around with algorithms that
produce some pretty cool sound that varies according to throttle and rpm.  This
gives a totally different sound when you're under trailing throttle, kind of a
"braaaaaap" sound.  Still, I think it'll be awhile before I can give Staccato a
run for their money ;-)  

  Soon, I'll need to get one of my old wave action engine simulation projects
up and running again and try running the exhaust pressure data throw the sound
buffers.  Will let you know how it sounds :-)  Any idea how I can run a wav
file this way?

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

Ruud van Ga

Explanation of GPL physics engine

by Ruud van Ga » Tue, 22 May 2001 18:48:11


...

But the wheel rate is similar to the tire rate isn't it? (although you
can combine the two, sure).

Phew!

Hm, yes, it's similar, although I do that implicity by letting the
wheel jump back & forth between -0.0001 and +0.0001. I must see, I
have some differential code in which outputs accelerations rather than
torques (formulas courtesy Gregor Veble), so you input the engine
torque, plus the 2 torques (reactions, so
Brakes+RollingResistance+RoadReaction) from the wheels attached to the
diff, calculate a locking torque (limited slip diff), and out comes
the accelerations on all 3 ends. Works great, it seems. :)
Problem is so that I don't get a TORQUE at the wheel, but an
acceleration, so I can't decide whether it locks or not; the
*differential* decides that.

Hm, have to remember this for the future. :) The clutch is still a bit
of misery in my code.

Food & a life. Oh, sorry, I was talking about ME. ;-)

Well, but still, it's your own. More rewarding. And more flexible.
Sounds good that you have sound working. :)

I have no idea. I don't know about Waveout, but I direct DirectSound
to push memory buffers out the machine. This way you can do your own
memory buffer juggling if you want. But for now, it's just simple
looping waves.
Sound definitely could use an upgrade in Racer. Collision hits, road
sound, grass sound (and grass surface detection)... Geez.

Ruud van Gaal, GPL Rank +53.25
Pencil art    : http://www.marketgraph.nl/gallery/
Free car sim  : http://www.marketgraph.nl/gallery/racer/

Gregor Vebl

Explanation of GPL physics engine

by Gregor Vebl » Tue, 22 May 2001 19:11:56

Hi,

as I see my name mentioned I think I can add a comment here :).

After talking with Chris, it became obvious to me that the locking (as
explained here by Todd) is the way to go, and that's precisely how I
handle it now (and so does Chris, but he did it for a long time :) ).

This, however, affects the functioning of the differential. When one
wheel is locked, one needs to explicitly tell the differential this is
the case and revert to another set of equations there (where one
acceleration is explicitly set to 0), and then do a check on the torque
produced in the differential as to whether it 'unlocks' the wheel.
Therefore I have four different ways of handling the differential,
depending on how many of the two wheels are locked.

BTW, the acceleration of an assembly and the total torque on it are
really interchangeable, and only the multiplication/division by the
effective moment of inertia of that assembly that stands between them
:).

-Gregor


> Hm, yes, it's similar, although I do that implicity by letting the
> wheel jump back & forth between -0.0001 and +0.0001. I must see, I
> have some differential code in which outputs accelerations rather than
> torques (formulas courtesy Gregor Veble), so you input the engine
> torque, plus the 2 torques (reactions, so
> Brakes+RollingResistance+RoadReaction) from the wheels attached to the
> diff, calculate a locking torque (limited slip diff), and out comes
> the accelerations on all 3 ends. Works great, it seems. :)
> Problem is so that I don't get a TORQUE at the wheel, but an
> acceleration, so I can't decide whether it locks or not; the
> *differential* decides that.

J. Todd Wass

Explanation of GPL physics engine

by J. Todd Wass » Wed, 23 May 2001 07:25:36

  It depends on the car I suppose.  I'm not really sure.  It sure looks like
most cars don't flex too much at the tires.  The engineers at the RC car
company I'm working with said the tire only compresses 1mm for each 8mm
suspension movement.  It's probably better to do it your way, but with this
ratio I'd need to up the sampling quite a bit.  Again, I'm not sure what the
ratio is on full size cars, and I haven't tried sequential springing it anyway
yet.  I figure, since full suspension modeling isn't there yet, it won't mess
it up any more than it already is.

  Same thing here :-)  Torque bias ratio and preload are used too, and out
comes acceleration directly, skipping torque.  Sounds like we're on the same
page.  Gregor's quite the mathematical genius though, I'm sure his method is
more efficient than mine.

  Just got some tire squealing in last night.  It's just some random sine wave
frequencies that jump around in a range that sounds as close to your skid sound
as I could get.  The engine sound is pretty cool IMO, probably because I'm
proud.  Everyone else would think it was pretty cheesy though!  lol

  I think it works the same way.  I write the data directly to the sound
buffers and play them.  This is cool because you can put together functions
that end up overflowing the integer sine wav.  For some reason, it sounds just
like the older games with good digital sound, only now it changes with
throttle.  I'd still love to run the Ferrari sound from GPL though :-)  Do you
know the Wav format at all?  Are they random access files where the sound data
begins at a certain record number, then is straight amplitude data vs. time for
the rest of the file?  Hmm...  If I can "decode" it, it should be easy to mess
with it.  Heck, I'd settle for just playing one!  Right now, the only way I can
do it is with SndPlaySound (is that right?  It's been awhile.)  Of course then,
you can't change the frequency :-(

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com


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.