Radial Motion Blur

Taking a look at how to set up Radial Motion Blur.

Choose your operating system:

Windows

macOS

Linux

Prerequisite Topics

In order to understand and use the content on this page, make sure you are familiar with the following topics:

PerBoneMotionBlurTopicImage-1.png

The standard Motion Blur that Unreal Engine 4 (UE4) supports assumes that a point on an object's surface moves in a straight line from frame to frame, and then uses information from where that point was located during the previous frame to apply the blur effect. This works well for an object moving from one position to another. However, this method produces visual errors when applied to an object that is rotating 180 degrees within a single frame, like a very quickly rotating wheel on a car. In this instance, the Motion Blur looks at a point on one side of the wheel, then assumes it traveled to the opposite side of the wheel in a straight line rather than moving around the circumference.

To help address this issue, a special Radial Motion Blur Material was developed that can be used to make an object look as if it were rotating quickly and then apply a blur accordingly, creating a more accurate result. In the example image below you can see the results of using standard Motion Blur on a rotating object (left) compared with the results of using the Radial Motion Blur Material (right).

MotionBlurError.png

This how-to will walk you through the process of setting up the Radial Motion Blur Material on your own objects.

Required Setup

For the purposes of this guide, we are using assets found in the Content Examples sample project. If you do not already have this sample project, download and install it from the Learn tab in the Launcher.

Click for full image.

We will be building our example in the Materials_Advanced map, which has a working example of Radial Motion Blur set up for us. However, to use the Radial Motion Blur Material in your own project, simply select the MI_RadialMotionBlur Material Instance in the Content Browser , right-click it, and then under Asset Actions choose the Migrate Assets option.

Click for full image.

The Migrate Assets tool will automatically include both MI_RadialMotionBlur and the base RadialMotionBlur Material in the migration. For more information on this topic, see our guide on

[Migrating Assets](Basics/AssetsAndPackages/Migrate)
.

Steps

  1. Make sure the UE4 editor is closed. Inside your Project's folder, open the Config folder and locate DefaultEngine.ini .

    Click for full image.

  2. Open DefaultEngine.ini with a text editor, and in the [/Script/Engine.RendererSettings] section add r.CustomDepth=3 .

    RadialMotionBlur_iniSettings.png

  3. Next, you will need two Meshes : The Mesh that you want to apply the Radial Motion Blur to, and a "dummy" Mesh that will cover it. The dummy Mesh needs to not only cover the object that will be blurred, it also needs to completely cover the space that it will sweep through while rotating, and it should wrap around that swept space as tightly as possible without intersecting with the original object's geometry.

    Click for full image.

    In the example image above, the Mesh that we want to apply the blur to has its standard Material applied, while the "dummy" Mesh is a hull wrapped around it, visualized with a yellow wireframe. Note that it fits closely over the Static Mesh and does not penetrate through it. You may decide to use your own Meshes, but for the purposes of this guide we will be using the assets SM_Wheel and SM_Wheel_Blur , which can be found in the Content Examples project under Content/ExampleContent/Materials/Meshes .

    Click for full image.

  4. Create a new StaticMeshActor by dragging SM_Wheel into the scene.

    Click for full image.

  5. In the Details Panel for this StaticMeshActor, click Blueprint/Add Script to create a new Blueprint based on this Actor. Name it BP_StaticMesh_MotionBlur and save it to the Content/Blueprints folder. The Actor will be converted to your new Blueprint Actor type and the Blueprint Editor will automatically open.

    Click for full image.

  6. Inside the Blueprint Editor , locate the Components Panel and select the StaticMeshComponent for your Mesh. Then, in the Details Panel , locate the Advanced section under Rendering . Set Render Custom Depth Pass to True, then set Custom Depth Stencil Value to 5.

    Click for full image.

  7. Inside the Components Panel , click the Add Component button. Select Static Mesh in the drop-down list to add a new StaticMeshComponent as a child of the base Mesh. Re-name this Mesh " MotionBlur Mesh ".

    MotionBlur_AddMotionBlurMesh.png

  8. In the Details Panel , set the Static Mesh for your MotionBlur Mesh to SM_Wheel_Blur . Rotate it so that it fits over the base Mesh, and ensure that it has the MI_RadialMotionBlur Material applied.

    Click for full image.

Result

With the MI_RadialMotionBlur Material Instance applied, your base Mesh should now appear as if it is rotating very quickly. The image below demonstrates a normal, stationary Static Mesh (left), versus a Mesh with the RadialMotionBlur applied to a dummy Mesh surrounding the base Mesh (right).

MotionBlur_FinalResult.png

Note that you do not need to rotate your base Mesh or Actor in order to achieve this effect. Instead, the RadialMotionBlur Material itself creates the illusion that the object is rotating. The look of this effect can be adjusted using the Angle and RimRadius parameters that are found in the MI_RadialMotionBlur Material Instance.

PerBoneMotionBlur_MISettings.jpg

The following two image sequences show how the visuals of the Radial Blur are affected when you adjust the Angle and RimRadius Material inputs.

This Angle parameter is used to control the intensity of the Radial Blur. The higher it is, the faster the object will look like it is rotating.

The RimRadius parameter is used to limit what will be blurred by the Radial Blur. You should set the RimRadius to match the radius of the mesh that is used for the Radial Blur.

You can use this new Actor type that you've created to make all kinds of objects that use the Radial Motion Blur effect. Change the Static Mesh used for both the base Mesh and the dummy Mesh, ensure that the dummy Mesh uses a Material Instance of the RadialMotionBlur Material, and ensure that the dummy Mesh fits as closely as possible to the area that would be swept by the base Mesh when it rotates.

MotionBlur_OtherShapes.png

Finally, if you want different objects to have different settings, create new Material Instances based on the RadialMotionBlur Material and give them the desired settings accordingly. For more information about how to create Material Instances, see our guide on Creating and Using Material Instances .

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss