Adding Motion Blur Using VectorBlur

Nuke’s VectorBlur node generates motion blur by blurring each pixel into a straight line, using the values from the motion vector channels (u and v channels) to determine the direction of the blur. Compared to generating motion blur using the ScanlineRender node’s MultiSample controls, this is less accurate but faster to render.

You can create the necessary motion vectors for use with VectorBlur in several ways:

Use the ScanlineRender or RayRender nodes. This is usually more accurate than using a MotionBlur3D node (described below), and works well with both static and moving cameras as well as both linear and non-linear camera movement. See To use VectorBlur with ScanlineRender or To use VectorBlur with RayRender.

Alternatively, if your 3D scene is static or nearly so and the camera movement over the shutter time is nearly linear, you can also use the Filter > MotionBlur3D node. However, note that MotionBlur3D only uses camera information to produce motion vectors. If you have moving objects in your scene but the camera is static, MotionBlur3D isn’t able to produce any output. See To use VectorBlur with MotionBlur3D.

Several third-party 3D applications can also produce motion vector information as two-channel, floating point images that you can use with VectorBlur. If possible, you should unpremultiply these images. See To use VectorBlur with Third-Party Motion Vectors.

To use VectorBlur with ScanlineRender

1.   In your 3D scene, open the ScanlineRender properties and go to the Shader tab.
2.   Make sure motion vectors is set to one of the following (not off):

classic - Render motion vectors the classic (pre-Nuke 6.1) way. This option is only provided for backwards compatibility, and isn't always accurate.

velocity - Store the velocity of every single pixel in the motion vector channels (pre-Nuke 7.0 way). This option is only provided for backwards compatibility. In order to have the same behavior as Nuke 6.3, set samples to 1.

distance - For every pixel, store the distance (in pixels) between samples in the motion vector channels. This is the recommended option that usually produces the best results. It also allows the VectorBlur node to produce the impression of curved motion blur by interpolating multiple samples of linear motion.

3.   Use motion vector channels to select where to store the generated motion vectors.

If you view the channels you selected, you should see they now contain motion vectors.

A render of a 3D scene.

Motion vectors produced by
ScanlineRender.

4.   On the MultiSample tab, leave samples set to 1. You can increase this value later if non-linear movement cannot be approximated sufficiently well using VectorBlur’s linear approach.
5.   Select Filter > VectorBlur to insert a VectorBlur node after ScanlineRender.

A node tree with ScanlineRender and VectorBlur.

6.   In the VectorBlur properties, use the channels dropdown menu to select the channels to blur.
7.   Select the motion vector channels from the uv channels dropdown menu. These should be the same channels as the channels you chose to create in step 3.
8.   Set the mv presets dropdown to set which renderer format to apply to the motion vectors. Each preset contains a scale and offset specific to the renderer, so that the vectors are in the format expected by Nuke.
9.   Use the blur uv dropdown to blur the motion vectors themselves, before blurring the image, to smooth the results between regions with very different motion. Choose either:

uniform - applies a small uniform blur to soften edges in the UV map, or

linear - applies a linearly-weighted blur to blend between regions with different motion. This has a stronger effect than the uniform option.

Tip:  The uniform option can be used to create blur similar to pre-Nuke 10 results.

10.   Set shutter offset to 0. This means the shutter opens at the current frame.
11.   Select the blur type using the dropdown.
12.   To adjust the amount of blur, adjust the motion blur controls.

The original image.

Motion blur produced by
VectorBlur.

To use VectorBlur with RayRender

1.   In your 3D scene, open the RayRender properties and go to the AOVs tab.
2.   Enable output AOV and then use the motion vector dropdown to select where to store the generated motion vectors.

If you view the channels you selected, you should see they now contain motion vectors.

A render of a 3D scene.

Motion vectors produced by
ScanlineRender.

3.   On the MultiSample tab, leave samples set to 1. You can increase this value later if non-linear movement cannot be approximated sufficiently well using VectorBlur’s linear approach.
4.   Select Filter > VectorBlur to insert a VectorBlur node after RayRender.

A node tree with RayRender and VectorBlur.

5.   In the VectorBlur properties, use the channels dropdown menu to select the channels to blur.
6.   Select the motion vector channels from the uv channels dropdown menu. These should be the same channels as the channels you chose to create in step 2.
7.   Set the mv presets dropdown to set which renderer format to apply to the motion vectors. Each preset contains a scale and offset specific to the renderer, so that the vectors are in the format expected by Nuke.
8.   Use the blur uv dropdown to blur the motion vectors themselves, before blurring the image, to smooth the results between regions with very different motion. Choose either:

uniform - applies a small uniform blur to soften edges in the UV map, or

linear - applies a linearly-weighted blur to blend between regions with different motion. This has a stronger effect than the uniform option.

Tip:  The uniform option can be used to create blur similar to pre-Nuke 10 results.

9.   Set shutter offset to 0. This means the shutter opens at the current frame.
10.   Select the blur type using the dropdown.
11.   To adjust the amount of blur, adjust the motion blur controls.

The original image.

Motion blur produced by

VectorBlur.

To use VectorBlur with MotionBlur3D

1.   In your 3D scene (which should be static or nearly static), open the ScanlineRender properties, go to the Shader tab, and set motion vectors to off.

This tells ScanlineRender not to produce motion vectors, which is what you want if you are going to use MotionBlur3D to generate the vectors.

2.   Select Filter > MotionBlur3D to insert this node and connect it to the ScanlineRender node’s output.
3.   Connect the rendering camera to the cam input of the MotionBlur3D node. Note that this has to be a moving camera. The camera movement over the shutter time should be linear or nearly linear.
4.   In the MotionBlur3D properties, use Output UV to select where to store the generated motion vectors.

If you view the channels you selected, you should see they now contain motion vectors.

5.   Select Filter > VectorBlur to insert this node and connect it to the MotionBlur3D node.

A node tree with MotionBlur3D and VectorBlur.

6.   In the VectorBlur properties, select the motion layer from the uv channels dropdown menu.
7.   Use the blur uv dropdown to blur the motion vectors themselves, before blurring the image, to smooth the results between regions with very different motion. Choose either:

uniform - applies a small uniform blur to soften edges in the UV map, or

linear - applies a linearly-weighted blur to blend between regions with different motion. This has a stronger effect than the uniform option.

Tip:  The uniform option can be used to create blur similar to pre-Nuke 10 results.

8.   Select the blur type using the dropdown.
9.   To adjust the amount of blur, adjust the motion blur controls.
10.   To adjust the length of the blur, adjust the Shutter setting in the MotionBlur3D Properties panel.

Low Shutter value.

High Shutter value.

To use VectorBlur with Third-Party Motion Vectors

1.   Select Filter > VectorBlur to insert a VectorBlur node after a 2D image that contains motion vector channels.
2.   In the VectorBlur properties, use the channels dropdown menu to select the channels to blur.
3.   Select the motion vector channels from the uv channels dropdown menu.
4.   Set the mv presets dropdown to apply the presets associated with the selected renderer's default settings, if present.
5.   If your motion vectors have been premultiplied, check uv alpha and specify the channel used to premultiply the image.
6.   Select the blur type and the required amount of blur using the motion blur controls.