Website powered by

Lens Distortion from PfTrack to After Effects; is there any better way?

General / 05 May 2021

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.


I hope someone knows an accurate way to transfer lens distortion data from PfTrack to After Effects. And I hope to see a better effect in AE to integrate with the pipeline.


Report

Arnold Imagplane visibility issues

General / 28 April 2021

So, one problem that I faced last week while I was working on a live-action shot is how to hide the image plane/backplate in alpha but still make it visible in the reflection. I generally work more with Redshift rather than Arnold, so it seems a little weird not being able to make the backplate's alpha 0 in the render.

The backplate is visible in beauty, which is good. But when I check the alpha, it's white where the backplate is. Btw, I am using a plane with matte shadow material to capture cast shadow.

This seems to be a problem. Now turning off the primary visibility of the image-plane doesn't work somehow with Arnold. There is one workaround that is basically writing

 background_visibility 0

in Arnold render settings diagnostic tab.

It solves the alpha, but the whole visibility in color, reflection, refraction is gone.

So, the proper way to do this is in the Image-plane Display mode or the Alpha gain of the Image-plane. Either, you can go for RGB display mode, which will still show the alpha of the HDR as white, or you can make the image-plane alpha gain 0, which will make the alpha 0 where the image-plane is. So, this, eventually solved my problem.




Report