Adobe After Effects has a very effective Camera Lens Blur effect that is capable of efficiently faking DOF (Depth Of Field) and Bokeh visual effects for 3D rendered images and animations, and also animate a fake “Focus-Pull”.
The effect will work best on 32 bit float EXR files, and requires a Z depth render element (pass/AOV) to be rendered with the main RGB image, and supplied as the Blur Map layer.
If necessary, color correct the Z depth image so that the Black to White range will reflect the wanted focus range, and that the closest depth will be Black, blending into White at the furthest depth.
Example of a Z Depth image:
Controls the blurriness
Choose the lens iris shape (number of blades) to design the Bokeh effect
Defines a black & White Depth Layer (Z Depth) where black is the closes point to the camera and white is the furthest.
Blur Focal Distance:
Values of 0.0 to 1.0 will have the black through grey to white areas of the Blur Map remain at focus (sharp)
Highlight > Gain:
Intensify the highlights to create a more dominant Bokeh effect
When you need a solid color source or background for your composite,
The Background node is just that,
It provides either a flat color plate or 4 types of gradients (color ramps).
Set the plate fill type in the Color tab of the node’s settings, and the format (size) in the Image tab.
The quest to find an affordable Node-Based Compositing software
I generally prefer doing compositing for video and 3D animation using Node Based Compositing software.
In the past I worked happily with Autodesk Combustion, until it was discontinued, than I went on working with Autodesk Composite (Toxik) which was also kind-of discontinued, and was installed as part of the 3ds max package, and can still be downloaded for free at Autodesk Exchange.
Autodesk Composite is an awesome compositing technology, and I did a lot of work with it, but the only reason I could afford it in the first place was that Autodesk stopped actively developing it and shipped it as a (rather powerful) ‘goody’ along with 3ds max and Maya. while I can still go on working with Autodesk Composite, Its lack of active development is showing, and I decided to look for a better solution.
Obviously, this discussion can’t be serious without mentioning The Foundry’s Nuke compositing software, which as far as I understand the leading node based compositing solution in the VFX industry today.
But in my small indie studio perspective Nuke is expensive, and for my compositing needs, there’s simply no justification to make the investment.
Another node based compositing software that must be mentioned here is the open source software Natron.
Natron is a very serious development, there’s a growing community around it, and it seams to me that it might be on its way to become the ‘Blender’ of the compositing industry.
I did some tests with Natron 2.1.4, it’s interface is very similar to Nuke’s interface, and from the way the interface is designed, its approach to reading and processing 32 bit float multi-channel EXR file sequences, and it’s current library of available nodes, it’s pretty obvious that this development effort is aiming to be a high end VFX node based compositor.
But for me, there are still some key features missing, like 3D compositing, a vector blur node and more.
* It should be noted that you can add Re-Vision Effects ReelSmart Motion Blur plugin to get vector blur functionality and other features like motion estimation.
Enter Blackmagic Fusion
Fusion is actually not a newcomer in the field of node based compositing.
Initially developed by Eyeon software, it was named ‘Digital Fusion’, than just ‘Fusion’, and in the past decade was heavily developed in the direction of 3D compositing.
If I remember correctly, Fusion was also expensive, I think it cost around 6000 dollars…
But than magic happened..
A couple of years ago Blackmagic Design, which is by-far the most disruptive company in the production and post-production gear industry, has purchased Eyeon software, continued developing it, integrated it into their product pipeline and made it available as a free edition of the software and a more heavily equipped ‘Studio’ edition of the software, that costs 299$, which is absolutely accessible in small indie studio terms.
I downloaded the free edition of the software, and immediately started working with it, getting used to the interface while working on actual animation projects in the past year,
And to cut the long story short, it’s awesome and it’s a very happy ending to my quest for finding a compositing solution, for the following reasons:
Full 32 float workflow.
Robust support for multi-channel EXR file sequences.
Excellent Vector-Motion-Blur and Depth-Blur (DOF) effects,
And many other 3D channel based tools like Volume-Mask, and more.
Very fast GPU accelerated OpenCL processing (render are extremely quick).
In conclusion, my opinion is that it’s a no brainer,
If your looking for an affordable, robust node-based compositing software that’s well equipped for 3D animation needs, Blackmagic Fusion is the answer.
In the Render Settings window, Arnold Renderer tab, under Motion Blur,
Set the ‘Length’ attribute to set the Motion-Blur size.
* the default length of 0.5 means the Motion-Blur will be calculated as a result of a photographic exposure duration of half of a frame duration, or 180 degrees in cinema camera terminology.
Raise the number of Keys to accurately simulate Motion-Blur for very fast rotational motion like helicopter propellers and car wheels.
To generate a Motion Vector (Velocity) AOV (also referred to as ‘Render Element’ or ‘Pass’), in order to add the Motion-Blur effect in a compositing software:
The ‘motionvector’ AOV must be added to the AOVs list in the AOVs tab of the Render Settings window.
Motion-Blur must be enabled in the Motion-Blur part of the Arnold Renderer tab in the Render Settings window.
* Otherwise motion vectors will not be calculated.
In the Diagnostics tab of the Render Settings window, under Feature Overrides, check ‘Ignore Motion Blur’, so Motion-Blur will not be rendered.
Apply an EXtractoR effect on the layer.
* Effects > 3D Channel > EXtractoR
In the EXtractoR effect parameters, Click the RGB Channels to open the EXtractoR dialog box.
Choose the wanted layer from the Layers drop-down, or select individual channels from the B, G, B, Alpha drop-downs.
The Layer will be displayed darker than the original EXR main layer display because it will not be Gamma corrected (linear display).
A Gamma correction should be applied on the result of the composite via an adjustment layer or ‘pre-comping’ the layers and applying it on the containing composition.
* A Gamma correction can be applied using a Levels effect.
* In most cases the Gamma correction need to be with a value of 2.2 (sRGB).
Photoshop CC 32 bit float linear workflow is developing nicely but it still lack some needed basic components, and one of them is a Clamp Color Adjustment, equivalent to a node you will find in any 32 bit float HDR capable compositing software.
Clamping the colors means limiting the britest values to set values, usually 1.0 – white and 0.0 – black, so that no pixels will have higher than white or lower than black (negative) values that can create unwanted results in further operations.
* Brighter than white (super-whites) and negative colors are a feature, and part of linear 32 bit float color processing.
* If there is such an option that I didn’t find please let me know..
In order to clamp the layers colors we convert it to a Smart Object, and convert its color depth to 16Bit internally, so the individual layer gets clamped but the main document remains 32Bit float unclamped (HDR).
From the Image > Mode menu, choose 16Bits/Channel,
And in the Conversion dialog that opens choose ‘Don’t Merge’, or choose Merge and then in the HDR Toning dialog choose Exposure And Gamma mode to keep the image unchanged. The conversion to 16Bit color depth without Merging or Merging using default Exposure and Gamma mode will clamp the colors.
Save the Smart Object.
Return to the main document, the layers colors are now clamped.
I find that Render layers in Blender/Cycles render are a very useful tool for creating any kind of Render passes or AOV’s needed for compositing.
You can easily create render passes with different material overrides, or use the ability to exclude scene layers to create render passes with different light sources or different geometry.
For instance, there’s no built in World Position AOV in Blender but it’s really easy to create one using a Render layer with a World Position shader override (a world position shader can be created using an ‘Input > Geometry’ node)
Or in another case,
I thought you couldn’t have a decent AO render pass (using one scene file) because the AO shader doesn’t have a distance parameter and the Environment AO (that does have a distance parameter) produces a fake GI effect that I don’t want to have in the beauty-pass,
But using render layers it’s actually pretty easy to do because a render layer can be set to not use the environment or not use AO.
Bottom line, the Render layers feature in Blender gives you huge flexibility in creating custom output images or sequences out of a single scene in a single render job (not a single render because each render layer is rendered separately).
On top of all that the output images from all the render layers don’t have to be all packed into one gigantic EXR file,
You can use compositing operations and compositing ‘File Output’ node to determine exactly how the images will be stored in folders and files.
The ‘File Output’ node will actually create folders and store the files in them so output from one render command an be automatically stored within multiple folders.
In short.. AWESOME!!
Critical reminder: When setting up render layers make sure you don’t forget to turn them all on when your done testing, otherwise you’l come back to the studio in the morning and find that not all the needed sequences have been rendered :-\