adobe.after.effects.expressions
Discussion:
Link Scale to Z Position
(too old to reply)
t***@adobeforums.com
2008-10-07 15:57:12 UTC
Permalink
Is there an expression that will let me link [x,y,z] of a 3D Camera to [x,y,scale] of a 2D layer?
R***@adobeforums.com
2008-10-07 17:05:39 UTC
Permalink
The zoom value of the camera lens divided by the length between the camera and the 2D layer should give it to you. Try this:
cam = thisComp.layer("Camera 1");
cp = cam.position;
lp = position;
d = length(cp, lp)
z = cam.zoom;
[z/d*100, z/d*100]
This will keep your 2d layer the same size relative to 3D layers in the comp no matter what the camera position.
t***@adobeforums.com
2008-10-07 19:24:44 UTC
Permalink
Great, except I think it's backwards. I need a 2D Mocha track which yields x,y and scale to drive the camera and align 3D layers (particles) with the 2D plate.
Thanks for your help Rick.
R***@adobeforums.com
2008-10-07 20:01:32 UTC
Permalink
That will take a little more work. I can't do it in my head. If I get time this evening I'll try and figure out something.
Rick
t***@adobeforums.com
2008-10-08 00:22:22 UTC
Permalink
I'm working diligently as well, although I am not very good with expressions. If I come up with something I will post as well.
Thanks again.
4 Replies
505 Views
Permalink to this page
Disable enhanced parsing
Thread Navigation
t***@adobeforums.com
2008-10-07 15:57:12 UTC
R***@adobeforums.com
2008-10-07 17:05:39 UTC
t***@adobeforums.com
2008-10-07 19:24:44 UTC
R***@adobeforums.com
2008-10-07 20:01:32 UTC
t***@adobeforums.com
2008-10-08 00:22:22 UTC
Loading...