Realtime deformation of surface on bullet/projectile hit?

Hi guys,

is it possible to do the effect of a metal deforming upon bullet/projectile hit? Say I shoot to a metal armor wall and it’s being deformed (dented) in that particular place. Thanks a lot in advance!

Yes, and there’s a bunch of ways to do it. The easiest one both in terms of setup and performance is probably using decals.

  1. Create a decal material that contains at least a normal map with the deformation. You can also use POM nodes and other textures to make it look more interesting. This is the most difficult part if you’re not artistically inclined, but the marketplace is your friend here.
  2. When bullet hits wall, get the hit result and from there the impact point and the impact normal.
  3. Spawn a decal at the impact point with the spawn transform oriented so that the decals is projected to the wall.
  4. Apply the decal material and resize the decal if necessary.
  5. Pro tip: you can randomize the decal size and rotation in order to create more variation when a lot of bullets hit the wall close to each other.

You are better off setting up and implementing either a voxel system or a procedural mesh system.

That’s a write up on a simple base.

Unless all you need can be done by spawning in a decal. In which case, that’s probably easier (though could kill performance too).

Hey thanks a lot for the breakdown, but unfortunately the decals are not the solution for me cos I really need to deform on a geometry level. Thanks anyway!

Yes voxel system solution looks interesting indeed! Thanks a lot man!