Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsAE TechniquesCreative Cloud DebateFAQ

3D scale formula for 2D layers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook
Jerzy Drozda Jr3D scale formula for 2D layers
by on Jan 5, 2008 at 3:35:29 am


I've been trying to do this for two hours and i'm close, but I must be doing something wrong.

What I want to achieve is to been able to calculate the what the scale of a object placed in 3D space would be, if it was a 2D layer. I hope I made myself clear.

For example. Assume we have two layers and a camera in the composition. One of the layers is 3D. when we move camera closer or further away from the 3D layer it gets bigger or smaller. Now I'd like to calculate the scale so I could apply it to a 2D layer so they both look the same.

I tried to follow popular 3D camera formula that I know from my flash experiments:

scaleFactor = focalLength/(z+focalLength)

and it almost works, but not really.

Please someone help me out on this. I'd like it also to react to changes of Zoom and Focus distance parameters of the camera, since I want to use it with different cameras.

Any ideas?

Return to posts index
Reply   Like  

Jerzy Drozda JrRe: 3D scale formula for 2D layers
by on Jan 5, 2008 at 4:48:25 am

Nevermind. Finally got it figured out.

Did it ever happened to you that you were fighting with a problem for hours trying to solve it, but ended up with nothing. Than in desperation ask a question on a forum, and than almost instantly found an answer? :) I'm just courieous because it happend to me a lot when developing flash applications. This is the first time in AE :)

anyway... i whould have used:
scaleFactor = focalLength/z

Return to posts index
Reply   Like  

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook


Creative COW LinkedIn GroupCreative COW Facebook PageCreative COW on Twitter
© 2016 All rights are reserved. - Privacy Policy