Lens Distortion Workflow in Nuke

Screen Shot 2013-04-07 at 9.33.11 AM.png

When Nuke 6 came out, I was happy to see that they had included a Lens Distortion node.  To my frustration, while it was easy to undistort my footage, it was difficult (impossible?) for me to redistort it.  This is important, because the workflow that I follow requires the ability to redistort undistorted footage.  The workflow is this:

Undistort your footage.  Any lines that should be straight, are now straight.

Screen Shot 2013-04-07 at 9.34.03 AM.png

Render your undistorted footage out.  This now becomes your new background plate.

Make magic. (i.e., camera track your footage, align geo to your background, import any animation, run any simulations, light, texture, render)

Import your rendered footage back into Nuke.  You should now have an undistorted background with undistorted renders.

Apply the inverse of your undistortion to your renders, so they are now distorted the same way as your original background.  You can now disgard your undistorted background plates and just use the original.

Comp.  Render.  Final...  or at least version one.

Screen Shot 2013-04-07 at 9.34.40 AM.png