Time remapping a Camera...!
by Mark Sniffen on Mar 6, 2012 at 3:40:34 pm
First post here, love this place, sadly I never usually get to ask questions because I find them already solved! =) This post involves a solution and a question...about how time is handled in the After Effects world. Maybe someone can help me and maybe other people can benefit from what I've done.
I hope this makes sense.
So I have a shot that I've run through Syntheyes, and have imported the camera solve data into after effects. I add in my text layer floating in 3D space, and animate it to appear in a nice way. I precomp this layer and do some crazy time-remapping...and then realize the timing of my text animation is completely messed up. I could time-remap the footage, and THEN run it through syntheyes to get the camera solve, however the director will probably want the time-remapping changed several times before he likes it, so that workflow would be cumbersome, as it would involve re-adding, position, and orienting any of the 2.5D objects in After Effect's 3D world several times.
Solution? In a nutshell, I need to time-remap the After Effects Camera in the Comp while I Time-Remap the footage:
In my comp I have:
1) The After Effects camera, imported from Syntheyes, which has position and rotation keyframe data for Every frame.
2) The original footage, to which I turn on Time Remapping
3) an After Effects Text layer in 3D space, aligned to some part of the scene to act as reference
Alt-Click on the position for the Camera and type:
then pick-whip the "Time Remap" value from the footage, and end with a
Then just copy and paste this expression to the X, Y, and Z rotation values of the Camera.
Initially I didn't think that I could directly reference the Time Remap data because it looked to be timecode (7:22), not simply frames (232) or simply seconds (7.74 ala Seconds.Percent of a Second). I was confused for a while because I always thought the "time" expression used simple frames, e.g. 1, 2, ....232, 233, etc. BUT If I add a slider control to anything and put "time" in as an expression, it shows up as Second.Percent Of Second.
So I ended up creating a Slider Control and manually setting a keyframe at 0.00 (seconds) to match the 0:00 (timecode) keyframe of the Time Remap, and then setting a keyframe to match the last frame, 7.74 (seconds) to the 7:22 (timecode). By adding and sliding keyframes on the Time Remap and the Slider Control together, I would keep the "timing" the same. I then linked my "valueAtTime" to my Slide Control and voila I was set.
So then I woke up this morning and had the brilliant idea to just try linking the valueAtTime expression directly to the timecode value of the TimeRemap....and it worked.
So...how does time actually work? What value is after effects actually using under the hood? Seconds.Percent, Seconds.Frames, Frames, etc....?
Or is After Effects just smart enough to know what you're trying to do and it changes depending on what is linked where?
Maybe I should just be happy that my expression worked.... =) ...am I overcomplicating things?
Re: Time remapping a Camera...! by Dan Ebberts on Mar 6, 2012 at 4:52:23 pm
In expressions, time is always in seconds. So in a 30fps comp, frame 0 is at 0.0 seconds, frame 1 is at 0.0333333333333, and so on. The expression language does include methods to convert between seconds and frames: timeToFrames() and framesToTime();
Re: Time remapping a Camera...! by Nino Kapetanovic on Nov 5, 2012 at 4:42:07 pm
Hello! I had the same problem and oddly enough came up with the same solution, however I can't seem to get a smooth camera motion from this because value at seems to 'jump' to a given keyframe of the camera. While the video is frame blended and flows smoothly, the tracking points jump every few frames depending on how much the original footage is stretched. Is there an alternative way to time remap a camera?
I've tried putting the camera by itself in a separate comp, time remapping the comp then linking the values of that camera to a different one, but I still cant seem to get time remapped values.