Fake Depth of Field

This is a quick method of faking camera focal blur. Its not exactly accurate but gives good results for a heavy workflow project that could take a lifetime to render with conventional depth of field effect of any software. With this principle you can get nice blury backgrounds or defocus near objects. In this example i made a little ufo flying around a field the objective of the tutorial is to blur the mountains in the back with a smooth transition towards the front in adobe After Effects(Æ).

First the initial movie is rendered in the 3d software. This is the finished product but without focal blur this we will do in Æ. If you like to render several passes like specular, diffuse, reflection, etc... first composite all of those passes into one video so you'll only have to worry about the DOF.

Second step is to use the zdepth channel or fog if you dont have multy pass renderer. In the fog case I applied a totally black material to all the objects in the scene. Add fog, notice that it is totally white.

This effect creates a simple black and white mask (like a zdepth channel) that we can use in Æ to blur. Also remove all the lights in the scene. The white parts are the ones that will be blured and the black wont. The smoth grayscale transition is the soft blur that tells us how far an object is. the more contrast you apply to the fog the less subtile the effect will be. We call this one z deth.

Create a new project. In it a new composition that matches exactly to the frame rate of your videos and the size. Also import the two rendered videos. The final movie and the zdepth movie.

Place the movies in the composition (final and zdepth). Its important that both are in the exact same place and start in the exact same time.

Here in the time line starts the good stuff. Notice that ufo.avi was placed twice. this is necesary to acomplish the effect and to use the zdepth mask. The location of the zdepth layer is not important because itll be invisible at the moment of rendering the finished effect. I repeat: is very important that all the movies start at the same time. Also i colored each layer to difference their function in the effect:

Fig 06 d_01.gif

Fig 06 d_01.gif

Light gray layer ufo.avi - this layer wont have any effect. itll be the one that remains focused.

Fig 07 d_02.gif

Fig 07 d_02.gif

Dark gray layer - Doesnt matter its location. It will be hidden all the time. Only for use as mask source.

Fig 08 d_03.gif

Fig 08 d_03.gif

Orange layer - this layer will have all the effects applied to it. It's very important that this one remains on top of the others at all times.

Select the Orange ufo.avi layer and go to the menu/effects/chennel/set matte. This will add the set matte effect to this layer. Also once you are there go to menu/effects/blur & sharpen/gaussian blur. Now we will set this effects properly.

Use this settings in the effects of the orange ufo.avi layer. The amount of blur is up to you. but dont exeed the blur amount because it wont look blurred, it will look washed out.

Thats it! now go to menu/composition/make movie... and render the final product in the file format you like. Remember to set all effects active.

Hope you liked this tutorial. If you want to add blur to the objects near the camera just invert the fog render. play with the levels to tweak the focus.

Fetching comments...

Post a comment