ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Markers that trigger an animation on....but, can they go off?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chris James
Markers that trigger an animation on....but, can they go off?
on Oct 10, 2018 at 11:36:57 pm

Hi all,

First time poster - I've looked through previous posts but can't find the answer to this one...

I recently used Ukramedia's EXCELLENT expression linking movement to Nulls in x,y and Markers in time. Here's the video (with thanks!!)





It works perfectly to animate on - but I'm struggling to get it to then animate off later down the timeline... I've included the script.

Marker One "Start Animation On" and Marker Two "Stop Animation On" are 20 frames apart at the 1min mark.
I need - Marker Three "Start Animation Off" and Marker Four "Stop Animation Off" to be set up about the 2min mark to animate off.

I'm sorry but I'm very new to expressions - I've been trying to work out the code myself but nothing has worked over.

I was hoping that someone here could help me out.

Thanks in advance - this is a great forum with very generous contributors!!

startMarker = comp("My Comp Name").marker.key(1).time;
endMarker = comp("My Comp Name").marker.key(2).time;

xInPosition = comp("My Comp Name").layer("My Layer").transform.position[0];
yInPosition = comp("My Comp Name").layer("My Layer").transform.position[1];
xOutPosition = comp("My Comp Name").layer("My Layer").transform.position[0];
yOutPosition = comp("My Comp Name").layer("My Layer").transform.position[1];

x = ease(time, startMarker, endMarker, xInPosition, xOutPosition);
y = ease(time, startMarker, endMarker, yInPosition, yOutPosition);
[x,y]


Return to posts index

Sarah Bartels
Re: Markers that trigger an animation on....but, can they go off?
on Oct 11, 2018 at 12:45:06 pm

Hi Chris,

try this ☺

Animation IN and OUT in the same way...

startMarkerIn = thisComp.layer(„NAME“).marker.key(1).time;
endMarkerIn = thisComp.layer("NAME").marker.key(2).time;
startMarkerOut = thisComp.layer("NAME").marker.key(3).time;
endMarkerOut = thisComp.layer("NAME").marker.key(4).time;

a = [OutPosition]
b = [InPosition] - [OutPosition]

InPosition = thisComp.layer("NAME").transform.position;
OutPosition = thisComp.layer("NAME").transform.position;

ease(time, startMarkerIn, endMarkerIn, (a/2)+b,(a/2)) + ease(time, startMarkerOut, endMarkerOut, (a/2), (a/2)+b);


Return to posts index

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