CameraSmooth for Nuke
THE PROBLEM
For a recent project I had a long steadicam shot that had picked up some high frequency jittering that needed to be removed. Its a problem that the smoothCam tool in Shake / Final Cut was made for, but I needed a solution that worked in Nuke.
There was already a 3D camera that had been tracked by our matchmove department, so I wanted to create something that utilised the virtual camera, rather then using optical flow or some other heavy process. It also needed to be non-destructive to the original camera track – i.e. I should be able to adjust settings to smooth the tracking, but leave the original data intact.
THE SOLUTION
The solution is straight forward. I create a 3D card that travels at a fixed distance in front of our original camera. The camera projects the input footage onto the card. I then duplicate our original camera and apply a smoothing filter to its values – this uses the “integrate” python expression, and there is a great Nukepedia article by Frank Reuter that explains the process. We then render out the card using a ScanlineRender that is connected to our smoothed camera.
THE NUKE NODE
I wrapped this up in a group that has two inputs – the footage to be smoothed and the 3D camera. I created separate knobs for smoothing the translation and rotation of the camera, as one may need to be smoothed more than the other.
Here is the GitHub link for the node – just select the text, copy it then, then paste it into Nuke.
ADDITIONAL CONSIDERATIONS
If you do not have a tracked camera there is always the Furnace F_Steadiness node available in NukeX, which is similar to smoothCam. However, it uses Global Motion Estimation which is processor intensive.
5 Responses to "CameraSmooth for Nuke"
Hi Richard, thanks a lot for the great tool!
Just realised when using it on circular pan, that it gets freaked out by the sudden jump in value when a camera’s rotation goes from +180 to -180. Maybe there’s a way to fix that? Cheers!
Will do, thanks!
Hi Richard, thank you for sharing!
Played a bit with the GitHub version of the Gizmo, noticed something is broken> the card is linked to Camera5 instead of being linked to the input cam. I would like to make a few suggestions> right now to see the smooth effect over the original curve we have to expose each camera\s parameters. It would be nice to have input and output valueS in the interface, so they are easily accessible. It would be also nice to have different smoothing controls separately for XYZ (using a color input instead of a floating point slider will do). Cheers!