Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsAE TechniquesCreative Cloud DebateFAQ

Time remapping a Camera...!

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook
Mark SniffenTime remapping a Camera...!
by on Mar 6, 2012 at 3:40:34 pm

Hey All,

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:

valueAtTime(

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.

My expression looked like:

valueAtTime(thisComp.layer("PM_013_Stabilized_[0000-0232].tga").timeRemap)

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?


Return to posts index
Reply   Like  

Dan EbbertsRe: Time remapping a Camera...!
by 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();

Dan



Return to posts index
Reply   Like  

Mark SniffenRe: Time remapping a Camera...!
by on Mar 6, 2012 at 6:45:33 pm

Awesome, thanks for the info, that's exactly what I needed to know.

-mark


Return to posts index
Reply   Like  


Nino KapetanovicRe: Time remapping a Camera...!
by 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.


Return to posts index
Reply   Like  

Anthony DupstaRe: Time remapping a Camera...!
by on Jul 22, 2014 at 8:36:34 pm
Last Edited By Anthony Dupsta on Jul 22, 2014 at 8:46:41 pm

Thank you Mark!

I tried making a modification without success. I will do my time-remapping with timewarp sometimes. I set up timewarp to use "source frames" and tried this expression you have. Do you have any suggestion on how to use this technique with timewarp instead of AE's time-remap? Thanks so much, this is very helpful.


Return to posts index
Reply   Like  

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook


FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]