Back to Main Page


Ground Vehicle Effects was the natural successor to helicopter effects, that I never wanted to do... and then I did.

Interesting Fact of the Day:

Did you know that if you have a legitimate version of GTA V but you have an incorrectly setup mods folder, you can get a screen telling you that you have conflicting key bindings?

I had this a couple of days ago, wondered what was going wrong. IIRC it was because I had a version of update.rpf in my mods folder, that was newer than the version in the main folder.

Always be sure to check your config, especially if you're a Steam user because you can mod the original game files on Steam, so it's possible to put an old update.rpf file into the original Update folder, which might cause this screen to appear.

Ground Vehicle Effects (current version 1.5.7)


I kept being asked... "Can you add extra smoke to the cars in the game?" and for a long time, I had no real interest in doing that. But after HE (Helicopter Effects) was finished, I started to think more about it, then one day I thought "How hard would it be to just transfer the effects to wheels instead of rotor blades?" The answer to that is... it all depends on how hard you want to make it.

As I have mentioned before, my maths skills just aren't suited to 3-dimensional thinking... I'm good with numbers until you have to start working with complex relationships between those numbers. So everything in here is a brutal manipulation of basic values to try and achieve the same effect as a proper formula would do and the reality is, it's close but far from perfect. Getting the prototype working actually went together really quickly and was proof that the idea would work, now I just had to refine it. Luckily, I had already a major component of this mod and that was the material code from HE, it just needed some modifications to cater for a slightly different form of vehicle-ground interaction.

Here's an early prototype video with some visible debug info. The height of the line represented the scale and the colour (from yellow to red) represented the lifespan of the particle:

 

One of the things I definitely wanted, was the particles to be affected by the wind. That meant I had to use looped particles, that also meant they had to be carefully managed. I had calculated that the length of the effect I was using was approximately 3300 milliseconds, so I gave each particle a lifespan of 3500ms and when it had expired, it was culled from the particle pool. I also decided on a maximum number of particles and if there was no free particles left, it would cull them on a FIFO (First In First Out) basis. The maximum number that could ever be active was set at 60, so I just had to manage the time between spawns to keep as close to that as possible.

I ruled out NPC vehicles at this point because unlike HE, the number of cars was much greater than the number of helicopters. I was lucky if I could even get 3 helicopters in the same area, so there was no impact from checking if they were in a position to generate effects. There could be 100+ cars though and I didn't have the luxury of a physics system that would naturally generate effetcs as the game did. Every vehicle would have to be tracked and checked for a situation that might generate an effect. It was impractical, so I rejected the idea... at this point anyway.

So now I had to focus on all the situations that could create effects, burnouts, wheelspins, skidding, drifting etc... and that's where for me, things got really, really complicated. The game knows when a vehicle is losing traction etc... but I didn't have access to that. There is no Vehicle.IsSkidding, which is a shame because detecting when the vehicle was leaving skidmarks would have been the perfect solution. There is Vehicle.IsInBurnout though but even that came with a "gotcha". Burnout is a control induced state, not a vehicle behaviour induced state. You activate Burnout state by holding brake and accelerator together, the gotcha is that state is activated at any speed, but the burnout action is not. So foimg 100mph down the freeway, hit accelerate and brake and the game says "Hey, you're doing a burnout"... not good.

But I now had this, which was a mod that could detect (with a big bunch of inaccuracy, various different vehicle states... so things were at least progressing.

 

Enter gotcha number 2 and this was a doozy. I was using the bone locations of the wheels in order to create the particle spawn points but like helicopters, not all vehicles are created equal. Some are FWD, some are RWD, some have three wheels with a single driving wheel, others have three wheels with two driving wheels... and then there are motorcycles.... all of which had tyres that could burst. So every vehicle went through a validation phase when you got into it. That created data that told me how the wheels were laid out, which were the driving wheels and which tyre indexes were in use and if necessary, which bone locations have to use substitute values. So I now had some accurate reference points to work with, which was great.

The particle effects had some quirks of their own though, which were not so great. It was a progressive effect, which means it started small and gradually grew over time. That meant there was a delay between the particle appearing and it reaching a reasonable size in the world. Not all effects create massive clouds of smoke, so everything had to scale based on velocity, that meant that the small velocities create smaller particles, which appeared to take even longer to appear. That was a problem I never really did get to grips with. I guess I should have used a scaling formula that started bigger than needed, scaled negatively to maintain a constant size, then scaled upwards as the particle got further through its lifespan... but I never did. So there is a visible delay between the vehicle interacting with the ground and the effect being significant in appearance, which wasn't what I wanted at all. The other solution is to create an effect attached to the wheel but the problem with that is it can create an effect ahead of the direction of travel, which can look a bit odd.

After getting all the main components in place, it was time for some aesthetic embelishments. The cars could have different coloured tyre smoke, so I added the ability for GVE to do the same. Over surfaces that would just create smoke, like tarmac or concrete, if you were using a tyre smoke colour, the particles would be the same colour. Then I thought "Well if I can make the smoke a colour, then maybe I can change between colours", thus rainbow smoke mode was created. This let you define a range of colours in the ini file and it could either instantly change between them after a certain time, or it would gradually change between them. A bit of a bizarre thing but it looked kinda cool if you were into the whole coloured-smoke thing.

 

That left one final issue and this was one that reared its ugly head in HE... the Rockstar Editor. Looped particles were useless, they just didn't work, so the solution I decided on, was a second particle system that could be switched in if you wanted to record the effects for the editor. There was no wind, no scaling, no changes of any kind after the particles were spawned. But you had a set of particles that would at least appear in the editor and not disappear completely after a couple of seconds of burnout. Like the helicopters though, the particles weren't great in the editor and also like the helicopters, you had to use the Pause & Jump trick to get decent screenshots.

One final video to demonstrate the Pause & Jump trick for GVE.

 

Sadly, this is one mod that breaks with each GTA V update and that unfortunately means that anyone who doesn't have the latest version, can no longer use this mod. Of course, if you are using the launcher bypass mod, that's not a problem as you don't have to stay on the latest version of the game. I do most modding in 1032, with 5 other game versions to test with, including a fully up-to-date version to keep mods running.

As you can see from the Vehicle Effects Pool page, this mod has now extended to NPC vehicles by way of assignment. You pass vehicles to the VEP and those vehicles will generate particle effects. It's not as flexible as allowing any vehicle to have them but it's far more practical than just testing every vehicle nearby just in case one does a minor burnout.