Related Softimage shader: Motion Vector (mip)
Sometimes you want to do compositing work before applying motion blur, or maybe you want to use a specific third-party motion blur shader. For these reasons you can use mental ray production Motion Vector (mip_motion_vector) shader to export motion in pixel space (mental ray's standard motion vector format is in world space) and encoded as a color.
Most third party tools expect the motion vector encoded as colors where red is the X axis and green is the Y axis. To fit into the confines of a color (especially when you are not using floating point and a color only reaches from black to white) the motion is scaled by a factor (called Maximum Movement) and the resulting -1 to 1 range is mapped to the color channels 0 to 1 range.
Name |
The name of the shader node displayed in the render tree. Enter any name you like, or leave the default. |
max_displace |
Sets the maximum encoded motion vector length, and motion vectors of this number of pixels (or above) will be encoded as the maximum value that is possible to express within the limit of the color (for example, white or black). To maximally utilize the resolution of the chosen image format, it is generally advised to use a max_displace of 50 for 8 bit images (which are not really recommended for this purpose) and a value of 2000 for 16 bit images. The shader outputs an information statement of the maximum motion vector encountered in a frame to aid in tuning this parameter. If the max_displace is zero, motion vectors are encoded relative to the image resolution. As an example, for an image 600 pixels wide and 400 pixels high, a movement of 600 pixels in positive X is encoded as 1.0 in the red channel, a movement 600 pixels in negative X is encoded as 0.0. A movement in positive Y of 400 pixels is encoded as 1.0 in the blue channel, etc. |
blue_is_magnitude |
When on, the blue color channel represents the magnitude of the blur, and the red and green encode the 2d direction only. When off, the blue channel is unused and the red and green channels encode both direction and magnitude. |
floating_point_format |
|
blur_environment |
Specify whether the camera environment (for example, the background) should be blurred by the camera's movement or not. When on, pixels from the environment will be blurred, and when off they will not. If the background is created by geometry in the scene, this setting does not apply, and the background's blur will be that of the motion of said geometry. This option does not work if the scanline renderer is used. |
pixel_threshold |
The minimum motion vector length (measured in pixels) that an object must move before a blur is added. In practice, this length is simply subtracted from the motion vectors before they are exported. |
Alternative Channels: The following options allow you to specify alternative render channels for motion vector and depth data. The referenced channels must be defined and activated for the pass you are rendering in order for this output shader to be able to use them. For information on how to work with render channels in general, see Render Channels & Framebuffers [Rendering]. For a description of the available render channels and their data types, see the Scene Render Options Property Editor [Properties Reference]. |
|
result_fb |
Specifies the render channel to which the result is written. <None> signifies that the built-in mental ray Main render channel will be used. The render channel specified must be defined as having a color data type. |
depth_fb |
Sets the render channel from which to obtain depth information. <None> signifies that the built-in mental ray Depth render channel will be used. The render channel specified must be defined as having a depth data type. |
motion_fb |
Sets the render channel from which to obtain motion vector information. <None> signifies that the built-in mental ray Raster Motion render channel will be used. The render channel specified must be defined as having a vector data type. |
use_coverage |
When on, uses information in the Pixel Coverage render channel rather than the alpha channel when deciding how to utilize edge pixels that contain an antialiased mix between two moving objects. |
This output shader is applied using a pass shaders stack. For more information, see Applying Shaders to Partitions [Rendering].