Electric bullet blast effect that adjusts to mesh shape

Hey guys!

My first post here.
I’m working on a gun that shots “electric bullets” or beams similar to star wars blasters. I have a problem that I can address in many ways but I decided to come here to ask whats the best option. I’m working in Unreal Engine.

I want my bullet to release an energy wave around the area of the hit when it hits the players. But because players can be different shapes and energy blasts waves are pretty big, the effect of the blast has to adjust to the geometry (bumps and holes). Or if they get shot in the arm I want the wave to go around the arm.
https://imgur.com/a/s6GBT7V

Three ways how I would approach this:

  1. In Unity you can set the projection using mesh so you can use a half sphere with texture for this.
    https://imgur.com/a/HiiFh6g
    Can you change decal to be a mesh shaped instead of the default box?
    However this would not work well if they get shot in the arm.

  2. Spawn particle system on Location-> vertex/skeleton in cascade and make them spawn just on the closest 10 vertex with blueprints?

  3. Using Distance Gradient Mask. Like DeepSpaceBanana shared on this blog (DeepSpaceBanana Art - Art). I might be able to achieve this effect in a similar way with distance masks.

What do you guys think?

  1. You can totally use the default decals, but this might not be the cheapest method and they are sometimes a pita to work wtih
  2. That seems complicated
  3. Should work quite well, but might give you issues if you have multiple impacts at once
  4. I like this method mentioned here, ‘Particle Decals’. It’s quite similar to approach 1, but gives you more flexibility as you can control particles more easily than decals:
    https://twitter.com/klemen_lozar/status/952259925756887040
  5. You could use the render target solution mentioned here:
    Rendering Wounds on Characters - Tom Looman

With all these solutions you might get the problem that your expanding ‘wave’ doesn’t follow your geometry, As it expands from your original location rather than following one vertex after the other.
Solving this will most likely be costly as you would need to step through your vertices. Maybe someone more well-versed in tech/math knows how to solve this.

Hi!
Thank you for reply. I managed to solve this similar to this shader:

I had to do some tweaking but it has a similar logic.