The online racing simulator
Restrictions / Turbo cars
2
(49 posts, started )
Quote from tristancliffe :I'd love real time engine simulation. The fact that decent non-real time engine simulation is only just possible outside of big car companies obviously isn't the point. Anyone here used WAVE? It takes quite a long time to do very basic throttle-power plots, and that's on a single cylinder normally aspirated engine!

So the question is, how close do you go? Closer than now, sure, but not fully accurate which isn't feasible.

I'm sure the engines will get an update at some point in terms of how they produce their power. Coughing and flames, or even backfires, are probably an S3 thing.

But the aero work is weaker than the engine simulation overall, so I'd say that takes priority at the moment. If the basic turbo model could be improved at around the same time I think we'd be a bit happier still.

I'm sure Scawen has already mentally priorities the various options, and he'll get on with it soon. He's very quiet at the moment, so I think he's probably doing AI at the moment quite heavily. Once that's done who knows what he'll do next.

I think its can be done really good in real time. I would be interested in what you think is needed and why you think it can't be done in real time, decently at least
I think Todd has been doing some interesting things in real time for quite some time now, I'd be curious what he has to say about it as well.
Obviously some things can be done real time. But lalalalalalala said he wanted realtime engine simulation. That means fluid/vapour dynamics, shock/pressure wave behaviour, cylinder swirl, flame front simulations.... That's not real time, yet.

But you could vaguely approximate some of it in real time. If you give each 'part' of the system (inlet tracts, valves, cylinders, exhaust manifolds, other parts of exhaust) various fixed parameters, pressure drops etc, and really dumbed down some of the clever stuff to simple variables or even fixed values, then you could end up with a 'good' real time engine simulation that will vary with exhaust damage, turbo damage, restrictor plates etc vaguely realistically. You could even predetermine various lean:rich:stoich behaviours for different parts, and therefore include 'accurate' dynamic exhaust behaviour (flames, anti-lag...).

It all, obviously, depends on degrees of accuracy. Right now we have a real time engine simulation, but with more dumbed down bits that 'optimum'.

I'm convinced it will improve in time.
Quote from tristancliffe :I'm convinced it will improve in time.

If I could accelerate myself to the speed of light (or very close to it) the process would be less discouraging.
well he took it literally, when i say real time engine simulation i mean best possible simulation that can be done in real time. not everything simulated
Quote from Ball Bearing Turbo :If I could accelerate myself to the speed of light (or very close to it) the process would be less discouraging.

the problem with lightspeed is no lfs download will ever be able to reach you

Quote from Ball Bearing Turbo :I think Todd has been doing some interesting things in real time for quite some time now, I'd be curious what he has to say about it as well.

iirc he said all his simulation is done as non real time numbercrunching which then is fed into the real time sim in a much simpler form
also keep in mind that what hes working with are small single cylinder 2-strokes with simplistic resonant exhausts

i think the harsh truth is that realistic real time engine simulation is not gonna happen anytime soon and quite possibly not before lfs exceeds its lifespan
Quote from Shotglass :the problem with lightspeed is no lfs download will ever be able to reach you

Ideally I would merely hang out at that speed (mass issues aside) for what I would perceive to be a few weeks... Then I would slow back down and see if LFS has windsheilds visible from the inside of the car yet!

Yes, I think you are right about Todd's R&D now that I think about it. I was probably mentally meshing his acoustic engine simulation efforts with his physical engine simulation efforts.
Quote :i think the harsh truth is that realistic real time engine simulation is not gonna happen anytime soon and quite possibly not before lfs exceeds its lifespan

I disagree, if we can have real time tire simulation that meets our standards, then there is no reason for it not to be possible.
Hmm,

I would think an engine simulation would be even more complex than a tire one. The latter has been in the works for 5+ years and still isn't done. But I guess like Tristan said, it's a matter of how detailed. What do you think is acheivable in a reasonable time span?
I've written a few engine models that vary in complexity. The 2 stroke model is for Virtual RC Racing 4 (or VRC Pro or whatever we wind up calling it) and will probably be used in KartSim too. That's not audio stuff.

There are two components to the 2 stroke sim. First is a preprocessing step where the simulation is run at a bunch of rpm steps. That's pretty quick really since it's a single cylinder engine. It takes perhaps 2 seconds to come up with the torque curve. In that you can change fuel mixture strength, oil and nitro %, etc.. It's using unsteady gas dynamics so the pressure waves travelling through all the intake/exhaust/expansion chamber areas and so on influence things significantly. The area above the piston is three separate volumes which allows intake/exhaust gases to flow and mix across the piston between the transfer and exhaust ports. Some basic heat transfer and other stuff is saved during this step too which is then used in the second component, the real time part. In that, the engine temperature, oil film thickness on the cylinder wall, and so forth varies in real time which can change the torque the engine is making and allow runaway heating from a too-lean condition to seize the engine.

The more complex sim is indeed a 4 stroke model that works similar to WAVE, although probably isn't as accurate. That one takes a couple of minutes to run a full torque curve for a V8 so is definitely not real time. The output data from that can then be used for the real time audio stuff.

Some of you may remember these from a couple of years ago:

http://www.performancesimulati ... iles/EngineSoundModel.zip
http://www.performancesimulati ... les/EngineSoundModel2.zip

Those are indeed real time V8 engine simulations with all 8 cylinders having their own mass flow rates through the valves, cylinder pressure variation, and so on. You'll probably notice the CPU load is pretty high though. It's also not used to make torque curves as it's such a simplified model that it's not nearly accurate enough to do that. The valve model is very simple. They're either open or closed, and there is no intake model at all. Instead, there are preselected volumetric efficiency curves which could have been done in a way to allow throttling of the engine, although I didn't bother with that as I abandoned the approach. The exhaust runner length and dimensions are not accounted for either. So we're talking very, very basic here to run in real time. And this one uses too much CPU power to run a car sim on top of it unless it was running on a multi-core system. Those didn't exist when I wrote those though

The latest one I'm working on now has a lot more potential. This is another simplified engine model that currently is running in a preprocessing step, then the data is fed into the live audio simulation system which itself is very fast (1-2% cpu load usually). That preprocessing step engine model is considerably faster than real time. A V8 will run about 100 times faster than real time with plenty of room to double or triple that, so eventually I'll use it that way, although currently that's not the case. I can kill off cylinders and that sort of thing. Valve bounce/float and simulating stuck valves will also be able to be done with the approach as well.

This too, however, will probably not be very accurate in terms of torque output and so forth which is more what this thread seems to be about. There isn't a turbo simulation in there either. It's mainly intended for audio.

http://www.performancesimulati ... iles/ToddSim-GenIV-06.wmv
http://www.performancesimulati ... iles/ToddSim-GenIV-07.wmv

So yes, it's possible to do an engine simulation in real time. The above movie has audio running at 88Khz, so it's calculating the engine stuff 88,000 times per second on average, which is double what audio/music on a CD runs if I'm not mistaken. The question is really, "how much can you do and at what level of accuracy and complexity?" Currently, it's not too high if you're only using the CPU and not the graphics card (especially the 8800GTX).

While I'm posting videos I might as well add a fun, OT one:

http://www.performancesimulations.com/files/dominoes.wmv

Quote from jtw62074 :Currently, it's not too high if you're only using the CPU and not the graphics card (especially the 8800GTX).

definitely an interesting prospect for the future but iirc were still at least a couple of years away from tightly speced general purpose computing on gpus/parrallel cores in fusion so it will be quite some time until every card on the market comes up with the same numbers
I see things are moving right along in ToddSimLand
Quote from Shotglass :definitely an interesting prospect for the future but iirc were still at least a couple of years away from tightly speced general purpose computing on gpus/parrallel cores in fusion so it will be quite some time until every card on the market comes up with the same numbers

You're probably right. The 8800GTS/GTX is the first card that has a general purpose API, CUDA, for it. Its architecture is apparently radically different to allow different memory sharing and other fancy hardware stuff that I don't understand in the slightest at the hardware level The API is very impressive, but yes, you'd need to write a separate system for other cards using shaders instead if you wanted widespread GPU support.
hm interesting tyre info on one of the vids there

whatever happened to releasing that car sim btw ?

of your latest engine Sim, which part is more computationally intensive. Also did you design the sim with a larger respect for it generating audio.
Quote from Shotglass :hm interesting tyre info on one of the vids there

whatever happened to releasing that car sim btw ?

It's far from ready for any type of release. There isn't even a car rendered currently and the graphics are atrocious

It's basically just a testbed for other development projects and doesn't really get much more than sporadic attention here and there. It'd be neat to release something some day, but I don't have concrete plans to do so. The last thing I want to do is announce something like a release date. People quickly turn against developers when they make an announcement like that and fail to deliver
Quote from lalathegreat :of your latest engine Sim, which part is more computationally intensive. Also did you design the sim with a larger respect for it generating audio.

The initial engine simulations were originally developed with no intention for use in video games. The first one is in my drag racing simulation, Straightline Acceleration Simulator, which is a tool like Bob Smith's for helping people set up their cars. The engine simulation in that was mostly written back when I was in high school in 1991-1992 or so.

Since then the other models were written to explore much the same thing. At one point while working on a sorting line at Holsum Bakery (can you believe it?) it popped into my head that the simulation could probably produce audio too. This was about 8 or 9 years probably. The Pentium 60Mhz system gracing my desk back then hadn't a prayer of pulling it off, nor were my coding skills up to the task at the time, so it remained just a thought experiment until a few years ago.

The engine simulation aspect itself would take up more cpu than the audio would. However, with the new system it's not so easy to draw a line between the two as there wouldn't be a preprocessing step. I.e., the engine simulation is producing the audio on the fly in real time, so the question then loses some meaning.
Todd, any chance we could get these simulations hooked up to OutGuage?

That would be pretty cool
Quote from KeiichiRX7 :Todd, any chance we could get these simulations hooked up to OutGuage?

That would be pretty cool

The engine simulation? What would that do? The driving sim would make more sense. I probably misunderstood...
Quote from jtw62074 :The engine simulation? What would that do? The driving sim would make more sense. I probably misunderstood...

outgauge is the interface that gives info like rpm and gas pedal position
i think hes talking about a car sound remixer type application with your engine sim to create the sound
Quote from Shotglass :outgauge is the interface that gives info like rpm and gas pedal position
i think hes talking about a car sound remixer type application with your engine sim to create the sound

Precisely, your engine sim produces quite a good sound, and I wonder how well it would work taking data from LFS
Oh, ok. I understand now.

I'm happy and flattered that you like the sound, but doing something with OutGauge to get it running in LFS isn't something I want to do. Sorry. I doubt the LFS team would appreciate it much either
actually i dont think they care what you do with outguage.
but hey
Either way, I'm not for putting it into LFS. It's meant for my sim.
2

Restrictions / Turbo cars
(49 posts, started )
FGED GREDG RDFGDR GSFDG