Unreal Engine Tutorial: How to Create a Shockwave Pulse Material

The next experiment in this series moves away from post process materials and onto a normal surface material. We're going to create a Shockwave Pulse effect that expands outwards across a plane.

To get this set up, the first step is to set the material domain to Surface, blend mode to Translucent, and shading model to Unlit. Next up are the parameters. I'm going to use two vector parameters, Pulse Origin and Pulse Color, and three scalar parameters, Pulse Time, Pulse Speed, and Pulse Width. I'm setting a default value of 1000 for Pulse Speed and 6 for Pulse Width

Starting on the node graph, we add an Absolute World Position node and mask it down to its XY components since the ring is just expanding horizontally across our plane mesh. We then subtract the XY channels of the Pulse Origin parameter from this and pass the result through a Length node to get the distance from each pixel to the origin.

As shown in the screenshot below, the current radius of the ring is calculated by multiplying Pulse Time by Pulse Speed. We subtract this from the Length output to get the distance of each pixel from the wave front. Next we're going to pass this through Abs to mirror the negative values to positive so the ring appears symmetrically on both sides of the wave front.

The Abs output is then divided by Pulse Width, giving us a 0 to 1 range where 0 is the center of the ring and 1 is the edge. We then pass this through OneMinus to invert it so the ring center is brightest and the edges fade to 0. A Clamp (0 to 1) cuts off anything beyond the ring edges.

Now that we have the ring mask, we can multiply it with the Pulse Color parameter to apply the desired color for the shockwave effect. Connecting it to Emissive Color outputs the visible ring, and connecting the same mask directly to Opacity makes sure only the ring itself is visible against the plane.

On the Blueprint side, we start by creating a Dynamic Material Instance from the shockwave material on Begin Play and applying it to the plane mesh. When the TriggerShockwave event fires, it sets Pulse Origin to the impact world location via Set Vector Parameter Value and starts a Timeline. The Timeline has a single float track going from 0 to 1 over 1 second with linear interpolation, and its Update pin drives Set Scalar Parameter Value on Pulse Time each tick.


For the plane sizing, I'd recommend making it large enough that the ring never reaches its edge during the effect. For example, with a Pulse Speed of 1000 and a timeline running to 1, the ring travels 1000 units from the origin, so the plane should comfortably cover that in all directions from the spawn point. As shown below, the ring expands cleanly across the surface for the duration of the timeline, and you can experiment with the Pulse Speed and Pulse Width values to get the look you're after.

The project files for this and other Absolute World Position experiments are available on Github: https://github.com/RohitKotiveetil/UnrealEngine--WorldPositionExperiments

Comments