FORUMS: list search recent posts

Dan Ebberts "Triggering Animation with Markers" Expression Customization?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jamie Molina
Dan Ebberts "Triggering Animation with Markers" Expression Customization?
on Oct 13, 2016 at 4:28:35 am
Last Edited By Jamie Molina on Oct 15, 2016 at 4:43:41 am


My friend recently discovered an expression here

which uses layer markers to retrieve pre-defined, keyframed animations from another comp. We're using it to animate mouth shapes for lip-sync. The mouth shapes are masked solids, and the mask path animates between mouth shapes. Say we have 7 different mouth shapes in the precomp from which we're retrieving the layer marker info. That means we have to animate every possible mouth-to-mouth combo in the precomp, that equals 42 (I think) separate animations to cover all the possibilities. Tedious, but all good.

Let's say all the transitions from one mouth to another happen over 5 frames. That speed doesn't always match up with audio to which you're lip-syncing. If a character is talking really slowly, the transition from one mouth to another might need to happen over 10 frames, or any other number of frames. So we're wondering if there's a way to customize the expression in some way so that we could tell it to use the pre-defined transition from one mouth to another, which currently is defined as being 5 frames long, but to play it over 10 frames instead (or 2, or 15, etc). In essence we'd like sort of a time remap function.

Here's the expression

action = comp(name).layer("action");

n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time){

if (n == 0){
m = marker.key(n);
myComment = m.comment;
t = time - m.time;
actMarker = action.marker.key(myComment);
if (action.marker.numKeys > actMarker.index){
tMax = action.marker.key(actMarker.index + 1).time - actMarker.time;
tMax = action.outPoint - actMarker.time;
t = Math.min(t, tMax);
actMarker.time + t;
}catch (err){



Return to posts index

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