I’m part of a team working on a sniper game called Republic Sniper.
Being a sniper game, you tend to shoot a lot of people in the game. Usually when you do that, they fall down with holes in them. But, this game’s in the future… and in space. Falling down dead isn’t enough. We wanted certain weapons to disintegrate or dissolve our bad guys in interesting ways.
It’s a mobile game also. Mobile isn’t the limitation it once was, but it still forces us to be aware of performance impact.
I found a few UDK 3 tutorials on dissolve effects and adapted the technique to UE4. Once I got it working as a UE4 material, I expanded it into a material with several parameters:
- a texture to control the dissolve. A vertical gradient, for example would cause the dissolve to start at the bottom and move upward (well, currently depending on UV alignment) while a noise pattern will cause holes that grow larger
- two colors used to control the effect at the edge of the dissolve. A red and an orange color create a burning effect, while a blue-green combination creates something that feels more like electricity
- emission boost - a number used to control how brightly the edge effects glow
- dissolve amount - set from 0 to 1 in a blueprint or from code to make the object actually dissolve. A value of 0 means no dissolve, and 1 means completely dissolved.
It’s still very much a WIP, but the results are promising so far. It runs well on mobile and we can get quite a bit of variation in effect by changing the texture and colors, meaning different space guns can disintegrate different space baddies in different ways. All of the following videos are using material instances based off the same base material:
Here’s a very rough disintegration effect using a proxy bad guy:
An electrical dissolve:
A cloud-noise based disintegration:
A mosaic-based “digital disintegration”:
Noise-based disintegration with smaller noise pattern:
A hair-like image-based dissolve:
A blurred hair-like image gives an effect similar to a Star Trek transporter:
Vertical gradient gives a very even “burning up” look:
And a vertical gradient that’s been distorted a bit, gives a more natural “burning up” look, similar to Assassin’s Creed poster burning:
I’ve got a few details to finalize and a few things I want to improve in the material (including adding an option to use screen-space UVs rather than object UVs), but once I’m happy with it, I’ll probably do a tutorial and give out the base material. I probably won’t give out the specific material instances we decide to use in our game for obvious reasons, but it’s super easy to create new effects with the base material.