mip_motionblur

 
 
 

Category: mental ray > Ouput

Shader Family: Output

Output: Color

Related Softimage shader: 2D Motion Blur

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

Name

The name of the shader node displayed in the render tree. Enter any name you like, or leave the default.

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.

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

blur_fb

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.

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

Render Tree Usage

This output shader is applied using a pass shaders 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