-
Smooth camera pan – even out the jolts
Hello everyone,
Ok it’s been 6 hours I’m on it, I gotta admit I can’t do it alone 😛 I shot an interesting shot panning vertically from the foot of a mountain to its top. I used a tripod and did my best to get the smoothest motion but it’s not perfect yet.
So here I am in AE trying to even out the speed of my panning. My findings for now:
– I used offset tracking to track two points and combined the paths I get (in a MASTER NULL layer).
– I stabilized my footage on the x axis (when my MASTER NULL moves one pixel to the right or left, my footage moves 1 pixel in the opposite direction) to counterbalance unwanted lateral moves.
– I stretched my footage (scaled to 102%) so that moving it (as explained in the previous sentence) does not reveal the void behind it.
I spent 5 hours to do that, and in the end if I’d have made the right choices since the beginning it takes 5 minutes… ANYWAY!
Now comes the best: I want a SMOOTH PANNING which equals to an EVEN SPEED. I have the movement curve in MASTER NULL and I have my algorithm planned.
Upstream work: computing how much pixels high is the path (y axis only, it’s a vertical panning), divide by total amount of frames to get the amount of pixels per second. Let’s say a fixed point on the mountain moves 3 pixels down per frame.
My algorithm:
1. for my MASTER NULL layer, COMPUTE y_previousFrame – y_currentFrame = y_relativeValue.2. IF (y_relativeValue – 3) != 0 THEN i offset my footage on its y axis by the difference (y_relativeValue – 3).
ELSE DO nothing.To sum up, when the camera moves too fast or too slow, I compensate by moving my footage layer on the y axis. Again, I scaled it to 102% so there’s few risk to see the background.
MY PROBLEM: I need the y_previousFrame value for the previous y position of MASTER NULL, and I couldn’t find a way to get that using expressions. I searched for environment variables but it seems they don’t exist in AE.
MY QUESTION: can you help me with expressions or do you have a plug-in/feature I didn’t find in AE that would have spared me losing a whole afternoon?
Cheers 😛