FORUMS: list search recent posts

Maintaining scale when moving back in Z space

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
andrew halasz
Maintaining scale when moving back in Z space
on Feb 22, 2010 at 5:36:39 am

With After Effect, is there a way to have an object maintain scale as you move it back in Z space? I found a script which could be purchased, but in Motion it's just a matter of holding down a key as you move the object back.

Is this an instance of Motion having something over on AE?

Thanks


Return to posts index

Bartek Skorupa
Re: Maintaining scale when moving back in Z space
on Feb 22, 2010 at 8:21:47 pm

Try this one:

Add an expression to the scale property:

zoom = 1422.22;
transform.scale*(1+transform.position[2]/zoom)


This will work in the composition 1024x576 using square pixels.
To find out what value should your "zoom" have - add a camera to your comp using 50mm preset. In the dialog box that adds camera - change units from millimeters to pixels, and see what zoom value you get. This will be the "zoom" value for your expression.
You don't even have to really add this camera. Just check the zoom value. You can copy this and paste to your expression.

Bartek Skorupa
Warszawa, Poland


Return to posts index

Bartek Skorupa
Re: Maintaining scale when moving back in Z space
on Feb 22, 2010 at 8:38:47 pm

Ok, even better. Just copy the expression below and paste it to your scale:


w=thisComp.width*thisComp.pixelAspect;
zoom=w+w*0.388888;
transform.scale*(1+transform.position[2]/zoom)


This will work for every composition. Adding camera will have influance on the result.

Bartek Skorupa
Warszawa, Poland


Return to posts index


andrew halasz
Re: Maintaining scale when moving back in Z space
on Feb 23, 2010 at 1:28:25 am

Thanks for the expression!



Return to posts index

andrew halasz
Re: Maintaining scale when moving back in Z space
on Feb 24, 2010 at 3:48:20 am

Thanks again Bartek.

The expression works except when I add a camera to the comp.

Is there something I need to do once the camera is added?

I'm surprised this question does not come up often. I used the facility to do this in Motion quite often. You could import a PSD file and separate all of the layers in Z space, but maintain the scale. Then you could interact with the layers with a camera.


Return to posts index

Bartek Skorupa
Re: Maintaining scale when moving back in Z space
on Feb 24, 2010 at 8:10:14 am

In this case try this one:

Let's say that your camera is called "Camera 1".
Add an expression as follows to the scale property of the layer:

-----------

zoom=thisComp.layer("Camera 1").cameraOption.zoom;
transform.scale*(1+transform.position[2]/zoom)

-----------

This is the same one I gave you in my first reply, but I just linked the "zoom" value to camera's zoom.

Bartek Skorupa
Warszawa, Poland


Return to posts index


andrew halasz
Re: Maintaining scale when moving back in Z space
on Feb 24, 2010 at 3:12:15 pm

Thanks once again!

Best,
andrew


Return to posts index

Bartek Skorupa
Re: Maintaining scale when moving back in Z space
on Feb 25, 2010 at 10:25:52 pm

I've just found something like this:

http://aescripts.com/pt_multiplane/

I think you were looking exactly for such solution.

Bartek Skorupa
Warszawa, Poland


Return to posts index

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