Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: HomeForumBasicsExpressionsTutorialsPodcastsMotion GraphicsTrainingCinema 4DFAQ

scale linked to Z position

Cow Forums : Adobe After Effects Expressions

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
scale linked to Z position
by Sam Pauwels on Jun 30, 2009 at 4:17:40 pm

Hello there,

I'm trying to find an expression that links scale to Z position.
I've got 50someting layers that I control with a slider control in Z, they all have the same distance from each other. Now I would like to scale 'em back up again so there seems to be no Z depth, and it seems you get the original image back ( am I making myself clear?) If the camera is in front, nothing seems to have changed, but when you rotate, its an actual 3D scene.

I've checked the forum already and some thing look like what I want, but then again not.
Help, anyone?

thnx

Sam Pauwels

Respond to this post   •   Return to posts index

Re: scale linked to Z position
by Dan Ebberts on Jun 30, 2009 at 5:17:54 pm

I think this will do what you want:


nominalDist = 888.9;

C = thisComp.activeCamera;
v1 = (toWorld(anchorPoint) - C.toWorld([0,0,0]));
v2 = C.toWorldVec([0,0,1]);
d = dot(v1,v2)

value*(d/nominalDist)


Set 'nominalDist' to the distance from the camera where you want the layers to not be scaled by the expression. The example above is set up for a 640x480 comp with the camera at [320,240,-888.9]. A layer at [320,240,0] won't be affected by the expression.

Dan



Respond to this post   •   Return to posts index

Re: scale linked to Z position
by alberto garcia on Oct 29, 2009 at 7:29:31 pm

Hi!
This was what I was looking for! But....
Where is this expression supposed to go? In one of the layers or in the camera?

Thanks!

Respond to this post   •   Return to posts index


Re: scale linked to Z position
by Dan Ebberts on Oct 29, 2009 at 8:20:49 pm

The expression would be applied to the scale property of all the image layers (not the camera or lights).

Dan



Respond to this post   •   Return to posts index

Re: scale linked to Z position
by alberto garcia on Oct 29, 2009 at 8:45:02 pm

Wow! Quick response! Thanks
Although, it turns out it wasn't what I needed :(

I'm trying to have a camera travel in the z position through a bunch of text layers and at the end these layers, while keeping their z position, would form certain shape.

I have them placed in a circle already I could just move them in the z axis, move them and scale them to fit at the end of the animation, I was just wondering if there could be a way through expressions I could do this and save some time.

Thank you so much again!

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]