FORUMS: list search recent posts

Parenting Position to Another Comp and Time Remapping Simultaneously?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Brent Taylor
Parenting Position to Another Comp and Time Remapping Simultaneously?
on Jan 17, 2015 at 12:25:50 am
Last Edited By Brent Taylor on Jan 17, 2015 at 12:26:07 am

Here's my question:

Is there a way to control an object from a second composition, even if the first composition is subject to Time Remapping?

I'll explain my situation...

I'm working on an animation technique that could save me a lot of time. The idea is to use Time Remapping to re-use gestures a character makes, but to have a mouth independent of the Time Remapping. But I can't figure out a good way to get the mouth part working.

So far, I've set it up like this:

In one composition (It's called "dude") we have an animated character.

Then it is contained inside another composition (we'll call it "scene").

The idea is to call up animations in the "dude" composition via time remapping in the "scene" composition. This works great for walk cycles, loops, and re-using other gestures. So far so good. I really like this workflow. Whenever I create an animation I like, it's easy to re-use, loop, play at different speeds, etc. Rather than having to worry about keyframing or looping all the body elements, I just have one timeline to work with.

------

Now I'd like to add a mouth in the "scene" layer that can work independently (he can say different things during a looped walk cycle, for example).

Attempt 1)

First, I tried making a controller for his mouth in the "scene" composition that corresponded to the mouth in the "dude" composition. I reasoned that even though the walk cycle was being looped, the mouth would be free since it had its own timeline. However, once I got to the second repetition of an animation loop, his mouth would suddenly start over from the beginning no matter what I keyframed in "scene."

Someone may have suggestions at this point. I tried a few things, like duplicating "dude" in either the timeline or the project window, but the results never changed.

Attempt 2)

Next, I thought "ok, Let's just put the mouth in the scene comp."

So I tried putting his mouth in the "scene" layer, thereby freeing it from the Time Remapping. But I need the mouth to follow the head's movement in the other comp.

Since I can't parent the whole item across the composition, I used an expression to parent just the Position property to the head's Position property:

comp("dude").layer("head").transform.position

This only sort of works.

A) Once the Time Remapping gets involved with the "dude" layer, it messes things up. The mouth follows, but only when the cursor reads the same numeric time on the timeline (basically, once again, only the first repetition once I start creating loops). Which makes sense... but what can I do about it? Is there some way to alter the expression's understanding of how to relate the two timelines?

B) While the mouth follows the head when it moves, it does NOT move when the body (to which the head is parented) moves.

So yeah... I'm stumped. Anyone have any ideas?


Return to posts index

Brent Taylor
Re: Parenting Position to Another Comp and Time Remapping Simultaneously?
on Jan 17, 2015 at 7:10:08 pm

Made some progress on this. I think the first method is probably impossible, which is fine.

The second method I've ALMOST got...

This code solves problem A (courtesy of Dan Ebberts in another thread):

xtime=this_comp.layer("dude").time_remap;
position-comp("dude").layer("head").position.value_at_time(0)+comp("dude").layer("head").position.value_at_time(xtime)

This code solves problem B:

c = comp("dude").layer("head");
c.to_world(c.anchor_point)

...but how to combine the two?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]