ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Problem with The Foundary's Camera Tracker for AE *Z-axis*

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tim Parsons
Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 23, 2013 at 8:58:49 pm

AE CS5.5, Camera Tracker 1.0v6, Windows 7 64 bit, 3.07 GHz i7 quad core, 12 GB RAM, Matrox MXO2 LE, NVidia Quadro 4000.

I have some footage shot from an RC helicopter on a DSLR (converted to lossless MOV because the original codec didn't play well with AE). The shot is a crane-like pedestal/arc/dolly shot.

It tracks great, and motion-tracked text looks awesome.

However... there's a problem with the solved camera's z-axis keyframes. For the first half of the footage (about 8 seconds), the z-axis wavers around -180 degrees. All of a sudden (near 8 seconds) the z-axis spinns around to +180 degrees and stays in the positive for the rest of the track.

This wouldn't be a problem, since the spin happens between keyframes (one keyframe is negative, the very next is positive). BUT, when I turn on motion blur, one of the keyframes puts this crazy circular motion blur on my text as the camera spins 360 degrees on the Z-axis.

OK, fine, I'll just change the first half of the keyframes to positive and all will be well. After all, a 360 degree spin won't be any different, visually. Right?

Well, I copied the negative keyframes to a 3D null, put this expression on it [value*-1], baked the expression to keyframes, then copied the new positive keyframes to the camera, replacing the negative ones.

But when I do that, the 3D elements in my scene shift (rotate on the z-axis) slightly, as if the value was odd a tad. But I've compared the numerical values for the negative keyframes with the values of the positive ones, and they are identical, but for the +/-. Even out to the 10,000th decimal place!! (-179.5459)

So I can't figure out

A) why the camera spun 360 degrees on the Z-axis to begin with, and

B) why the positive keyframes cause my scene to shift shift (rotate on the z-axis) slightly.

It's driving me nuts!


Return to posts index

Cassius Marques
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 12:58:19 pm

you shouldn't set the value to just positive, you'll have to add 360 to it. -179 would be 181. That's why they shift. I goes to negative because its a matter of the orientation conversion (imho).

You can also just try to set the last of the negative keyframe to hold. Thus breaking the oddly motion blur on that frame, though you would also probably lose the smooth motion blur there.


Return to posts index

Tim Parsons
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 1:02:29 pm

360. Not positive. You're a genius.

And I don't want to hold the last negative keyframe because there's more movement after it. The track would get thrown off.

But thanks for the fix! I'll try it and report back.


Return to posts index


Cassius Marques
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 1:18:50 pm

[Tim Parsons] "And I don't want to hold the last negative keyframe because there's more movement after it. The track would get thrown off."

Sure, I understand this is not a real solution. But you said every single frame is keyframed so this would not break the track just the motion blur for that frame (Since AE won't be able to interpolate). Anyway go ahead with the first option.

a=transform.zRotation;
(a <0?a:a+360);


Return to posts index

Tim Parsons
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 1:21:13 pm

Oh, I get it. I thought you were suggesting getting rid of the positive keyframes and just holding the keyframe for the rest of the comp. Silly me.

Well, your 360 vs. negative idea worked beautifully, so far as I can tell. Thanks a ton!

Any idea why it would have done this?


Return to posts index

Cassius Marques
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 1:27:17 pm

A vague idea yes. Its a matter how the gimbal rotation works when the camera has a target. you can't pass the 360º angle. You either have to "invert" the Z axis or the other 2.


Return to posts index


Cassius Marques
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 1:23:03 pm

My code is wrong (not that you actually needed it). It should be ">" for the if check


Return to posts index

Tim Parsons
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 1:27:25 pm

I'm not fluent in expressions. I know enough to get by (wiggle, parenting, etc). Could you explain what's in the parentheses?


Return to posts index

Cassius Marques
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 1:33:42 pm

sure, it's an IF ElSE check.

"a" has the Z rotation value.

It says if "a" is higher than 0 (positive). It will keep "a" as result. Else it will add 360 to "a".


Return to posts index


Tim Parsons
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 1:36:08 pm

So "?" = "then" and ":" = "else" is that right?


Return to posts index

Cassius Marques
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 1:44:47 pm

Yes, that logic is correct. I tend to save some expressions on a text file, cause I can never remember the notation without copying/pasting. =P


Return to posts index

Tim Parsons
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 3:16:42 pm

OK, I'm a dork... I affirmed that it worked, but I had forgoten to switch on motion blur, which is what illuminated this problem to begin with... And it was still spinning! I can't for the life of me figure out why!

Here's the 3-frame progression of the problem with the original z-rotation values.

-179.93


-179.9626


179.9956.

The z-rotation values were changed because of the expression, but the image didn't respond! It was as if the expression weren't even there, even though the final numbers were correct.

So then I tried "Convert Expression to Keyframes" and it works wonderfully (I double-checked this time).

Why?! Grr!


Return to posts index


Cassius Marques
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 5:03:28 pm

Damn it! haha. I guess it can only be because AE can do subframe calculations(for motion blur reasons), and between frame 231 and 232 there are still negative values. Once it hits 232 and the expressions kicks in, values change for positive but with still subframe negative values. Expressions must only affect full frames and not for the n*samples subframes generated for the motion blur computation.

That's my best guess.


Return to posts index

Cassius Marques
Re: Problem with The Foundary's Camera Tracker for AE *Z-axis*
on Jul 24, 2013 at 5:41:32 pm

And just to elucidate, earlier in the morning (here in Brazil) you asked but I didn't had the time to figure out a proper answer to why it happens, so now I'll try and here it goes. Check this image. It shows the expected behaviour of a real camera. Once you hit that 180º angle on the y axis, you gotta turn the camera around otherwise the whole world would turn upside down.

Perhaps the underlying math in the plugin doesn't account the fact that we would interpolate frames, or perhaps it does but it chose that "optimal" solution because of some other expcted behaviour that we would never predict.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]