ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Evaluate expression at time

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
loris grifa
Evaluate expression at time
on Jan 25, 2018 at 12:14:25 pm

Hi to everybody,

i've got a question for you all. I'm using the espression below to evaluate the first pixel on X coordinate at fixed Y.

L = thisComp.layer("00_LAYOUT_SOTTOPANCIA_STILL");
w =L.width;
h = 355;


for (i = 0; i < w;i++)


p = L.sampleImage([i,h], [.1,.1]);

if (p[3]>0.999)

{K=i; i=w}



It works fine, but the value is calcolated on every frame of the composition.

How can i "say" to AE to evaluate the result in a specific moment on the timeline?


Return to posts index

Kevin Camp
Re: Evaluate expression at time
on Jan 25, 2018 at 6:21:27 pm

sampleImage() has a time parameter: sampleImage(point, radius = [.5, .5], postEffect = true, t = time)

so you could p to this: p = L.sampleImage([i,h], [.1,.1], true, 5);

sample image would then only sample the frame at 5 seconds.

Kevin Camp
Art Director

Return to posts index

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