Post-Processes in GameStart B10U5

The B10U5 release of GameStart brings most of the post-processes back to the EGL renderer. Several filters have been greatly improved in the process.

Motion Blur


The new motion blur post-processing filter implements the tradional vector blur algorithm. The velocity for each pixel in the scene is first saved to a texture. The final framebuffer is then blurred using this vector field to produce the motion blur effect. In order to improve the filter output, the geometry parts used to create the velocity vector field are dilated along their velocity.

To illustrate the effects of dilating the geometry in the direction of motion consider the following capture from the Mediecross sample project:


Classic vector motion blur.

This capture was done without dilation and the usual motion blur glitches can be seen:

  1. There is a lot of leakage of the knight character pixels onto the ground pixels. This is because the ground is moving fast from the right to the left so ground pixels are incorrectly grabbing pixels belonging to the knight when they are in its vicinity.
  2. Some staircase effects can be seen on the silhouette of the knight because the vector field is 1/4th the frame resolution.
  3. The motion blur is contained inside the object shapes. Look at the knight's right hand, you can clearly tell that it is moving vertically but the transition from ground to hand pixels is still very clear, the motion trail also looks unrealistically short.

To solve the first issue usually requires a per-sample test when averaging samples along a pixel's motion vector in order to determine whether they belong to the same shape/mass. Not only does this cause a large shader performance penalty but it also causes extra visible glitches at the exact place where the blur is the most important, the transition from one shape to the other. The most efficient sample filtering involves weighting samples using their velocity vector length.

The second issue can be solved by either increasing the vector field resolution, with the associated performance hit, or by blurring it in order to smooth out sharp direction transitions. This method introduces subtle errors which depending on the situation can be acceptable.

The last issue, and probably the worst of all, is solved by the geometry dilatation method. And as it turns out, this method also greatly improves the situation of the two other issues as well. Check that out:


Motion blur with dilated geometry.

While not a capture done in the exact same conditions the effect is now much more convincing. The first issue is solved because the dilated knight geometry covers the ground pixels with its own velocity well outside of the visual geometry boundaries. This takes care of the second issue because the staircase artifact is now happening in a blurry region where it is much less visible.

The final cost of the effect is kept fairly low thanks to the lower resolution vector field. The only remaining issue is that only one blur direction is available for any given pixel in the buffer. This can easily be solved by gathering contribution from the neighbors of a given pixel instead of sampling contributions along its motion vector direction. But the quality improvement is not justified by the large performance cost this method implies.

This post-process is available both in the forward and deferred rendering paths. Both rigid and skinned geometries are supported.

Bloom & SSAO


The improved bloom filter now supports large blur radius with very limited ghosting. The streak variant of the filter also largely benefits from this. The SSAO filter now gives proper results both in forward and deferred rendering. All in all, The forward path is starting to get slower than the deferred one when all available post-processes are enabled. This is due to the increased number of queue pass required to generate the extra post-process inputs. Some work can an will be done on this front in subsequent releases.


Example of a very large bloom kernel.

Bloom streaks & SSAO in the Mediécross title scene.

Note: Be sure to enable these post-processes in the preference panel or they won't show!

Comments

nuverian's picture

Those look just great. Well done!

www.nuverian.net

barros's picture

I LOVE GAMESTART3D... Engine for future. (^_^)