• This Website Is Not For Sale
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Dirt Rally Damage Model - Overview

Discussion in 'DiRT Rally' started by TemplarGFX, Jan 14, 2016.

  1. I thought I would post an overview on how damage works in Dirt Rally, at least my understanding of it thus far for anyone who is interested

    There are two main parts to the damage system, physical and virtual components. Panels, chassis, engine, wheels (rim) and the driveshaft have both virtual and physical aspects. The turbo, breaks, springs, dampers, tyres and the gearbox are virtual only and the windows are physical only.

    Collisions themselves are based on impact velocity and direction, with damage being dealt in "pulses" (you can see these in slow-motion replays). The initial impact decelerates the car by a certain amount, and if the car is still in motion another pulse is triggered. This continues until the car comes to a stop, or the collision stops occuring (such as grinding a cliff-wall). Each pulse has a collision point in 3D space around the vehicle, and passes the direction and velocity to the virtual and physical damage systems. I am guessing the damage is a scale between 0 and 100 from the way the game is configured by default, as with such low physical damage values for the parts, the very low virtual damage percentages make more sense.

    Physical damage system is configured on a per-car basis. This includes body panels, bumpers, windows, chassis frame, engine and wheel damage. the degree of visual damage determines the effect on car handling. Each component has a total damage value (1-4 for body parts/engine/, 2 for wheels and 4-6 for bumpers/spoilers).
    Visual Damage is done via crushing and deforming. Deformation appears to be done through a movement matrix which controls how far the vertice of the model can move on all 3 axis. Crushing appears to have a preset crushed state, that the game interpolates between depending on the amount of deformation occuring. The modelling itself is impressive, and rivals soft-body damage modelling when you allow extreme damage. Objects in the game world have bounding boxes/spheres/etc which push the vertice away when they collide up to the maximum in the matrix for the part(s). If the maximum is reached, the virtual damage continues but no further visual damage is dealt.
    Only wheels can terminally damage a car, the engine, driveshaft and gearbox cannot be damaged to point they stop working. You can terminally damage them only through wear it seems. By default the engine is extremely durable with maximum damage having the only real effect. Most effects come from the gearbox, driveshaft and wheels.
    The bumpers, spoilers, bonnet, boot and doors have 3 stages of damage. Damage is first applied via deformation, then the part begins to swing. Each part has multiple swing points depending on where the damage was dealt and finally with enough damage they will detach from the car.
    While the game has settings to allow the detachment of boots, bonnets and doors. Almost all of the cars have the feature disabled. I have tried enabling it, but it makes no difference unfortunately.

    Virtual Damage is much more complex and is configured on a per-group basis. There are 5 groups in total : Classic, Standard, Hill-Climb, Modern and RallyCross
    The groups are mostly the same, with the main differences being in the maximum velocity values for the super slow and super fast cars. There are slight differences in engine and gearbox wear for hillclimb and rallycross so they are more durable.

    The car is modeled in a simple bounding-box fashion with drive-shaft (damage, wear), turbo (damage, wear), suspension (damage, spring and damper wear), wheel (damage), Tyre (wear, burst and puncture), Brake (wear), Rear Spoiler (detachment), Front Spoiler (detachment), Radiator (damage), Engine (damage, wear), Exhaust (damage) and Gearbox (damage, gear change, overrev, clutch) zones.

    Damage is dealt according to the point of impact, in a radius 1m wide (by default) from that impact point. If any area of a bounding box lies within this 1m impact "sphere" it triggers damage.
    The amount of damage split between major and minor damage. Unfortunately there is no indication how it is decided. Damage is then scaled between a minimum and maximum impact velocity speed. This is about 10km/h to 150mk/h with greater speeds being capped. Damage can also be dealt from landings off jumps, again with a minimum and maximum impact velocity of 0.8 m/s and 8.5 m/s.
    At the maximum velocity the maximum scale of damage is applied (1.25% for Major Damage, and 0.25% for Minor Damage) and scales down to 0 at minimum velocity. Each component listed above then has a chance of taking minimum damage or maximum damage each time there is a collision (usually around the 0.05%-5% area by default, with the surprising exception of the radiator, at 75%).

    Wear is applied after a certain percentage of damage is reached. At that point, a tiny percentage of damage is applied to the component per meter or revolution depending on the part.

    The gearbox has a vulnerability period after a gear change (around 1/3 of second), and damage effects gear grinding chance, and clutch performance.

    The engine also has temperature related wear, and the radiator has a direct impact on this wear. on-top of that is damage based wear. This is the only way you can kill the engine and trigger a terminal damage screen.

    The tyres can be punctured and can burst. The mass or pressure being applied to the tyre causes these, however the values are a bit of a mystery, as the game crashes if you change them significantly, but it takes alot of pressure to puncture and double that to burst a tyre. I think it is calculated on the tyre wall, rather than the grip itself.
    Once you puncture a tyre, driving over a set speed (about 25kp/h) will wear the tyre down and cause a burst, driving over 400m over this speed will trigger a burst also.
    Burst is when the tyre disappears from the car and all you have is a rim.

    Suspension damage can cause damper loss, spring loss, anti-roll loss and maximum wheel lock reduction. Springs and dampers having separate wear controls.

    Wheels take damage from visual displacement from chassis damage aswell as direct collisions, and can wobble, get out of alignment, or generate rotational resistance. For wheel users it also applies a wobble to the force-feedback as the weight shifts on the car. After taking a significant amount of damage, wheels can detach from the car.

    Brakes wear according to amount of force being applied on them, and reduce their performance up to 50%

    Spoilers and some bumpers effect overall grip on the front or rear of the car when detached. There is no indication visual damage effects car performance

    Its a pretty awesome damage system and a shame its limited so much by default as it works really well at more extreme settings. I wish there were more virtual components simulated, as it seems it could easily handle a few more without effecting performance. But I suppose the repair screen is confusing enough as it is!
    • Like Like x 5
    • Agree Agree x 1
    • Winner Winner x 1
  2. Well written and researched.
    I don't fully understand what you mean. First you say these parts can detach from the car, next you say they don't. Did you mean you cannot detach them manually in the file?
  3. All the different parts share the same damage modelling, which is in the 3 stages I mentioned. However on most of the cars, the bumpers, spoilers and side-panels are configured to detach when damaged enough, but the doors, boot and bonnet are set to swing only. There are a few exceptions though

    Each has a true/false setting for swinging and detaching, I tried setting them to from false to true on the cars, but the parts remain attached anyway or on some cars, they detach immediately instead of swinging first.

    Damage on a part goes from 0 to n (see OP) and in between this is a swing threshold, and a detach threshold. As more damage is dealt to a part it eventually hits or passes the swing threshold and so the part begins swinging. At this point further deformation doesn't seem to occur. Then further damage eventually passes the detach threshold and it comes off. If its set to not detach, it just continues to swing and takes no more visual damage.
  4. OK, thanks. After reading your findings it seems like the cars in DR are build to cope with crashes better than with bad driving ;)
  5. A shame this is! Visual damage for me is the only thing letting DiRT Rally down. I want BeamNG style of damage.

    If your after some feedback on your Ultra Damage mod I believe the min damage needed to a dent needs to be altered because I find driving below 7mph I don't receive any visual damage apart from cracked lights but the lights still work BTW when smashed I don't know if this is a bug.

    Also is there anyway to increase the impactradius variable depending on the speed like say below 10mph the impactradius is 0.35000 20mph its 0.45000 30mph 0.55000 40mph 0.70000 50mph 0.85000 60mph 1.00000 70mph 1.15000 80 mph 1.35000 etc etc (<just an example I don't know how this would be. It would need to be tested etc. I would be willing to test

    Also last question is it not possible for the windows to shatter not just crack?

    I think that's it lol :) Sorry for all the questions.

    PS : Am I the only one that thinks that now DiRT Rally has hit full release its going to be ignored?
  6. Until April, that is ;)
  7. Ole Marius Myrvold

    Ole Marius Myrvold
    JWB 96-13 Staff

    No patches until console release, apparently they still work on the PC version quite hard as well, but will not release anything until consoles.
  8. Ole Marius Myrvold

    Ole Marius Myrvold
    JWB 96-13 Staff

  9. Unfortunately the impact radius is a single value that applies constantly, at its not one of those values you can add a second entry for to expand :(

    I have tried and TRIED to get the damn windows to smash! There are two values, crackCosTheta and smashCosTheta. These values are maximum angular change, and even setting them to a maximum change of 0.00000001 still only causes the windows to crack (really fast!) I even tried setting them to an improper value to see if the windows would smash, but they only cracked on game-start. I guess they disabled it..

    and I agree with you that I don't think this will happen as an official option. I thought maybe it might while it was EA, but now they are moving it to consoles too, its not going to happen. well not in my opinion

    Alot of patience, time and trial and error! I have alot of experience making these types of mods, so I know what to look for, and generally how to quickly test values to determine their function
  10. Ok thanks what tool are you using to open these nd2 files to change all this? Notepad++ just has quite alot as Null I've searched the internet and can't find anything but skin nd2 tutorials.

    I like to compare what has been changed from the original files to your modded ones so I can kinda learn what does what. Thanks for your awesome work so far. Are you done with modding or are you still tinkering with other aspects of the game TemplarGFX? The rocket immersive cam thing would be nice if you polish that for update 1.02