Semi automatic Animation


    How to trigger and retime animations in precomps with markers


    Yes, that was a Lil Wayne reference.

    This week’s After Effects tutorial shows you how to use markers to trigger and retime animations contained in a precomp from a main comp. It is based on Dan Ebberts’ Triggering Animation with Markers ( expression with a couple of differences. First, Dan’s technique uses a layer with the markers on it—we use comp markers because we finally have scripting access to them. Second, this version retimes animations using split markers while Dan’s just triggers the action. To split a marker, hold option and then click and drag on the marker. I’ve never noticed these split markers in AE until about a week ago, so I’m doubting they were available when Dan wrote this excellent expression.

    First, you animate everything in your precomp. Then you put named comp markers split around the action. Then you just put that precomp into other comps, add the expression (link to code above), and put split markers on it with the name of the action you want to put. As a side benefit, since they’re comp markers, they come in with the precomp when you add it to your main comps. The best part is that this expression is completely portable to any precomp since it uses time remapping.

    Check out Triggering Animation with Markers (link above) to see how you can use this to animate characters. You can even use it to set up various elements—like transitions—in a single precomp and sequence them in your main comps. And if you’re building up a brand package or a library of elements you can add elements to those precomps by animating new stuff and putting in a marker at any time without breaking anything. I’m not sure what would happen with overlapping markers since I didn’t put any logic in there for that, so you might need to duplicate precomp layers in your main comp to overlay elements. I believe it’ll probably just jump to the second animation at the point where the markers overlap.

    I hope you enjoy this one. I’m standing on the shoulder of a giant for this one, but I’m pretty proud of how I was able to improve it. I’m going to implement it in a few projects and see what other amazing uses I can find for it! I encourage you to do the same and tell me about it! Hit me up @workbench_tv!


    Please enter your comment!
    Please enter your name here