How to achieve realistic car damage ?

I want to make a game with realistic car damage, by which I mean when two cars collide, their mesh or submeshes deform in a believable way.

I’m wondering what are the possible ways of achieving such a result ?

My first approach has been to find the points in the mesh that are close to the contact points returned by the Collision object of the OnCollisionEnter function. I was thinking of then trying to find the other points that are contained inside those contact points to find what the actual contact surface was and then push those in along with the other points behind it.

I’m sure there are other ways to do it. This one seems a bit complicated.

Would it be possible to use soft bodies in order to let the physics engine process the deformation ? Or would there be advantages in terms of performance to use a shader to animate / deform the mesh ?

I’m worried my approach will be very CPU intensive as I would like to have several relatively complex car models (it won’t be a simple box) able to process those deformations without it freezing. Ideally it could run on mobile too.

Edit : Also I don’t want to use an asset for this, I’m really interested in how it’s done and would like to do it on my own.

Edy’s Vehicle Physics does have this feature. More info here: Unity Asset Store - The Best Assets for Game Making

Well, a simple way (maybe archaic) to do this is to separate your car in small parts, empty GameObjects to attach a part model. Then, for each part’s model, you make a damaged version of that part. And then, when the collision happens on that part, you replace that part for its damaged version (and maybe the surrounding parts too). To make this more realistic, you can make many levels of damage, it’s up to you. So, for example you can make:

  • FrontBumperNew → FrontBumperLightDamaged → FrontBumperHeavyDamaged

Unfortunatelly, it’s almost the same concept of car customization, and this might be laborious to do because of the amount of models, but it’s an option. Simulating this by mesh deformation should be ideal. Take a look at this topic: