Undistort/redistort + camera track

I have been provided undistort and redistort ST maps. I have the python script from the Logik Portal that sets up a batch for that workflow. Awesome!

I was also given an FBX for the shot that has a 3D camera track and some axes in it. If I load that up in an Action over the original plate, things match up great. There are some useful axes provided in there by the matchmover that I’d like to leverage.

However, in the undistort/redistort workflow, I’m unsure of how to incorporate the FBX data. If I load the FBX into the action that is setup for adding things to the undistorted plate, the camera track no longer works right because the plate has changed from the original. Anything I attach to one of the tracked axes slips. I get why. But I want to know what might be a good workflow to deal with this. I want to have my cake (undisorted plate to add undistorted gfx to) and eat it, too (use camera track to help position gfx then redistort).

Is there a way to adjust the FBX data to somehow make it match up to the undistorted plate? Is it a simple output change for the matchmover to provide, depending on the software he/she used? Am I thinking about this the wrong way?

Thanks!
Matt

Are you using the Import Camera python script that’s on the portal? That will import the fbx and then give you the option of creating the st map workflow around it.

Mike

If you’re doing the ST map dance, the plate should be undistorted before tracking and comping, and then all the bits you’re adding should be redistorted before being Over’ed onto the distorted plate. You (or someone) needs to redo the track on the undistorted plate.

1 Like

I used the import st map script first and I just tried the import camera script. Same result.

The steps are in the right place but I think the track would need to be done on the undistorted footage to be accurate in this workflow.

Where did the st map come from? It didn’t come from whoever did the track?

I just saw your reply after coming to the same conclusion. What you are saying makes sense to me. :slight_smile:

Same person who did the track provided the st maps.

Hmm… I think I’m misunderstanding this, I can’t imagine that in the tracking software they generated an ST map, but the track they gave you is still for the distorted plate. Curious.

If I take the camera original plate and pipe it into the back of an action node and then import the FBX, the axes line up to certain points in the shot and it works (when viewing through the camera from the FBX, of course).

If I use the provided st map to undistort the original plate and then add an action node after that step, when I import the same FBX things don’t line up, which makes sense since the image has been resized and bent around by the st map to undistort it.

So, yeah, like you said; it looks like the track is for the distorted original. I was wondering if there was some sort of magic that could happen on my end to make the track line up to the undistorted plate but it’s looking like that’s not the case.

What you have sounds like it would be fine with the way I usually work.

I get the original distorted plate tracked. That’s how the tracking software calculates the lens distortion and is able to generate STmaps to distort/undistort.

In comp, I leave the plate distorted (you lose image quality when you undistort it) - and apply the distortion to whatever CG elements I am comping in the shot.

I hope that helps!

That’s quite often what happens…at least for the tracking pipelines we’ve used both in and out of house.

Most likely the tracking you’ve been given has been corrected for the undistorted plate. The res/aspect of the undistorted stmap should line-up with the tracked fbx output’s camera aspect.

If you plug in the plate as shot and then import the fbx chances are it will line up in the middle and then then drift further to the edges. So undistort first to the correct res and use that as the back of a new action before loading the fbx or create a new action and set it to the correct res manually (and not “use back”) before adding the fbx.

Could be wrong, but it sounds like this is where you’re going astray.

And in continuing to read, if you’re still not seeing shit line up ask the tracker to reexport for the undistorted plate.

Could be a checkbox someone missed.