AE ENHANCERS

Expressions/Scripts/Presets
It is currently Sun Dec 21, 2014 12:21 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Expression To Control Z-Position Only
PostPosted: Fri May 02, 2008 1:02 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 5:55 am
Posts: 157
Location: United States, Ohio
Hi All,

I am trying to make a comp that has two slider controls.

These two sliders represent the "Far Point" and "Near Point" of the layer they are controlling.
I want to be able to traditionally key frame the x,y position, but I want the slider controllers to control the z position only.

Imagine a layer with two key frames. The first key frame would grab the z-position from the "Far Point" controller and the Second keyframe would grab the z-position from the "Near Point" controller. Ideally I would like interpolation between the far and near point as well.

Can this be done?

_________________
"Up And Atom

No...No

Up And At Them!"


Top
 Profile  
 
 Post subject: Re: Expression To Control Z-Position Only
PostPosted: Fri May 02, 2008 4:52 pm 
Offline

Joined: Sat Jun 26, 2004 10:01 am
Posts: 309
Location: Folsom, CA
This should give you the idea:

Code:
near = effect("near")("Slider");
far =effect("far")("Slider") ;
tNear = key(1).time;
tFar = key(2).time;
z = linear(time,tNear,tFar,near,far);
[value[0],value[1],z]


You could make it fancier by adding code so that it doesn't fail if there aren't two keyframes.

Dan

_________________
http://www.motionscript.com


Top
 Profile  
 
 Post subject: Re: Expression To Control Z-Position Only
PostPosted: Mon May 05, 2008 5:29 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 5:55 am
Posts: 157
Location: United States, Ohio
Thank You Dan.

_________________
"Up And Atom

No...No

Up And At Them!"


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group