Combining mblur and vector blur

I’ve been messing around with combining mblur and the vector blur in the compositing nodes together.

Here are the results:

5-sample mblur:
http://www.cessen.com/storage/temp/only_mblur.png

vector blur:
http://www.cessen.com/storage/temp/only_vector.png

5-sample mblur + vector blur:
http://www.cessen.com/storage/temp/mblur_plus_vector.png

The 5-sample mblur on its own is obviously pretty bad. The strobing is very prominent.

The vector blur is better in terms of being smooth, but it has some pretty nasty artifacts. Firstly, the top and bottom corners are very sharp. Secondly, even though the over-all blur is smooth, there is still the impression of 2-sample strobing. The second effect isn’t always prominant, depending on the scene, but when it is it ruins the otherwise smooth blur effect.

When we combine the two (using the vector blur to smooth out the mblur) we get a compromise. It’s still far from perfect, but especially in motion it is superior to either of the others. There is still some strobing, but it is not nearly as obvious as with just mblur. And you don’t have the problem of the top and bottom corners being perfectly sharp.
Aside from the minor strobing, it’s main problem is that is looks sort of messy, so it’s not a good solution for stills. But in motion it’s not a problem. And it’s much faster to render than 16-sample mblur, especially on complex scenes.

Here is an example of it used in an animation:
manhole.mp4 (1.4MB)

I rendered this animation using 5-sample mblur, plus vector blur. Notice how there is almost no strobing at all. It only starts to show up at the very end with the super fast motion of the fall.

This method obviously isn’t a solve-everything solution. In some cases it has artifacts of it’s own (there is precisely one frame near the end of the above animation where there are nasty artifacts around the hands), and since it uses vector blur it won’t work with transparents objects moving in the foreground. Also because it uses vector blur, it won’t work for objects moving on a strong arc (i.e. no spinning propellers).

However, despite its drawbacks I think this is a cheap and fast way to get pretty good motion blur under most circumstances.

Here are some stills from the animation, comparing the methods.

First with plain 16-sample mblur, which will be our reference for quality:
http://www.cessen.com/storage/temp/1_mblur_16.png
Render time: 31.8 seconds

5-sample mblur:
http://www.cessen.com/storage/temp/1_mblur_5.png
Render time: 8.6 seconds

Vector blur:
http://www.cessen.com/storage/temp/1_vect_blur.png
Render time: 6.1 seconds

5-sample mblur + vector blur:
http://www.cessen.com/storage/temp/1_mblur_plus_vect.png
Render time: 12.9 seconds

Keep in mind that this is a very simple scene, and more complex scenes would likely have a smaller difference in the render times of the 5-sample-mblur and 5-sample-mblur-plus-vector-blur. That’s because vector blur is a post effect and therefore in theory doesn’t take longer with greater scene complexity, so the time it adds to the render time will become less and less significant as the 3D render time itself increases.

Anyway, this test appears to be quite successful. Although the quality isn’t up to par with the 16-sample mblur, it’s a lot better than either the vector blur or the 5-sample mblur alone. And the render time is quite reasonable.

Why five samples? increasing that will greatly improve the result!

I tried this before and the combination of the two weilded better results than either one on it’s own.

just wanted to pipe in on this. when using mblur and vecblur together, I find that turning down the blur amount on the vecblur gives a much better result. Basically, mblur covers the range of the blur and vecblur smooths it out. Too much vecblur makes the images very flat. eg: take a rounded object and compare different vecblur amounts. With more vector blur the highlights quickly dissapear and you lose the feeling of roundness.

Mblur 5 samples + Vecblur tuned down to 0.20-0.30 is very close to 11x and 16x mblur while being faster.

More than 5x mblur with vecblur seems to give diminishing returns for most cases (at least in my limited tests) except in side by side comparisons.

Another thing I noticed about vec blur is that relatively fast moving objects against dark backgrounds dissapear a lot more than without vecblur. Enough to be distracting in some cases though I am sure there are ways to compensate for this.

like cessen said, messier and you lose some definition, but can be much faster than high samble mblur. In any case, having more options is almost never a bad thing.

another note,

using mblur in conjunction with vecblur is also helpful since vector blur on its own doesn’t blur shadows.