ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Parenting a single keyframe to a null: Possible?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David FuchsParenting a single keyframe to a null: Possible?
by on Apr 30, 2013 at 4:02:56 pm

This is sort of a query on technique. I have a project where I'm zooming out on a diagram. Apologies if the scenario is hard to follow.

Right now I have file icons keyframed moving from a central point (A) to computer abstractions (at point B). As the camera zooms out, these computers shift so more workstations can fit on screen. Ideally, what I would like to do is keep point A on these icons' keyframes the same while shifting point B to follow the camera movement and the abstractions.

Probably the simplest option would just be to precomp the file icons looping and then rotate that comp, but then the files won't be properly oriented. The current workaround I'm using is keeping the file icons static and parenting them to a null, which has the A-to-B cycle keyframed manually. Downside is that this doesn't let me have the files keep streaming while the computers shift, because the B keyframe can't move without messing with the A keyframe via normal pick whip expressions.

So hopefully a simpler phrasing of my question: is there an expression to parent only a single keyframe to another layer's position? I was hoping Dan Ebbert's guide to setting up pistons would hold some insight but it doesn't seem to apply to my scenario. If the answer's no I'll proceed manually, but for the amount of repeated animation I'm doing knowing in the future there's a way to speed things up would be great. Thanks.

Return to posts index

Dave LaRondeRe: Parenting a single keyframe to a null: Possible?
by on Apr 30, 2013 at 5:07:56 pm

As I understand the description, I'm afraid not. You need two keyframes for animation, and you specify one.

I don't see the need to even HAVE a camera. As I understand your dilemma, you start tight on a computer, with something on the screen. At the end of the move, the single computer is in a very wide shot, with a bunch of other computers joining it.

Why not start at the END of the move? Set up your ending layout of images, parent them all to a null, and set a position keyframe on them. Go to the beginning up the move, scale up the null, and reposition the parented layers to taste.

No 3D. No Camera. Much easier.

Dave LaRonde
Former Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA

Return to posts index

David FuchsRe: Parenting a single keyframe to a null: Possible?
by on Apr 30, 2013 at 5:10:08 pm

To clarify: there *are* two keyframes; its initial position at A, and then moving to B. My question is if there's a way to script it so that *only* keyframe B is affected by a parent expression.

Your idea about starting from the end is a good one for another project I'm boarding though! :)

Return to posts index

Dave LaRondeRe: Parenting a single keyframe to a null: Possible?
by on Apr 30, 2013 at 5:13:05 pm

Well, I never use 3D or a camera unless it's absolutely necessary. I don't start thinking 3D and think how to make it 2D. You can do a lot in 2D that looks just like 3D, but with far fewer complications.

Dave LaRonde
Former Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA

Return to posts index

Walter SoykaRe: Parenting a single keyframe to a null: Possible?
by on Apr 30, 2013 at 5:52:35 pm

I think I get what you're going for.

Let's create two nulls, Point A Null and Point B Null.

On your file icon layer, add two Layer Controls effects and one Slider Control effects. Rename them by selecting one in the Effects Control panel and pressing enter. Rename the first layer control "Point A"and the second layer control "Point B". Rename the slider control "Completion".

Alt-click the Position property stopwatch for your file icon layer, and paste the following expression:
linear(effect("Completion")("Slider"),0,100,effect("Point A")("Layer").transform.position,effect("Point B")("Layer").transform.position)

In English, this says "As the value of Completion's slider goes from 0 to 100, interpolate linearly from Point A's position to Point B's position.

In the Effects Control window, select the layers you want for Point A and Point B -- the central point and the workstation respectively, or Point A Null and Point B Null in my example above. Animate the Completion slider from 0 to 100 to move the file icon from the position of Point A to the position of Point B. Move the nulls around however you like.

If you want to get really snazzy, we can have multiple files follow the original. Add another Slider Control to your file icon and rename it "Time Offset". Set it to some small value, like 0.1 or 0.2. This number represents the number of seconds that each additional file will delay before following the leader.

Now add a new file icon to the scene, directly below your original file icon in the timeline panel. Add a Layer Control effect and rename it "Leader Layer". Select your original file icon layer here. Now, alt-click the position stopwatch of this new layer and enter the following expression:

effect("Leader Layer")("Layer").transform.position.valueAtTime(time - effect("Leader Layer")("Layer").effect("Time Offset")("Slider") * (thisLayer.index - effect("Leader Layer")("Layer").index))

In English, this says set my position to whatever the Leader Layer's position was at the current time minus the product of the Leader Layer's Time Offset value and the difference between my layer number and the Leader Layer's layer number. In other words, copy the leader's position, but offset it in time according to the Time Offset value and the number of other layers in between me and the leader layer.

You can duplicate this layer however many times you need to animate multiple files flying over.

These two kinds of layers will work in sets. Copy/paste and configure the main "Leader Layer" for each workstation, and copy/paste/configure/duplicate as many "Follower Layers" below each leader layer as you wish.

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events

Return to posts index

Matteo Di LuccaRe: Parenting a single keyframe to a null: Possible?
by on Nov 1, 2013 at 11:59:07 am

Hi Walter,

Just to let you know that the solution that you came with here works perfectly. Thank you so much for having shared. It will save me a lot of time. Thank you again!

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved