FORUMS: list search recent posts

Animating between two position values with a Slider?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jordan Montreuil
Animating between two position values with a Slider?
on Dec 28, 2010 at 8:06:50 pm

I am working on a shot that includes the Advanced Lightning effect. The Lightning needs to grow from one point to another. I have the Origin and Direction linked to two separate nulls that are then animated so that they follow the position of objects in the video.

Is there a way that I can link the Direction parameter to a percentage slider where 0% is the position of one null and 100% is the position of a second null? The ideal result would be being able to animate between the two positions while they themselves are being animating to follow some video.


Return to posts index

Chris Wright
Re: Animating between two position values with a Slider?
on Dec 28, 2010 at 9:41:12 pm

if you want it variably controlled, I don't see why a linear wouldn't work.
//paste in direction and slider will control balance between 2 nulls.

s = effect("Slider Control")("Slider");
x=thisComp.layer("Null 1").transform.position;
y=thisComp.layer("Null 2").transform.position;

n1=x[0];
n2=x[1];


n3=y[0];
n4=y[1];

s1=linear(s, 0,100, n1, n3);
s2=linear(s, 0,100, n2, n4);

[s1,s2];

//you can also add wiggle in slider if you want.

http://technicolorsoftware.hostzi.com/


Return to posts index

Jordan Montreuil
Re: Animating between two position values with a Slider?
on Dec 29, 2010 at 8:35:54 pm

Beautiful. If I could email you a cookie, I would.


Return to posts index


Marc Ger
Re: Animating between two position values with a Slider?
on Dec 15, 2014 at 5:42:39 pm

How would you utilize this in a 3D environment? I tried modifying the expression a few different ways but wasn't able to get it to work.

Thanks!


Return to posts index

Dan Ebberts
Re: Animating between two position values with a Slider?
on Dec 15, 2014 at 7:06:44 pm

This should work:

s = effect("Slider Control")("Slider");
p1=thisComp.layer("Null 1").transform.position;
p2=thisComp.layer("Null 2").transform.position;
linear(s,0,100,p1,p2)

Dan



Return to posts index

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