ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

After Effects 3d Camera Focus

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ryan Stubbs
After Effects 3d Camera Focus
on Apr 25, 2013 at 3:23:36 pm

I have a helicopter flyover shot of wintery terrain, to which I've added snow falling, explosion, tracers, and a 3d predator drone fly-by using element 3d (I used the AE camera tracker to track the shot). I'm trying to use depth of field on the AE camera to make the explosions and the predator drone go out of focus as they get farther away from the camera, which works nicely. However, when the predator drone is close to the camera (it flies right by the camera, then off into the distance) it is out of focus to the point of being nearly invisible. While I realize this is an intended feature, I would like objects that are close to the camera to be fully in focus, while those that are farther away still be out of focus. I am trying to achieve this by key-framing the focus distance, but with limited success. Is there any way to get around this?


Return to posts index

Joseph W. Bourke
Re: After Effects 3d Camera Focus
on Apr 25, 2013 at 3:36:27 pm

This script should make it somewhat easier:

http://www.motion-graphics-exchange.com/after-effects/Camera-FocusControl/G...

Joe Bourke
Owner/Creative Director
Bourke Media
http://www.bourkemedia.com


Return to posts index

Ryan Stubbs
Re: After Effects 3d Camera Focus
on Apr 25, 2013 at 3:50:49 pm

Thanks! That script made it considerably easier to adjust the focus, but I'm still having some problems. Is there any way to increase the size of the area that is in focus?


Return to posts index


Walter Soyka
Re: After Effects 3d Camera Focus
on Apr 25, 2013 at 4:10:08 pm

[Ryan Stubbs] "Is there any way to increase the size of the area that is in focus?"

The depth of field is related to the camera's aperture. Smaller apertures (higher F-stop numbers) have deeper depths of field (more stuff in focus). Larger apertures (smaller F-stop numbers) have shallower depths of field (less stuff in focus).

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events


Return to posts index


Darby Edelen
Re: After Effects 3d Camera Focus
on Apr 25, 2013 at 4:46:43 pm

As Walter already mentioned the depth of the scene that is in focus has everything to do with the relative size of the aperture and the film back. Generally you wouldn't mess with the film back (that just complicates things) so the aperture is where you want to work. The 'Aperture' property is just under the 'Focus Distance' on a Camera layer.

For focusing I like to add a Null object named 'Focus' to my scene and apply this expression to my Camera's Focus Distance (note: you must keep the Focus null in front of your camera):

l = thisComp.layer("Focus");
p = l.toWorld(l.anchorPoint);
cp = toWorld([0,0,0]);
cv = toWorldVec([0,0,1]);
v = p - cp;
dot(cv, v);



Another issue you may run into is that as the Focus Distance gets very close to the camera the amount of blurring in the background gets extreme. To combat that I'd recommend another expression on the Blur Level property to reduce the amount of blurring as the Focus Distance crosses a certain threshold. Something like this:

f = cameraOption.focusDistance;
z = cameraOption.zoom;
linear(f, 0, z / 2, 0, value);


Which would reduce the Blur Level from its keyframed value (default is 100%) when the Focus Distance is half the Zoom Distance down to 0% when the Focus Distance is 0. These values are somewhat arbitrary so you can change them if you're not getting what you want.

Darby Edelen


Return to posts index

Ryan Stubbs
Re: After Effects 3d Camera Focus
on Apr 25, 2013 at 5:12:05 pm

Thanks everyone! It'll take me a while, but some preliminary testing suggests that I should be able to get the look I want by playing with the various expressions and settings you've discussed.


Return to posts index

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