Custom Motion Vector AOV with Motion Vector shader

Login to Follow
  • Film & VFX
  • Games
  • Design Visualization
  • Rendering
  • Shading
  • Arnold
  • Maya
Skill Level
  • Beginner
15 min

Another way to create a motion vector pass is to use a custom AOV and assign an Ai Motion Vector shader to the default 'Shader' attribute.

The scene file can be downloaded here.

  • First select the AOVs tab in the Render Settings Window. Click on Add Custom in order to add a New AOV. In this case we have named it 'mblur'.

Do not name the Custom AOV 'motionvector' as it may cause conflicts with the built-in 'motionvector' AOV.

  • Create an Ai Motion Vector shader. Enable Raw so that the vector will not be normalized. We will need absolute vector's for when we bring the motion vector render into a post-processing package.

Ai Motion Vector shader. 'Encode Raw Vector' enabled.

  • Middle drag Ai Motion Vector onto the Default Shader text.

Middle drag Ai Motion Vector onto the Default Shader text

  • In order to see the custom AOV mblur in the Render View, you must first select the Render View AOV drop down menu.

  • In the 'Motion Blur' settings, Set the shutter_start and shutter_end attributes to the same value. If your Motion blur Position is set on Start on Frame you have to set both to a value of zero. If it is Center on Frame, then set them to 0.5. If It is set to End on Frame then set them to 1.0.

More information about Motion Vectors is available here.

  • Render the scene. The custom AOV mblur should render in the RenderView window.
Beauty AOV Custom Motion Vector AOV

Compositing the Motion Vector

  • Open the rendered EXR file in a compositing package such as Nuke. You should be able to see both the RGB and motion vector.

  • Apply a VectorBlur to the EXR render.
    • Select the Vector Blur node. Change the 'uv channels' to 'motionvector' and the 'mv presets' to 'Arnold'. Enable 'uv alpha' and choose 'rgba.alpha' to prevent the blur from being clipped by the alpha of the Motion Vector AOV.

    Vector Blur node settings in Nuke

The final output should like the image below left. It looks pretty close when compared to the same scene rendered with true motion blur. There are, however, subtle differences. This is due to the limitations of rendering out 2d motion vectors.

Posted By
  • Arnold
  • Maya
  • Rendering
  • Shading
To post a comment please login or register