Edit: See
this post for my proof-of-concept implementation results (Scawen, if you could have a look, that would be greatly appreciated!).
After watching Niels Heusinkveld's video about the "wrong" throttle model used by many sims (including LFS, but also the likes of ACC, iRacing and others, even the newer AC Evo (at least in its early access status)), I've been thinking about ways to improve this behavior.
First off, how does LFS compute part-throttle torque? Well, it simply scales the torque curve to the throttle input - this kind of works in general, but comes with two main drawbacks:
- low RPM torque is way too low: torque should follow the full throttle curve at low RPM (or close to it)
- higher RPM torque can be too high/over-peaky: part-throttle torque should dip significantly at higher RPM, instead of following a flattened full-throttle curve
The first point is responsible for the difficult launch behavior of most cars: it's incredibly difficult to just start rolling with low throttle in a realistic way without stalling. It also makes cars "too easy" to drive out of corners, in the sense that they will lack some of the torque they should have, therefore drivers are encouraged to almost floor the pedal instead of feeding throttle.
The second point means wheel spin behavior is weird, as higher RPM will actually tend to increase torque, therefore worsening the spin, instead of decreasing torque, which helps stop the spin.
For more detail, please do refer to Niels Heusinkveld's video
https://www.youtube.com/watch?v=0gW-cbSX3Uc
Now, what can be done to improve the model? Well, LFS could follow in BeamNG's steps:
https://www.beamng.com/game/news/blog/throttle-torque-curves/ (by the way, there's another video by Niels comparing LFS's model with the improved one, no need to talk about the third model, as it's plain wrong and just bad).
This article is really nice to see how the curves look, and combined with Niels' video, they should give enough understanding of the issue.
My understanding of BeamNG's 2016 model is that they basically follow the 100% throttle curve up to a certain point, and then dip down to lower values. Their 2023 model refines this by introducing some smoothing at that transition (maybe it improves other areas, but let's focus on the basics for now).
From the above, I would like to suggest introducing a new throttle model, which basically works as follows:
- keep the current max torque logic, as it's the full throttle torque, and is good as is
- for part-throttle torque, follow the full-throttle torque up to some point, then interpolate down to the current scaled-down (interpolated) part-throttle torque curve, which is currently the final torque value
- introduce a smoothing transition to prevent abrupt behavior change when leaving the full-throttle curve
- introduce some parameters to control the general shape of the part-throttle curves, either per engine (and exposed to mod makers) or as general, hard-coded values that would not be accessible.
- additionally, the target throttle curve should be scaled up slightly, as spacing doesn't seem to be linear: 10% throttle may be spaced at 20% instead (random value here), with the curves bunching up toward full throttle.
As a first thought, and based on BeamNG's curves, I would do the following:
- transition point: for throttle input T, aim for RPM_idle + 0.5*T * (RPM_redline - RPM_idle)
- dip down from full throttle curve: interpolate exponentially from 100% to T, between the transition point calculated above and redline RPM
- smoothing: haven't thought too much about that yet, I'll try experimenting and see if I can come up with something decent, but I guess we could use a small percentage of RPM_redline-RPM_idle, centered around the transition point, as an RPM interval to interpolate linearly between the curves
My hope with this is that we could, at some point, replace what I believe is a simple "throttle input -> lerped torque output" formula with a slightly more complex one (probably involving a couple lerps and an exponential interpolation, not exactly resource intensive calculations), that could result in a somewhat low-hanging fruit type of improvement, that would make driving both more realistic and more enjoyable (especially for cruisers with manual clutch, I guess?
)
Now I'm no genius, so if you see any obvious flaw in my reasoning and ideas, feel free to say so!