FORUMS: list search recent posts

Delay effect with Slider Control?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Robert Schildkopf
Delay effect with Slider Control?
on Apr 11, 2016 at 9:31:13 pm

Hi,

i'm trying to achieve a delay effect and found several ways.. This expression with Slider Controls seems to be a good way for me:

opc=thisComp.layer("CONTROL").effect("opc")("Slider");
thisComp.layer (index+1).transform.opacity.valueAtTime(time-opc)

Its working...

Now my Question.. ;) If i have for example two text layers with different Y-Values, for Text_01 I animate position up in y and opacity from 0 - 100. Now i want the Text_02 Layer to do the same as the other layer - but from ITS own position and with a certain delay.

I tried to transfer the expression to the position value - but its of course not doing what i want.

pos=thisComp.layer("CONTROL").effect("pos")("Slider");
thisComp.layer (index+1).transform.position.valueAtTime(time-pos)

So can anybody tell me how to do this? How can i give the second layer a delay (with slider control) in the postion value, FROM its own position up (or down) e.g. 50px. Sounds confusing, hope u can follow along.. :D

I've no knowledge in expressions, but would be really cool to get this running.


Looking forward to your answers!

Thanks in advance,

Rob

opc=thisComp.layer("CONTROL").effect("opc")("Slider");
thisComp.layer (index+1).transform.opacity.valueAtTime(time-opc)

pos=thisComp.layer("CONTROL").effect("pos")("Slider");
thisComp.layer (index+1).transform.position.valueAtTime(time-pos)


Return to posts index

Miguel de Mendoza
Re: Delay effect with Slider Control?
on Apr 11, 2016 at 10:16:33 pm

You have to add the self value to the expression:

pos=thisComp.layer("CONTROL").effect("pos")("Slider");
thisComp.layer (index+1).transform.position.valueAtTime(time-pos) + value


Now you can move the text_2 where you want and get the relative offset.


Return to posts index


Robert Schildkopf
Re: Delay effect with Slider Control?
on Apr 12, 2016 at 8:03:30 am

Hey Miguel,

thanks for the fast answer! Its working, BUT its offsetting the second object in x and y by "random" (?). I want the same x value for the second layer, just delay the y animation. Can give me further instructions? :)

Thanks

Rob


Return to posts index


Robert Schildkopf
Re: Delay effect with Slider Control?
on Apr 12, 2016 at 8:49:29 am

Update - ok, by linking the "value" to another slider i can influence x position, but I'm still wondering how to get the y value. I tried to add a second +value but it doesn't work.

anxious to hear the solution! :)

Thanks


Return to posts index

Miguel de Mendoza
Re: Delay effect with Slider Control?
on Apr 12, 2016 at 9:03:45 am

Try this:
pos=thisComp.layer("CONTROL").effect("pos")("Slider");
x = value[0];
y = thisComp.layer (index+1).transform.position.valueAtTime(time-pos)[1];
[x,y]


Return to posts index

Robert Schildkopf
Re: Delay effect with Slider Control?
on Apr 12, 2016 at 3:00:27 pm

Hey..

thanks again, but i still don't really understand how to achieve what i want. I used your code, but still just get my delay in y. But i want to end the "Miguel" layer in another y value than the "thanks" layer.

it should stay like e.g. 100px in y further down...

thanks for ur efforts! :)

See my example here: 9971_bildschirmfoto20160412um16.54.25.png.zip


Return to posts index


Robert Roebke
Re: Delay effect with Slider Control?
on Apr 12, 2016 at 3:15:10 pm

Ok, i could just do it over the anchorpoint parameter of the second layer. However i'm interested how i can say: "please set every following layer e.g. -100px in y down". So if i have 5 Text layers everyone should animate in according to the "CONTROL" layer (just as we can with ur expression) BUT like a sequence - every layer e.g. -100px y down.

Sorry for the spam - still working on it..

thanks


Return to posts index

Miguel de Mendoza
Re: Delay effect with Slider Control?
on Apr 12, 2016 at 4:06:32 pm

Sorry, I forget to add the y value to the y variable:

pos=thisComp.layer("CONTROL").effect("pos")("Slider");
x = value[0];
y = thisComp.layer (index+1).transform.position.valueAtTime(time-pos)[1] + value[1];
[x,y]

You can change value[1] on the 3rd line by whatever you want ex 100, try diferent alues to see what happends. The reason for using value[1] is for "unlocking" the y axis so you can positionate it manualy where you want.


Return to posts index

Robert Roebke
Re: Delay effect with Slider Control?
on Apr 13, 2016 at 12:51:06 pm

Mhm tried it with 2 Shapes - 1. = control (with position animation) 2.= same shape without any keyframes and same (end) position as control layer.

If i put your expression in the 2's layers position parameter it immediately repositions the 2. layer further down. It seems that +value[1] does this, but it should just "unlock" the y axis as you said?

However if i try to put in +value[100] the expressions fails and says "Error at line 3 in property "Position" of layer 2 ("shape").... "proberty or method named '100' in Class 'Array' is missing or does not exist. It may have been renamed, moved, deleted, or the name may have been mistyped".


Still not doing what i expected - am I doing something wrong?

Thanks again...


Return to posts index


Robert Roebke
Re: Delay effect with Slider Control?
on Apr 12, 2016 at 3:13:56 pm

Ok, i could just do it over the anchorpoint parameter of the second layer. However i'm interested how i can say: "please set every following layer e.g. -100px in y down". So if i have 5 Text layers everyone should animate in according to the "CONTROL" layer (just as we can with ur expression) BUT like a sequence - every layer e.g. -100px y down.

Sorry for the spam - still working on it..

thanks


Return to posts index

Miguel de Mendoza
Re: Delay effect with Slider Control?
on Apr 14, 2016 at 3:07:33 pm

I mean change all "+ value[1]" value, not only the number : value[100] incorrect:

pos=thisComp.layer("CONTROL").effect("pos")("Slider");
x = value[0];
y = thisComp.layer (index+1).transform.position.valueAtTime(time-pos)[1] + 100; //<---this is the right change to do
[x,y]

But with the value[1] instead of a fixed number, you can position your layers where you want in y axis, and still mantain the offset, it depends on you.


Return to posts index

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