Sunday, August 19, 2012

chromatic aberration

chromatic aberration

 Most people doesn’t understand What is "chromatic aberration"and struggle to handle it on post production. Here is simple solution to understand and produce good result in post.

First is first..

What is chromatic aberration?

Chromatic Aberration, also known as “color fringing” or “purple fringing”, is a common optical problem that occurs when a lens is either unable to bring all wavelengths of color to the same focal plane, and/or when wavelengths of color are focused at different positions in the focal plane.

Look below image Right side. You can see the red color (fringing) bleeds on the object edges.Its because of chromatic aberration.

 How its happen?

Chromatic aberration is caused by lens dispersion, with different colors of light travelling at different speeds while passing through a lens. As a result, the image can look blurred or noticeable colored edges (red, green, blue, yellow, purple, magenta) can appear around objects, especially in high-contrast situations.

 Types of aberrations.

1. longitudinal chromatic aberration 2. Transverse chromatic aberration

 How to mimic this effect in Nuke?

Create chromatic aberration in Nuke is really simple one. "Transform" "TransformMasked" and "Lens distortion" nodes will help you to create chromatic aberration effect.
(Some gizmos are available in internet)

Transform node will create aberration effect to entire image. See blow example image.
(Here i used scale knob on Transform node to create aberration)

Before and After result:

Using "TransformMasked" tool will allow you to create aberration in specified place on the image.


How to convert this process as a custom "gizmo" in nuke.

step-1. select all nodes expect input and roto nodes. Go to-->Other-->Group and click. Keyboard short-cut "alt+g".

step-2. Once make the group go to "Group1 Node Graph" and give the name to inputs and connect the output to last node.

step-3. Go to node graph and start to add custom knobs by selecting "manage user knob".

step-4. After add custom knobs start to connect the knobs via expression.

           " aberration channel checkbox" to "Transform" nodes disable knob.
             expression - (

           " aberration_value " to "Transform" nodes "translate.x" knob.
             expression - parent.aberration_value
(Here i used X Translation to create aberration, You can use scale Instead of x)

step-5. Export the "Group" as a gizmo.

Add this gizmo in to your nuke plug-in path and enjoy.

scale up and down cornerpin node

global scale up and down cornerpin This script help you to global scale up or down the selected cornerpin. Recently i had situation to ...