PDA

View Full Version : I wonder how downforce is simulated in the game..



Javaniceday
14-03-2019, 23:29
And when I say simulated, I mean specifically faked. That is, the game isn't creating billions of air molecules to simulate real fluid dynamics for the car as we drive.

EDIT - I don't use the word "fake" as an insult or a shortcut or somehow doing it wrong. CPU limitations dictate that the simulation must be done in a different way, different than real life. I'm being tongue in cheek when using the word "fake" - please don't take it literally.

No, no, it's faked, so I wonder how they do it. Do they assign a downforce vector factor for each wing? Area of the car? Depending on speed, does it then tell how much to squeeze the suspension? How do they simulate dirty air? A graph where depending on speed/distance, that force vector is lowered? Perhaps even more rudimentary solutions?

So interesting....

Daz555
15-03-2019, 02:56
I don't imagine any company who makes games wants to share too much about its physics engine.

It's not faked though. It is simulated - there is enough variation between car type, number of cars, their speed, their distance, their position, etc. in terms of air to tell the player that there is simulation going on here and not a simple scripted/faked approach. The complexity of simulation is limited by the hardware and software engine of course but it is there non-the-less.

hkraft300
15-03-2019, 06:36
And when I say simulated, I mean specifically faked. That is, the game isn't creating billions of air molecules to simulate real fluid dynamics for the car as we drive.

Definitely not, because fluid dynamics at a micro level it takes super computers.



Do they assign a downforce vector factor for each wing? Area of the car? Depending on speed, does it then tell how much to squeeze the suspension? How do they simulate dirty air? A graph where depending on speed/distance, that force vector is lowered? Perhaps even more rudimentary solutions?

So interesting....

Definitely more complex than all of that. The guys are simulating underbody aero, ride height effects, rake, wing angle, dirty air, slipstreaming... I don't know enough to speculate how they've done it.

Zaskarspants
15-03-2019, 10:46
Lots of discussion in this thread with some information from Casey and Jussi from page cited and after.

http://forum.projectcarsgame.com/showthread.php?64780-Pcars-2-Aerodynamic-Model/page7

Sankyo
15-03-2019, 11:24
Sad to see the OP filled with polarizing wording ('faked'), it implies that what is in the game is inferior or incorrect.

Simulation can be done on various levels, but what counts is what comes out of it and how it compares to reality.

You can simulate a pendulum by calculating atomic interactions in the pendulum's components to determine how the pendulum deforms while swinging and use relativistic gravity to determine how it swings, or you can use the simple pendulum formula to arrive at a result that is by all means sufficient for what you're trying to achieve. The latter solution isn't 'fake', as there's still physics behind it.

In the case of downforce, it can be simulated rigorously through applying fluid dynamics calculations (that take huge CPU resources), but that is not the only way to simulate. Simulation means re-creating real life with calculations, and the way in which it's done does not really matter if the output is consitent with reality. The simulation is merited on its output, not on the method behind it, so if you're using very good physics-based approximate formulas to replace flow simulations it's also not 'fake'.

David Wright
15-03-2019, 12:17
SMS started off with ISIMotor2 way back around 2004. The current engine is certainly an advance on this, but looking at the ISIMotor2 hdv/hdc file will give you some idea how aerodynamics are or were simulated.

[FRONTWING]
FWRange=(0.0, 1.0, 40) // front wing range
FWSetting=34 // front wing setting
FWMaxHeight=(0.30) // maximum height to take account of for downforce
FWDragParams=(0.020, 0.00319, 0.00001) // base drag and 1st and 2nd order with setting
FWLiftParams=(-0.2600, -0.0106, 0.000015) // base lift and 1st and 2nd order with setting
FWLiftHeight=(0.920) // effect of current height on lift coefficient
FWLiftSideways=(0.30) // dropoff in downforce with yaw (0.0 = none, 1.0 = max)
FWPeakYaw=(0.0, 1.0) // angle of peak, multiplier at peak
FWLeft=(-0.05, 0.0, 0.0) // aero forces from moving left
FWRight=(0.05, 0.0, 0.0) // aero forces from moving right
FWUp=(0.0, -0.168, -0.001) // aero forces from moving up
FWDown=(0.0, 0.168, 0.001) // aero forces from moving down
FWAft=(0.0, 0.04, -0.04) // aero forces from moving rearwards
FWFore=(0.0, 0.0, 0.0) // aero forces from moving forwards (recomputed from settings)
FWRot=(0.15, 0.06, 0.22) // aero torque from rotating
FWCenter=(0.00, 0.05, -0.50) // center of front wing forces (offset from center of front axle in ref plane)

[REARWING]
RWRange=(0.0, 1.0, 40) // rear wing range
RWSetting=34 // rear wing setting
RWDragParams=(0.0400, 0.0096, 0.00002) // base drag and 1st and 2nd order with setting
RWLiftParams=(-0.2800, -0.0159, 0.000055) // base lift and 1st and 2nd order with setting
RWLiftSideways=(0.25) // dropoff in downforce with yaw (0.0 = none, 1.0 = max)
RWPeakYaw=(0.0, 1.0) // angle of peak, multiplier at peak
RWLeft=(-0.09, 0.0, 0.0) // aero forces from moving left
RWRight=(0.09, 0.0, 0.0) // aero forces from moving right
RWUp=(0.0, -0.192, -0.002) // aero forces from moving up
RWDown=(0.0, 0.192, 0.002) // aero forces from moving down
RWAft=(0.0, 0.10, -0.10) // aero forces from moving rearwards
RWFore=(0.0, 0.0, 0.0) // aero forces from moving forwards (recomputed from settings)
RWRot=(0.20, 0.10, 0.30) // aero torque from rotating
RWCenter=(0.00, 0.60, 0.35) // center of rear wing forces (offset from center of rear axle at ref plane)

[BODYAERO]
BodyDragBase=(0.3700) // base drag
BodyDragHeightAvg=(0.350) // drag increase with average ride height
BodyDragHeightDiff=(0.900) // drag increase with front/rear ride height difference
BodyMaxHeight=(0.20) // maximum ride height that affects drag/lift
BodyLeft=(-0.7, 0.0, 0.0) // aero forces from moving left
BodyRight=(0.7, 0.0, 0.0) // aero forces from moving right
BodyUp=(0.0, -1.7, 0.0) // aero forces from moving up
BodyDown=(0.0, 1.7, 0.0) // aero forces from moving down
BodyAft=(0.0, 0.10, -1.00) // aero forces from moving rearwards
BodyFore=(0.0, -0.1800, 0.370) // aero forces from moving forwards (lift value important, but drag overwritten)
BodyRot=(4.0, 3.0, 2.0) // aero torque from rotating
BodyCenter=(0.0, 0.250, -1.300) // center of body aero forces (offset from center of rear axle at ref plane)
RadiatorRange=(0.0, 1.0, 5) // radiator range (front grille tape)
RadiatorSetting=3 // radiator setting
RadiatorDrag=(0.0040) // effect of radiator setting on drag
RadiatorLift=(0.0090) // effect of radiator setting on lift
BrakeDuctRange=(0.0, 1.0, 5) // brake duct range
BrakeDuctSetting=2 // brake duct setting
BrakeDuctDrag=(0.0050) // effect of brake duct setting on drag
BrakeDuctLift=(0.0110) // effect of brake duct setting on lift

[DIFFUSER]
DiffuserBase=(-1.02, -6.0, 101.0) // base lift and 1st/2nd order with rear ride height
DiffuserFrontHeight=(1.700) // 1st order with front ride height
DiffuserRake=(0.002, -10.0, 300.0) // optimum rake (rear - front ride height), 1st order with current difference from opt, 2nd order
DiffuserLimits=(0.005, 0.15, 0.05) // min ride height before stalling begins (0.0=disabled), max rear ride height for computations, max rake difference for computations
DiffuserStall=(0.0, 0.5) // function to compute stall ride height (0.0=minimum, 1.0=average), downforce lost when bottoming out (0.0=none, 1.0=complete stall)
DiffuserSideways=(0.30) // dropoff with yaw (0.0 = none, 1.0 = max)
DiffuserPeakYaw=(0.0, 1.0) // angle of peak, multiplier at peak
DiffuserCenter=(0.0, 0.01, -1.250) // center of diffuser forces (offset from center of rear axle at ref plane)

Aerodynamic forces vary with the square of speed. Dirty air and slipstreams are not defined in the hdv/hdc files but are simulated.

One thing simulated in PC2 not simulated in the original ISIMotor2 is the effect of altitude on air density. ISIMotor2 assumed fixed air density.

Javaniceday
15-03-2019, 16:49
Sad to see the OP filled with polarizing wording ('faked'), it implies that what is in the game is inferior or incorrect.

Simulation can be done on various levels, but what counts is what comes out of it and how it compares to reality.

I see I was insensitive for using that word. I can see why someone who wants to do a simulation, the word "fake" can be taken as an insult. I was being tongue in cheek, so my apologies for being a bit insensitive.

On a personal level, I don't see it as a bad thing. I work in VFX, and we fake things all the time. ALL the time. And we're proud of it. We'll place characters going through walls, through floors. We'll have actions taking place in one part of the environment in one shot, in a whole different place in the next shot. Green screens? That's all fakery done in After effects or Nuke. When Jon Snow touches the dragon? That dragon wasn't there - he touched a green stuffed pillow.
It's faked! Whatever it takes to get the shot. That's where I was coming from.

So I didn't mean to imply the game was inferior or incorrect. Just simply how they got the final effect. Hope that clears things up :)

cluck
15-03-2019, 16:57
Wait, what? You're saying there wasn't actually a real dragon there and they faked it? Did the real dragon demand too many pieces of gold or something? This is a truly shocking revelation :eek:

Javaniceday
15-03-2019, 17:19
Wait, what? You're saying there wasn't actually a real dragon there and they faked it? Did the real dragon demand too many pieces of gold or something? This is a truly shocking revelation :eek:

No way mate, he demanded Fire and Blood. Kept going on and on about the night being dark and full of terrors or something or other. Must be a Freddie Krueger fan. No, no, we tried to donate the intern as an exchange of sorts, but the lawyers... well you know how they are. They frowned upon our idea.

So we had to settle for the green pillow.

cluck
15-03-2019, 17:22
Damn dragons, never satisfied with a simple pot of gold :|

Christiaan van Beilen
15-03-2019, 17:40
And when I say simulated, I mean specifically faked. That is, the game isn't creating billions of air molecules to simulate real fluid dynamics for the car as we drive.

EDIT - I don't use the word "fake" as an insult or a shortcut or somehow doing it wrong. CPU limitations dictate that the simulation must be done in a different way, different than real life. I'm being tongue in cheek when using the word "fake" - please don't take it literally.

No, no, it's faked, so I wonder how they do it. Do they assign a downforce vector factor for each wing? Area of the car? Depending on speed, does it then tell how much to squeeze the suspension? How do they simulate dirty air? A graph where depending on speed/distance, that force vector is lowered? Perhaps even more rudimentary solutions?

So interesting....

Please go grab a dictionary and learn the definitions of the words "simulate" and "emulate".

If you want identical Physics as real life you emulate Physics and you do not simulate the Physics.

Javaniceday
15-03-2019, 18:12
Please go grab a dictionary and learn the definitions of the words "simulate" and "emulate".

If you want identical Physics as real life you emulate Physics and you do not simulate the Physics.

Well to your point, I didn't mean the word "fake" as an insult. I explained it a few responses ago. More to your point, would digital air molecules be an emulation? It'd still be a simulation since the air molecules would be digital... wouldn't it?

And no, I don't want identical physics - it takes super computers to simulate (or emulate) that. Again, my apologies for using the word "fake"

Keena
15-03-2019, 20:43
I thought the OP posed an interesting question that I had wondered about myself. I was curious if density altitude was modelled etc too. It wont make me faster but its definately interesting! Simulate, emulate.. we all know what he means so no need to get all pedantic.
Quite an achievement really and I love that.

Javaniceday
15-03-2019, 21:02
If we'd be able to get past the "faked" issue, I would love to get back on-topic, 'cuz I am still curious as to how the aerdynamics are simulated. Not in technical terms, but, an organizing idea terms, if anyone knows the answer. I am reading thorough that other thread, seeing if I find what I was wondering about.

http://forum.projectcarsgame.com/showthread.php?64780-Pcars-2-Aerodynamic-Model/page3

Christiaan van Beilen
16-03-2019, 00:58
Well to your point, I didn't mean the word "fake" as an insult. I explained it a few responses ago. More to your point, would digital air molecules be an emulation? It'd still be a simulation since the air molecules would be digital... wouldn't it?

And no, I don't want identical physics - it takes super computers to simulate (or emulate) that. Again, my apologies for using the word "fake"

Depends on your perception of what is real. In fact it depends on what you think you perceive.

We think that a piece of wood or metal is solid. You can grab it unlike air, you can feel, you can taste it and you can see it. Yet it exists of the same atoms, protons and electrons as all else in the universe. It is but the arrangement that is different.
Yet we don't see that piece of wood or metal as loose dots at all, unlike loose sand it stays together and if you punch it you will even hurt yourself.

So what I am getting at is that something might consist of atoms or digital signals, but it is how we perceive it to behave and respond to our senses that makes it real or not. Or in our case emulate (real) or simulate (a mere approximation).

By the way I didn't want to pry on the word fake at all. Just the fact that your story complained about the simulation not being realistic enough, than following a complaint that it in essence doesn't emulate the aerodynamics from the real world.
Hence I just wanted you to know what simulation actually means alongside emulation, as that is something we all tend to forgot; that simulation is but an approximation and an emulation is something that performs as well or better than the original.

To answer your question. Digital air molecules would only be an emulation if those molecules behaved exactly the same as the original counterpart that you are wanting to emulate.
For example. A processor in your computer is also but an automated emulation unit. It is created to emulate a human flipping 64 switched on or off (64 bit cpu) and than processing that by applying a matimatical process of (adding, subtracting, multiplying, dividing) and a number of subsequent rows of 64 switches/binary numbers to get to a final sum. That sum is then given to another device, like your GPU or your soundchip, as data it can further process.

So a processing unit is nothing more an an automated emulation of a human working a binary calculator. This emulation by today's standards is much faster and clearly superior to its original counterpart... the human.
So as defined , emulation is basically something that performs a task equally well or better.

So if that digital air molecul behaves equally well or better than the original, it is an emulation. If it doesn't perform as well it is but a simulation.

Christiaan van Beilen
16-03-2019, 01:08
If we'd be able to get past the "faked" issue, I would love to get back on-topic, 'cuz I am still curious as to how the aerdynamics are simulated. Not in technical terms, but, an organizing idea terms, if anyone knows the answer. I am reading thorough that other thread, seeing if I find what I was wondering about.

http://forum.projectcarsgame.com/showthread.php?64780-Pcars-2-Aerodynamic-Model/page3

As far as I am aware they do simulate air flow across the digital model of the car. In fact the air in the entire game world is simulated including wind speed, direction as well as air density.
Of course it is a limited simulation but the point is that everything does interact with everything in the game, and never is there a fixed number for anything. Unlike in rFactor where you literally had a datasheet for Physic states.
Project CARS is in that sense a simulation that is more organic with nearly everything. Same goes for the livetrack simulation with fluid dynamic simulation, throttle body simulation that simulates air entering the engine (giving a natural throttle response to your input). To which the turbo charging simulation is attached as well.

Everything hooks into everything in an organic way, even though it is but a rough approximation of the real world and far from being detailed enough for it to be without flaws.

REXPITVIPER1
16-03-2019, 01:21
Definitely not, because fluid dynamics at a micro level it takes super computers.



Definitely more complex than all of that. The guys are simulating underbody aero, ride height effects, rake, wing angle, dirty air, slipstreaming... I don't know enough to speculate how they've done it.

if you don't know enough about what you're talking about why are you talking about it?

REXPITVIPER1
16-03-2019, 01:23
And when I say simulated, I mean specifically faked. That is, the game isn't creating billions of air molecules to simulate real fluid dynamics for the car as we drive.

EDIT - I don't use the word "fake" as an insult or a shortcut or somehow doing it wrong. CPU limitations dictate that the simulation must be done in a different way, different than real life. I'm being tongue in cheek when using the word "fake" - please don't take it literally.

No, no, it's faked, so I wonder how they do it. Do they assign a downforce vector factor for each wing? Area of the car? Depending on speed, does it then tell how much to squeeze the suspension? How do they simulate dirty air? A graph where depending on speed/distance, that force vector is lowered? Perhaps even more rudimentary solutions?

So interesting....

interesting question, I too would like to see how realistic Project CARS 2 simulated downforce works, knowing how some cars don't 100% drive like their real life counters (because this is a game not the real thing, if you're expecting the cars to drive like the real life thing you've gone crazy)

REXPITVIPER1
16-03-2019, 01:27
Damn dragons, never satisfied with a simple pot of gold :|

the fact you humans expected us dragons to actually accept your gold is laughable, do you know that us dragons are creatures out of your league, one cannot possibly even imagine our godly powers and yet you expected us to accept gold from peasants. laughable, laughable indeed.

REXPITVIPER1
16-03-2019, 01:27
As far as I am aware they do simulate air flow across the digital model of the car. In fact the air in the entire game world is simulated including wind speed, direction as well as air density.
Of course it is a limited simulation but the point is that everything does interact with everything in the game, and never is there a fixed number for anything. Unlike in rFactor where you literally had a datasheet for Physic states.
Project CARS is in that sense a simulation that is more organic with nearly everything. Same goes for the livetrack simulation with fluid dynamic simulation, throttle body simulation that simulates air entering the engine (giving a natural throttle response to your input). To which the turbo charging simulation is attached as well.

Everything hooks into everything in an organic way, even though it is but a rough approximation of the real world and far from being detailed enough for it to be without flaws.

thats good to see, and hear.

EdgarGreen
16-03-2019, 08:01
Heh, that's obviously right.

Javaniceday
16-03-2019, 17:58
As far as I am aware they do simulate air flow across the digital model of the car. Of course it is a limited simulation but the point is that everything does interact with everything in the game, and never is there a fixed number for anything. Unlike in rFactor where you literally had a datasheet for Physic states.
Project CARS is in that sense a simulation that is more organic with nearly everything.

If that's true then that's mighty impressive. In rFactor's defense, I mean the game is like 20 years old now? It had to do what it could with what was available for consumer-grade cpu's, yea? But back to pCARS2... I wonder if, and, if I'm being honest, there's no way they would do this - it would take way too much computational power - but imagine if the physics engine takes into account the actual geometry of the aero package of a car. So imagine if we, say mod some of the vehicle's polygon topology - would it affect the handling of the downforce? It would be truly astonishing if they did. We're getting deep into the weeds over here)

David Wright
16-03-2019, 20:11
RFactor is 14 years old and I think Christiaan under-estimates what it is doing. All physics is ultimately a "data sheet". RF2 is more sophisticated than RF1 but its still basically the same.

The basics are simulated such as the drag and lift of the wings varies with their settings as does the drag and lift of the brake and engine cooling. But also the lift and drag of the front wing/splitter, the car body, diffuser and rear wing are calculated in real time varying with the square of the car's velocity, the height of the front wing/splitter (dynamic not static) the ride height and pitch of the body (again dynamic not static), and the yaw of the car. And it does this 400 times a second.

A key thing to remember is however complex your physics engine is, if you don't know how the real car performs aerodynamically its of little use.

hkraft300
17-03-2019, 00:57
If you run high level CFD on individual digital models of the car to derive a data sheet to reference to, you still end up with a pretty decent and accurate model.
But then you run into problems when you have hundreds of cars in the game, near -infinite altitudes and weather conditions and near infinite scenarios of fluid flow your car is experiencing.