Motion Blur in YafaRay using Blender Node System


I prepared a very small tutorial that will show you how to add motion blur effect to your image rendered in Yafaray. Before we go any further I can tell you that it's best to don't use this method if you have sunlight in your scene, as far as your camera isn't moving, there everything will be blurred (f ex during an animation)


Here you can see the image rendered in YafaRay:



And here is the image after motion blur:





First step is to render the scene in YafaRay. Below you can download the scene I created before I changed the settings in Blender:

Now, you only render the scene in YafaRay and save it as PNG or use Result to Blender button to get the image in Blender Nodes. If you don't know how to get Node editor to work, it's best to check out this page so you understand next instructions


In Node Editor enable Composite nodes and Use Nodes buttons

Go to Render settings panel in Blender (F10) and enable in Render Layers box Vec button


Now you can see that in Node Editor appeared new value - Speed


Lets connect the nodes in the right order. Add new node by hitting space bar and choosing Add → Input → Image. If you choosed Result to Blender option you can find the rendered image by clicking those 2 small arrows next to the Load New button. If you saved your image as png you can load it by hitting the Load New button.

After that you found your image and added to the node system you can add the motion blur effect box, and you find it if you press space bar and choose Add → Filter → Vector Blur


To combine the images and the values you should connect Render Layer box values Z to Z with Vector Blur box as well as Speed. Now to Image value in Vector Blur box you connect image you rendered in Yafaray. And finally output node from Vector Blur to Composite Box.



Before we render our final image we should separate moving objects from static objects (because of sampling problem) according to the Blender manual and you can read it here

(check under Masking)

You can simply select the plane (which is static) and press M button, to move it to the second layer. Make sure that layer 2 isn't visible then.


Now enable Do Composite button in Blender rendering settings and press Render button also in blender settings (or press F12)



And voilà! 

It's our final image, now if you look closer you can see such "lines" what actually is produced by low sample value from blender nodes, if you change the value from 32 to 256 you should get very smooth results, just like the one below: 



As you can see the shadow isn't blurred, that's why i don't recommend you to have sunlamp and motion blur at the same time. If you render an animation with motion blur, you have to save your yafaray animation as video file (best to use blender video sequence editor and render as RAW Avi file, yes, the size will be huuuuge but blender nodes can have some issues if rendering as jpeg avi or ffmpeg).

That's it, i hope you like it and enjoy!

I also give you the link to whole animation i did using motion blur, check it out:


PS: You can download the final blend file here, in case you had problems with the settings: