2D Motion Blur

 
 
 

| Settings | Alternative Channels | Render Tree Usage

Category: Output

Shader Family: Output

Output: Color

Related mental ray shader: mip_motionblur

The mental ray production Motion Blur shader is an output shader for performing 2.5d motion blur as a post process. The process is referred to as "2.5d" because the shader also takes the z-depth relationship between objects into account.

Settings

Shutter

The amount of time the shutter is "open". In practice this means that after the image has been rendered the pixels are smeared into streaks in both the forward and backward direction, each a distance equal to half the distance the object moves during the shutter time.

Shutter Falloff

Sets how quickly the smear effect fades out to transparent. Essentially, the Shutter Falloff option allows you to tweak the "softness" of the blur.

Shutter Falloff=1.0 (A), Shutter Falloff=2.0 (B), and Shutter Falloff=4.0 (C)

You will notice that highlights are streaked into an almost uniform line in the first image, but taper off much more gently in the last image.

As a general rule, the perceived length of the motion blur diminishes with increased falloff, so you may need to compensate for this by increasing the Shutter length slightly.

Shutter Falloff is especially useful when you want to create a convincing effect of "streaking" over-bright highlights. To do this, set an inflated Shutter length (above the cinematic default of 0.5) and a higher Shutter Falloff. If you want to ensure that the shader preserves and streaks over-brights (colors whiter than white) the color framebuffer must be floating point, otherwise it can be plain RGBA.

For a fairly standard looking blur use Shutter of 0.5 and a Shutter Falloff of 2.0. For a softer looking blur increase the Shutter to 1.0 and the Shutter Falloff to 4.0.

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.

Calculate Gamma

Defines in what gamma color space blur calculations take place. Since mental ray output shaders are performed on written framebuffers, and these framebuffers (unless floating point) already have gamma correction applied, it is important that post effects are applied with the appropriate gamma.

If you render in linear floating point and plan to do the proper gamma correction at a later stage, set this option to 1.0, otherwise set it to the appropriate value.

The Calculate Gamma setting can also be used to artistically control the "look" of the motion blur, in which a higher gamma value favors lightness over darkness in the streaks.

Notice how the low gamma examples seem much darker and how the blur between the green box and red sphere looks questionable. The higher gamma values cause a smoother blend and more realistic motion blur. However, it cannot be stressed enough, that if gamma correction is applied later in the pipeline the Calculate Gamma parameter should be kept at 1.0, unless you really want to create brightness in the blur as an artistic effect.

Pixel Threshold

Sets the minimum motion vector length (measured in pixels) an object must move before blur is added. If set to 0.0 it has no effect, and every object even with sub-pixel movement will have a slight amount of blur. While this is technically accurate, it may cause the image to be perceived as overly blurry.

For example, a cockpit view from a low flying jet plane rushing away towards a tropical island on the horizon may still add some motion blur to the island on the horizon even though its movement is very slight. Likewise, blur is added even for an extremely slow pan across an object. This can cause things to look slightly out of focus, which is undesirable. You can solve this by setting the Pixel Threshold to 1.0 (for example), which in effect subtracts one pixel from the length of all motion vectors and hence causes all objects moving only one pixel (or less) between frames to not have any motion blur at all. Naturally, this value should be kept very low (in the order of a pixel or less) to be anywhere near realistic, but it can be set to higher values for artistic effects.

Background Depth

Sets a distance to the background, which helps the algorithm figure out the depth layout of the scene. The value should be about as large as the scene depth, such that anything beyond this distance from the camera would be considered "far away" by the algorithm.

Depth Weighting

When off, a heuristic algorithm is used to depth sort the blur of objects. Sometimes this algorithm can cause the blur of distant objects to impose on the blurs of nearby objects. Therefore an alternative algorithm is used when Depth Weighting is on. This alternative algorithm causes objects that are nearer to the camera than Background Depth to get an increasingly opaque blur than objects that are farther away. That is, the blurs of closer objects are much more likely to "over-paint" the blurs of farther away objects. Since this may cause near-camera object blurs to be unrealistically opaque, this option is off by default. This mode is most useful when there is a clear separation between a moving foreground object against a (comparatively) static background.

Use Coverage Channel If Available

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.

Alternative Channels

The following options allow you to specify alternative render channels for motion vector, depth, and blur 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].

Motion

Sets the render channel from which to obtain motion vector information.

<None> signifies that the built-in mental ray Motion render channel will be used. The render channel specified must be defined as having a vector data type.

Depth

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.

Blur

Sets the render channel to be blurred.

<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.

Render Tree Usage

This output shader isn't used directly in the render tree; rather, it is applied using a pass's shader stack. For more information, see Applying Shaders to Partitions [Rendering].

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License