Motion blur speed up by reducing spatial sampling

Get smoother and faster motion blur by rendering many samples at half size and only one at full size. In other words, exchange spatial sampling rate for time sampling rate. If average time per frame is T, so Blender would take 5*T for mblur level 5, this should require aprox. 2.25*T (1*T for full frame plus 5 half size versions at .25*T each, script run takes seconds in any modern computer for normal frame sizes, insignificant when T is probably 5 minutes or more). Level 16 would be (1+16*.25)*T = 5*T with this script vs 16*T for Blender internal.

Experimental script

Script to compose images. Edit first line to point to correct python if needed. Requires convert and composite from ImageMagick 6.x (the first version runs with 5.x). Read it to see the idea step by step. Run at your own risk.

You need a patch to make Blender commandline support timedelta "-D <float>" so you can render sequences with total control over time. It is hacky, but seems to work, and allows to rerender any anim with this method (just remember to disable mblur option and save an extra .blend with size set to 50%, or use scenes for that).

If you want to use the interpolator, you need version 0.3, the interpolator program (slightly modified image_registration.cpp from CImg 1.0.8, CeCILL license, which is GPL like) and CImg library. Just drop the source in examples dir of CImg and build, then make sure the image_registration_mix binary is accesible via $PATH.

Sample input for quick test

Sample input images (motion and DoF at the same time) and more input images (rotation and translation). You can generate your own images if you want, make an anim with N frames. Render all the frames at 50%, and one of them at 100%. If you want to compare to Blender internal motion blur, make sure N is 5, 8, 11 or 16, render all at 100% too, and use "convert fullsize0.png ... fullsizeN.png -average mblur-internal.png" then use the 50% ones and one of the 100% as the script's top comment says.

Demos: comparision vs full spatial sampling, video...

Plain Blender average and the script, but which is which?
Mblur dof (1) Mblur dof (2)

Yet another quiz. Time instants do not perfectly match as I did not check the time computation in depth.
Mblur frame 11 (1) Mblur frame 11 (2)

Now with demo video too. (AVI DIVX 1sec 800*600 490K) Use pause or slow motion all you want, it was rendered with OSA 8 but 5 samples for mblur. One of the above frames is part of this video.

No need of guessing with next images, they were made with this system with image_registration_mix help (small changes over CImg's image_registration).
Mblur dof (w/CImg) Mblur frame 11 
(w/CImg)

The video using cimg results (AVI DIVX 1 sec 800*600 482K) Reused all the rendered files too create it, just needed running version 0.3 of script.

TODO

What about other techs?

Vector based would be faster, but would required extra work to also compute motion vectors for textures or light effects, as well as some time sampling to provide curved blurs and cope with things that appear due rotations. Plain Blender is more correct, but also sharper which does not mean better in some cases.