ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Camera in After Effects

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Rory FlynnCamera in After Effects
by on Aug 25, 2010 at 10:00:47 am


Is it possible to measure the distance from the camera to the object in after effects?

I am working on a project with a client where I have to match an after effects camera move to real footage. Usually I would have done this the other way round. I would film it first then track the footage in after effects and create the scene that way. But my client wants me to make the scene in after effects first and then they will shoot the footage accordingly. Therefore they have asked me to let them know the lens size and distance from camera to object in each shot.

Does anyone know how to do this?



Return to posts index

Bartek SkorupaRe: Camera in After Effects
by on Aug 25, 2010 at 11:23:03 am

This shouldn't be any problem.
When you add a camera - you chose the preset, for example 50mm. This is the focal length. You give this info to the client and that's it.
I assume, that you will not change the zoom value over time. If you do - it's a little bit tricky, but also possible to calculate.

And now the distances:

You can easily measure the distances between the objects with a simple expression.
Add any layer and give it a "slider control" Add an expression:


p1 and p2 are the positions of the layers. The expression will return the distance between them.
p1 and p2 can be easily pick-whipped. The result will be the distance in pixels.

Then you have to say how many meters, millimeters, feet or whatever this is.
And this is up to you. You have to simply ask yourself what is the size of your world.
You have to specify how much pixels represent some real world unit, like meter or foot.

It is good to work with square pixels in such cases.

Bartek Skorupa
Warszawa, Poland

Return to posts index

Dave LaRondeRe: Camera in After Effects
by on Aug 25, 2010 at 7:50:28 pm

The good Mr. Skorupa's technique will indeed give you a distance. However, it will be in pixels.

I'm going to guess that you'd rather have inches and feet, or meters and centimeters. Sadly, there is no correlation between pixels and measures of distance.

Case in point: a simple DVD. You can watch a DVD on a hand-held DVD player, and you can play a DVD on the side of a building using a projector. In both cases the display is 720x480 pixels, but the size of the pixels is not the same.

[Rory Flynn] " client wants me to make the scene in after effects first and then they will shoot the footage accordingly."

I'm sure your client is a fine person. But referring to the example above, there is NO WAY to accurately measure distance using pixels, because there is no set size for pixels. Thus, your client would have absolutely no clue how to "shoot accordingly".

I'm sure you value your relationship with this client. You owe it to both him and yourself to convince him that while it sounds like a good idea you can't supply accurate information, so it would be a big waste of time and money.

You were right in the first place: shoot the footage first, then create the scene in AE.

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA

Return to posts index

Rory FlynnRe: Camera in After Effects
by on Aug 25, 2010 at 8:01:38 pm


Thank you both for your replies. much appreciated. That is what I was thinking Dave. Will have to try and persuade them to do it the other way round. Shoot first and then track it. Oh well, thanks anyway.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved