FORUMS: list search recent posts

valueAtTime with other expressions

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Hannes Reisinger
valueAtTime with other expressions
on Apr 26, 2012 at 11:32:37 am

Hello there!

I'm trying to accomplish the following:
Several text layers are linked with an expression on their position to a Null with several Sliders. The expression looks like this:
posX = random(thisComp.layer("random-controller").effect("MinOffsetX")("Slider"),thisComp.layer("random-controller").effect("MaxOffsetX")("Slider"));
posY = random(thisComp.layer("random-controller").effect("MinOffsetY")("Slider"),thisComp.layer("random-controller").effect("MaxOffsetY")("Slider"));
animation = thisComp.layer("random-controller").effect("PositionAnimation")("Slider");
value = [posX,posY] + [0,animation];

So, they are randomly positioned in X and Y and animated in Y. That works pretty well for now.

What I now want to do is randomly place my layers in time. The valueAtTime expression seems to do this, only not with an already "expressioned" parameter. The problem seems to be that the animation itself, therefor the changing valueAtTime is not on the layer itself but on an Expression Slider.
Anyone can help me here?
Thanks in advance!

Return to posts index

Chris Mellor
Re: valueAtTime with other expressions
on Apr 26, 2012 at 2:50:18 pm

Sounds like you're looking to randomly reference the "animation" variable throughout its time?

if so, define what you want your "timeOffset" to be, using another random() and re-write your last line as:
value = [posX,posY] + [0,animation.valueAtTime(time-timeOffset)];
I have been doing this in a project I am working on now, and it works for me. Hope it helps.


Return to posts index

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