Slow Motion Explosion Effect

2 minute read

Inspired by Epic’s Unreal Engine 4 “Showdown” demo shown at Oculus Connect, I thought I would try and recreate the slowmo explosion effect they talked about in their presentation. Here’s what I came up with:

This effect uses a simple sphere mesh as base, using a heightmap generated from a noise function for tesselation, and then sets each pixel’s heat based on their distance from the center, using a BlackBody function to get the appropriate color. There’s probably a more elegant or efficient way, but after some trial and error I arrived at this material setup:

ue4-exp-material

Here are the relevant properties of the noise function and the material, respectively:

ue4-exp-noiseprops

ue4-exp-matprops

Since the noise we use to generate the shape is based on absolute world location, all that had to be done to animate it was to move the location of the base polygons. To achieve that, I made a quick and dirty blueprint to scale up the sphere over time and make it move upwards. I found out that to keep the coloring more or less consistent, I also had to scale the BlackBody Bias and BlackBody Temp Max parameters accordingly.

ue4-exp-bp2

ue4-exp-bp1

My default values for the parameter adjustments are to have the Cooling Per Sec set at slightly more than half of the Heating Per Sec value, which makes the material turn from a hot fireball into a cooler cloud of black smoke over time. Another thing you can do to make this a little more realistic is to add some upwards motion to the noise. It’s as simple as replacing the Absolute World Location input to the Noise function with something like this:

ue4-exp-material-pan

Which changes the result to something much more like an explosion, and less like a fireball in space:

And there you have it! Enjoy 🙂 Feel free to poke me on Twitter if you have any questions!

Updated: