I’m working on Vehicle Physics Pro, a new vehicle simulation model conceived to be completely realistic and accurate. The core design, formulas and implementation have been written from the ground up for solving the long-standing needs and requirements of vehicles in video games and simulators.
Vehicle Physics Pro is mature enough to be used in production projects (for example, Kerbal Space Program uses it for the wheel simulation). The project has just entered the beta stage and the plan is to land at the Asset Store within next few months. So I wanted to share it with you, so you could try it and let me know what do you think and how could it be improved.
Features:
Advanced AAA+ vehicle dynamics simulation, targeting high-end simulators such as Grand Turismo.
Modular powertraing design. Any powertrain can be simulated by connecting functional blocks (engine, gearbox, differential…) in any number and combination.
Advanced wheel and tire simulation providing accurate friction forces in all situations.
High performance and coherency: tested with physics rates as low as 16 Hz (fixedTimeStep = 0.06)
Just curious, there’s a lot of vehicle physics solution but mostly they going for realistic physic driving simulation.
Is it possible to get a demo for arcade driving type games something like casual open world driving cars GTA
Awesome work Edy! I loved Edy’s Vehicle Physics back in Unity 4 which is what lured me in to game dev. My biggest design client is a car magazine and your new pro version is definitely on our radar. I’ve been driving the cars for the photoshoots for 4 years now so I’ll have a play and see if there is anything useful I can add. But from what I can see in the videos it looks like you’ve nailed it already… The 458 is sexy but its hiding your amazing suspension work!
This could be related to the setup only and not the actual physics, but all of the cars seem to suffer from a lot of excessive understeer (or it could be the tire model/wheel collider).
Only complain i have are the sounds. I know it has nothing to do with physics but it plays tricks on your mind saying “there’s something wrong here”.
Anyway keep it up!
Sincerely it’s not real at all.
I have a RWD car with 600hp and when I drive your f458, I think to drive a very bad car, too much understeer, not enough grip.
@Alex_V@zugsoft Let me explain about the understeer. If you’re using the keyboard-controlled version, then the behavior is just correct. Remember that there are no driving aids. Steering to the full left-right limits in less than a second pushes the tire over the point of maximum grip causing immediate understeer.
I’ve already explained the understeer perception in detail here:
The explanation includes a quote from Stefano Casillo, developer of Assetto Corsa. It describes some causes on why realistic vehicles are perceived as “too much understeer / too few grip” by some users.
In an open scenario, with a keyboard-controlled car, without convenient references, then you have very little information on how the car is actually performing. In Vehicle Physics Pro the real-time Telemetry data shows some objective information:
In the above picture the Ferrari 458 is performing 1.7 G of lateral acceleration. This is a huge grip, like a supercar with slick tires! Even when the vehicle is under complete understeer, the lateral G is still 1.2 - 1.3.
When you’re using the G27 the force feedback lets you perceive the how the front tires are performing, and you can adjust your driving accordingly. In fact, the car is keen to loose the rear-end and oversteer on if you don’t drive smoothly at high speeds. You can see several oversteer situations in this video, saved by counter-steering (see the video information for shortcuts to the specific positions). However, with the keyboard and no steer aids the driving perception is limited. This will improve in VPP when driving aids are implemented.
@zugsoft about the specifications, the simulated F458 is actually “invented”. It’s not using specifications from the real model. The engine is much less powerful than the real one, as a realistic setup would result in a vehicle almost unable to control without driving aids. Here you can see the engine specifications for the “F458” in the demo:
I recommend you to try the Gymkhana demo (or watch the video). That vehicle has been explicitly set up to be controlled with keyboard / touch screen. Combining throttle with gear up/down allows very nice drifting effects and completely realistic behavior.
The sound is bad, I am agree.
How many .wav sound file do you use for the engine sound?
In my game ProjectRacing I recorded 4 sounds minimum for each car, idle, 2000,4000,6000,8000rpm and rev-limiter.
@zugsoft good point. Actually the engine sound comes from a single audio clip. The main problem to me is finding proper engine audio clips I could work with. Can you suggest a good and reliable source for vehicle audio clips? I don’t mind if it’s a free or paid source.
For my game I recorded sound directly on each car, it’s very hard to find, but in Switzerland it’s very easy to find F458 or others to make some record.
@Edy for sounds you have tons of rFactor mods with loads of samples. Source of the wav files is mostly unknown, but you can contact the authors of the mods if you wish.
Your explanation of the understeer behaviour makes sense, now I need to test it with my G25 (should work, right?)
Just tested this with a DFGT, works fine! The gear is using different buttons as opposed to the gear stick, but this can be calibrated in a settings menu. It wasn’t using the full wheel range either, however this may be a problem with my wheel as I haven’t used it for a while, perhaps I need to recalibrate it via the Logitech controller. The FFB works fine as well. Great job! Looking forward to this one when it’s out.
Great looking package so far. I’ve got some questions about the wheels/tires/suspension.
1: How does the wheel calculate collision, is the a ray cast straight down or can it detect collision in a sphere so to avoid sudden jumping up and down over rough surfaces?
2: Does the tire use width at all, both in collision calculations or grip calculations?
3: Is it possible to use camber and have it affect the grip and handling of the vehicle in both straights and corners?
4: How does the suspension move along its path of travel, does it move up and down in a straight line or is it more realistic by increasing negative camber as it compresses and increasing in positive camber as it extends
I believe in order to achieve a realistic simulation these are pretty necessary. I’ve had a look around various areas and couldn’t find answers so they would be appreciated.
@Alex_V , thanks for the hint on engine sounds! I’ll try that direction.
It should! In fact, I’ve updated the docs to the reflect “Logitech Steering Wheels”, not just “G27”.
I understand your feeling, but let me assert that this denotes an actually realistic behavior for those vehicle settings.
The telemetry shows that the Gymkhana vehicle performs a lateral acceleration in the range of 0.8-1.0 G. However, when steering the maximum performance is applied during a fraction of second only. This is because the steering limits push the tires beyond the point of maximum grip.
Tire lateral grip It depends a lot… a typical road tire will give you 1.0 - 1.1 G… with load sensitivity and all you should get close to 1.0G on a skidpad. A normal road car with 1.0G lateral acc is considered VERY good (ie. the BMW Mini scores a tad less than 1.0G and is considered a very good handling car). Casual players usually find this VERY low… this has lots of possible explanations: - No real experience with real cars… and I mean track experience in a competitive way, not the kind of experience you get being an idiot on public roads. - The result of 1 is that no driving skills are developed… typical sign, Joe-I-Go-Fast goes too fast into a corner, the car will understeer and he turns more into the corner, making understeer worse and going even more wide into the wall. - They are used to other games either arcade a-la PGR or F1 games where cars have huge amount of grip.
I’ll be compiling an Android demo soon. Personally I don’t like tilt control, but a proportional steering via touch control: an horizontal area with a central point and lateral limits. The amount of steering is proportional to the point where you touch/slide at. What do you think?
Great to know that the DFGT works fine, including force feedback! I’ve updated the docs.
I recommend to set the steering wheel range to 460 degrees for matching the visual steering wheel at the vehicle, but you can use any range in your controller. The default for my G27 was 90 degrees only (!). Ideally, the demo should adjust the range automatically, but the crappy Logitech sdk for Unity crashes the demo if I try to do so. I’ll be implementing proper steering wheel support soon.
Thanks for your feedback! Here are the answers and comments:
Wheel collision
Actually VPP uses the WheelCollider for suspension only. Tire forces are calculated by the VPP code. So the collision is a ray cast straight down, and the suspension is vertical along all its travel.
At this stage of the development I need a tight connection among the Unity’s physic engine and the Vehicle Physics Pro code for vehicle dynamics simulation. For this, the WheelCollider is actually the most reliable way for getting the downforce value out of a damped spring connected to a rigidbody. I believe it’s critical to get this part perfectly coherent and completed before adding further improvements.
Note that most high-end racing simulators use a single ray cast straight down at the middle of the wheel for detecting the collision. I’ve verified that’s the way it works in Assetto Corsa, for example. This method provides the best performance and realism. In these games, having a full-3D wheel provides no noticeable advantage, but a huge performance penalty.
Still, I want Vehicle Physics Pro to provide the option for 3D-wheels as well. I don’t want it to be limited to racing games, but also simulations where tires must collide along all their volume. After the first version is released as is now, I’ll be performing a major overhaul of the suspension and wheel simulation. I already have some ideas on how to simulate 3D tires reliably.
Tire width:
No. At this version wider tires can be simulated by increasing tire friction. This is scheduled to improve with the anisotropic friction, where independent longitudinal-lateral friction curves will be supported.
Camber
Camber support is planned to be included in the first release. The placeholder code for the camber is already there.
Variable camber
Will be implemented with the camber support as well. Different values for camber at the limits of the suspension will be supported.