Motion Blur is a common postprocessing effect simulating the fact that for most camera systems ‘light’ gets accumulated over time (instead of just taking discrete snapshots). Fast camera or object motion will hence produce blurred images.
The current Motion Blur implementation only supports blur due to camera motion with the option to exclude certain layers (useful for excluding characters and/or dynamic objects, especially when those are following the camera movement). It can however be extended to support dynamic objects if an additional script keeps track of each objects model matrix and updates the already generated velocity buffer.
|Technique||Motion Blur algorithm. Reconstruction filters will generally give best results at the expense of performance and a limited blur radius of 10 pixels unless a DirectX11 enabled graphics device is used.|
|Velocity Scale||Higher scale makes image more likely to blur.|
|Velocity Max||Maximum pixel distance blur will be clamped to and tile size for reconstruction filters (see below).|
|Velocity Min||Minimum pixel distance at which blur is removed entirely.|
Camera Motion specific:
|Camera Rotation||Scales strength of blurs due to camera rotations.|
|Camera Movement||Scales strength of blurs due to camera translations.|
Local Blur, Reconstruction, ReconstructionDX11 and ReconstructionDisc specific:
|Exclude layers||Objects in this layer will remain unaffected.|
|Velocity downsample||Lower resolution velocity buffers might help performance but will heavily degrade blur quality. Might still be a valid option for simple scenes.|
|Sampler Jitter||Adding noise helps prevent ghosting for the Reconstruction filter.|
|Max Sample Count||Number of samples used to determine the blur. Affects performance a lot.|
|Preview (Scale)||Preview how blur might look like given artificial camera motion values.|
Local Blur simply performs a directional blur along the current’s pixel velocity. Being essentially a gather operation, it is suited for scenes with a low geometric complexity (e.g. vast terrains), large blur radii or when ‘realism’ is not the governing factor. One shortcoming is that it can’t produce proper ‘overlaps’ of blurred objects onto focused background areas. Another one that excluded objects ‘smear’ onto blurred areas.
Reconstruction filters can produce more realistic blur results. The name Reconstruction is derived from the fact that the filter tries to estimate backgrounds, even if there is no information available in the given color and depth buffers. The results can be of higher quality and shortcomings of the Local Blur’s gather filter can be avoided (it can e.g. produce proper overlaps).
It is based on the paper A Reconstruction Filter for Plausible Motion Blur (http://graphics.cs.williams.edu/papers/MotionBlurI3D12/). The algorithm chops the image into tiles of the size Velocity Max and uses the maximum velocity in the area to simulate a blurry pixel scattering onto neighbouring areas. Artifacts can arise if the velocity is highly varying while the mentioned tile size is large.
The DirectX11 exclusive filter ReconstructionDX11 allows arbitrary blur distances (aka tile size or Velocity Max) and creates nicer blurs by using more samples.
The ReconstructionDisc variation uses a different sampling pattern to generate a softer look compared to the standard Reconstruction filters. However, as more samples are taken (it scales automatically to DirectX11), the resulting cost can be higher.
While all of the above filters need a prepass to generate a velocity buffer, the Camera Motion filter solely works on the camera motion. It generates a global filter direction based on camera change and blurs the screen along that direction (see http://www.valvesoftware.com/publications/2008/GDC2008_PostProcessingInTheOrangeBox.pdf for more details). It is especially suited for smoothing fast camera rotations, for instance in first person shooter games.
This effect requires a graphics card that supports Shader Model 3 and depth textures. See the Graphics Hardware Capabilities and Emulation page for further details and a list of compliant hardware.