Activity › Forums › Adobe After Effects Expressions › Offset first keyframe of layer position
-
Offset first keyframe of layer position
Posted by Jeff Openshaw on March 21, 2011 at 8:56 pmI have a group of pictures laid out on a photo book. I key framed the 1st picture to rotate and rise, then hold for 4 seconds and fade off. I linked expressions for position,scale,rotation,opacity and added valueAtTime(time-7)to each expression. The layers follow perfectly but now are all stacked on top of each other. I’ve only finished 2 pictures and have been trying to figure out what I can add to hold the position of each picture as they are laid out in the photo book and yet still rise up in the correct position. I’m new at expressions but I have Marcus Geduld’s expression book and am determined to learn this crazy language. I know it’s in the book somewhere but any help would be greatly appreciated.
Jeff Openshaw replied 15 years, 1 month ago 2 Members · 8 Replies -
8 Replies
-
Dan Ebberts
March 21, 2011 at 11:51 pmHard to say without seeing what you’re doing and the expressions you’re using. Any way to mock up a short demo of how you want it to look?
Dan
-
Jeff Openshaw
March 22, 2011 at 12:58 amHere is the link of what I made using key frames. Hope this helps. I want to be able to make adjustments to the template without redoing all the key frames if that is possible. Thanks for any help you can give me Dan.
These are the expressions I used. The problem is it is using the same value for the starting position of picture 1. I used the pickwhip from picture 2 to picture 1 and added the valueAtTime by experimenting. The xy position of picture 1 at start is 362.0,242.0 if this helps.thisComp.layer(“picture 1”).transform.position.valueAtTime(time-7)
thisComp.layer(“picture 1”).transform.scale.valueAtTime(time-7)
thisComp.layer(“picture 1”).transform.rotation.valueAtTime(time-7)
thisComp.layer(“picture 1”).transform.opacity.valueAtTime(time-7) -
Dan Ebberts
March 22, 2011 at 1:36 amOK, I can see what your expressions do, what I don’t fully get is exactly what you want them to do differently. The more detail you can provide, the better.
Dan
-
Jeff Openshaw
March 23, 2011 at 12:20 amMy initial goal is to figure out how to create the same project using expressions so I can understand them better, but what I’m hoping for is the ability to change the length of time each picture is displayed for by changing a number in the expression, instead of changing the key frames for 40 pictures. If someone wants their picture to display for 8 seconds instead of 5 seconds then an expression might make that easier. The other part I am trying to fix is to keep all the pictures in their current layout of the photo book before they rise. I was reading today in Marcus Geduld book about using the ease command. Can I use the ease(time…. and add the properties and parameters to hold the photos in their layout position for say 1 second on the photo book and then have the other expression below which makes the pictures rise and fade off finish the expression. I hope this makes sense.
thisComp.layer(“picture1”).transform.position.valueAtTime(time-7) -
Dan Ebberts
March 23, 2011 at 1:56 amI just noticed the link at the bottom of your previous post, but it doesn’t seem to connect to anything.
So you want layer 2 to have motion similar to layer 1, but delayed and starting in it’s own initial position, is that correct? Where is it supposed to end up relative to where layer 1 ends up?
Dan
-
Jeff Openshaw
March 23, 2011 at 7:27 pmThat is correct Dan. I just realized Layer 2 will have to have a different rotation value as it rises but will end up in the same position as layer 1 after layer 1 fades out. They just have a different starting location.This link worked for me and will make things much clearer if you see the video at this link. Thank you for your patience with me.
-
Dan Ebberts
March 24, 2011 at 1:01 amOK – thanks. I think I get it now. I think it’s going to be tricky to do what you want because of the easing and (I’m assuming) different scale factors for the images. If you’re going to be doing a bunch of these with different photos, I think you could set up a template, but I’d be tempted to do everything with expressions and master sliders to control the durations of the move, hold, and fade segments, and use the layer’s index to calculate the time when it should begin its transforms. So the position expression, for example, would ease from the layer’s initial position to the center of the comp, the rotation expression would ease from the layer’s initial rotation to zero, etc. The scale expression might be a little trickier (if the photos are different sizes) in that you might have to calculate the scale based on some multiplier that gets you from the original scale to the size that fills the comp window (which would be different, depending on the orientation of the photo).
Anyway, there are lots of details to sort out, but it might be worth it if you have to do a bunch of these.
Dan
-
Jeff Openshaw
March 24, 2011 at 8:04 pmThanks again for your time Dan. I,m going to stop bugging you for now because you have spent way too much time with this newby. I greatly appreciate your input and was actually wondering if this could be done with just expressions as you suggested. The template picture size or placeholder would probably be one size, though I would like to make templates in 1080p or 720p which would require a different size placeholder or an expression as you suggested. Your website has helped me quite a lot and Trish and Chris Meyers new book has a small but helpful chapter on expressions. I’m only in the 4th chapter now of Marcus Geduld’s book and love they way he explains things. I see you were one of the contributers to his book. When I get better at expressions I’ll be back. I’ll copy your last post so I can reference it later. Take care Dan and thanks again.
Reply to this Discussion! Login or Sign Up