So, I was working on matching a CG element with Live-action footage. I tracked with PfTrack, Used Maya, Substance Painter for CGI, and composited in After Effects.
I undistorted the footage in PfTrack with a lens grid/distortion grid. The footage was from my DJI Mini 2 drone and undistorted using PfTrack's Line method. Value was Low order: 0.000930 and High order: 0.022561. The distortion is very less but I wanted to use the correct workflow.
I haven't seemed to find a proper way of re-distorting the composited footage accurately in After Effects over the years. There are effects by which you can eyeball it, but there's no specific Nuke type node where you can put the value from PfTrack and accurately re-distort.
I tried using
- CC lens (eyeballing)
- Optics compensation (eyeballing)
- Red Giant's Lens Distortion Matcher (very good usage, but not default effect of After Effects)
So, I haven't yet found a way in default effects of After Effects to properly incorporate with PfTrack workflow. But there is a workaround, again with eyeballing.
I exported the undistorted image sequence from PfTrack. Then brought the distorted and undistorted footage in After Effects. Then put the undistorted one on top and set the blending mode to difference.
With the "difference" blending mode, the trick is that if the footage matches, the result will be black.
Now, I applied the "Optics Compensation" on the undistorted footage and tweaked the "Field of View" Value until my result in the viewer is black or very close to black.
Regular Footage (distorted)
Difference mode
Footages don't match, hence some parts are not black.
Optics compensation on undistorted footage.
Now they match, or at least close.
Now that I got the value of FOV, I can apply to my CG elements to redistort them and match them with the actual distorted footage.










