Dumb question - tracking footage, having boarder smear problems...

So, just tracking some of my own footage for the first time and as I’m approaching my first test renders, I’ve encountered some weirdness with the boarders of the image - smearing in previews, transparency in render. Obviously, this is not my intended result!

The footage is from an iPhone 4, resolution 1280x738 w/display resolution of 1280x720.

I’ve a horrible feeling I’ve set my proxies up wrongly - and that I should immediately know what the problem is here… but I cannot remember the solution! Can anybody jog my memory?



Maaaan, I’m feeling stupid…

–Rev

Don’t worry; this is not a stupid question! :slight_smile:

The transparency around the render in the smaller view is there because you built an undistorted proxy/render; building an undistorted render (in the node editor, or in the motion tracking view with a proxy) will warp the image and hence change the size, leaving either more or less space at the edges than the original.

The smearing in the larger view is just filling in the same gaps caused by the warping, in a different way than just making them transparent.

Did you mean to build an undistorted proxy and undistort your render? I can see from your proxy settings that you did. Have you already set up the camera settings to get a proper undistorted proxy?

Goddamnit, I knew this was a feature, not a bug. Thanks InverseTelecine!

Did you mean to build an undistorted proxy and undistort your render?

Yeah, basically. I’d selected the iPhone 4 preset and used that to refine with Focal Length, K1 and K2 (though now I see that there’s an option for Optical Sensor, which I think I also have…). My intention was to track to the footage, add some 3D elements and then start playing around with the compositor - but I thought the presets would act to give me an undistorted proxy.

Blast. So when I get back to the computer, does this mean I need to turn on the grid and start manually tweaking the K1&K2 values?

Thanks muchly for your thoughts, IT!

–Rev

No! No, don’t start editing your undistortion settings unless you have other evidence indicating that they’re wrong! If the tracking is working and everything then it’s probably right! A proper undistortion can end up looking like that, especially with an unusual camera like an iPhone. With my Canon Vixia camera it usually undistorts in the other direction so it widens the frame instead of shrinking it like yours did. But whichever way it warps you still need that warping in place to make the motion tracking work! The extra space at the edge is an unfortunate side effect of un-distorting your footage, but in this case it’s really due to the way the iPhone’s camera works; you can’t get rid of it that way without ruining your motion tracking if you’re doing real 3D matchmoving.

What you need to do to get rid of it is to crop your final render. I wish I had a better solution than that, but a cropping node is all you can do. Blame Apple. :slight_smile:

Edit: There is one more possibility: if you’re NOT doing real 3D matchmoving then maybe you could throw that warping out without too many consequences. What type of camera movement is in your shot? Are you walking around / dollying, or just panning around like if the camera was on a tripod?

Walking around - it’s a slow, wobbly handheld truck towards the left until the green building (which you can barely see on the left-hand-side) obscures most of the shot. Definitely not a tripod - I was trying for as much parallax as I could (and, honestly, didn’t have that much hope for this shot - I’m impressed Blender has tracked as much and as well as it has! 1.5ish solve error!)

So. Bahh. Cropping. I guess I’ll throw in a scale/transform node towards the end of the compositor - if there’s nothing else to be done? Honestly, using my phone camera is an act of desperation, but I’m surprised it’s throwing everything off THIS drastically.

Again, many thanks, Inverse Telecine!

Ugh. You shouldn’t thank me; I’m apparently quite stupid. There actually is a very good solution to your problem that I didn’t think of until hours later. If you add a Movie Distortion node towards the front of your node noodle set to “Undistort” to do the initial undistortion, do your compositing of the rendered elements in the middle, then right before your Composite node at the end just put a second Movie Distortion node set to the same movie, but set it to “Distort.” It will warp your rendered elements a little, but it probably won’t be noticeable.

Sorry to mislead you the first time. The reason I didn’t think of it is because re-distorting the footage is not an option for the cameras that I use that warp in the other direction (because then there would be a gap in just the rendered elements at the sides) but in your case where it initially warps in it will work fine. Sigh. I’m not smart.

1 Like

Ahh, no worries! You’ve provided excellent advice, then more excellent advice! I’ll get on this now… then I’m onto Luminence keys. Yikes…

EDIT: A Distortion node at the end set to Distort did the trick - great note. Still had to use a Scale node at 1.004 x&y to remove some residual transparency. Many thanks!

–Rev

If you add a Movie Distortion node towards the front of your node noodle set to “Undistort” to do the initial undistortion, do your compositing of the rendered elements in the middle, then right before your Composite node at the end just put a second Movie Distortion node set to the same movie, but set it to “Distort.” It will warp your rendered elements a little, but it probably won’t be noticeable.

This helped me alot just now and when you think of the whole process it’s so obvious that this is the way to composite it. Thanks a bunch!