Start learning with our library of video tutorials taught by experts. Get started

After Effects CS5.5 New Features
Illustration by John Hersey

Creating a rack focus in 2D


From:

After Effects CS5.5 New Features

with Mark Christiansen

Video: Creating a rack focus in 2D

The Camera Lens Blur effect can be used to do more than just blur an entire layer. With a blur maps that correspond to the depth of images in the frame, you can create depth of field and rack focus effects on a single 2D layer or on an entire 2D composition. So you might recollect this clip from an earlier movie. Now that the shot has been stabilized, I think a nice added extra addition to it would be to actually rack focus from the foreground rider to the background rider.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
After Effects CS5.5 New Features
1h 42m Intermediate May 02, 2011

Viewers: in countries Watching now:

In this course,, visual effects guru Mark Christiansen covers the relevant new features of After Effects CS5.5, including the new Warp Stabilizer, 3D Stereoscopic workflow, and Lens Effects tools. The course also covers light falloff enhancements and workflow improvements in this release.

Topics include:
  • Adding smooth light falloff
  • Using inverse square falloff
  • Creating lens blur with the After Effects camera
  • Working with Warp Stabilizer
  • Recreating bokeh blur artifacts
  • Creating rack focus
  • Setting up stereo 3D
  • Working with RED camera footage
  • Saving preview time with disk caching
  • Creating an orbit null
Subject:
Video
Software:
After Effects
Author:
Mark Christiansen

Creating a rack focus in 2D

The Camera Lens Blur effect can be used to do more than just blur an entire layer. With a blur maps that correspond to the depth of images in the frame, you can create depth of field and rack focus effects on a single 2D layer or on an entire 2D composition. So you might recollect this clip from an earlier movie. Now that the shot has been stabilized, I think a nice added extra addition to it would be to actually rack focus from the foreground rider to the background rider.

But how do we do it? Well, to begin, I will set the Camera Lens Blur effect. Now, of course that's going to blur the entire frame and leave these little black margins. So I'll click Repeat Edge Pixels to get rid of them. So this is my starting point. The way to create the rack focus effect is actually to create a grayscale map that describes where the start and end points of that rack focus are and I have one pre-made here. We could do it on the fly, but I think you'll see what it consists of and it will be pretty clear.

So, let's go to the Project panel and in my precomps, pull in my rack focus blur map. So this is just a gradient. If we look in there, it's just created with the ramp effect. Now, I have a couple of the layers that I have turned off because right now, we are just going to look at the effect of this one layer. So obviously, I don't want to be looking at this layer. I will just turn its volume and visibility off and back in the Effect Controls here I am going to choose that map to be my blur map and I'm free to actually move it behind as well.

And that doesn't mess up the Effect Controls. It's not confused by that. Luminance is the channel I want to use. I could also use any of the color channels or Alpha, but that was a grayscale map, so luminance map. It's centered because it's the correct size, and let's just crank up Blur Radius and see what's happening right away. So from that gradient-- let's just refresh ourselves. The white portion is what's now being blurred down here and the areas that were black are not getting any blur at all.

Well, that's the opposite of the direction I wanted to go. So, I am going to go ahead and invert it. Now, it's the background rider who's out of focus, and of course we're getting some other anomalies here right now. So this is going to need some cleanup. But just watch what happens if I move the value from 1 to the other. That is the basis of a rack focus effect and it's one that would have been very difficult to get if you could get it at all on the actual day because they're so far from camera beginning and there is a lot of light. But it's something that we can do in post.

Now, obviously, to improve on it, what we need to do is really get the foreground and background defined correctly. Lucky for you, I have already done that. So if I un-solo this layer, I have got a couple of others here. There's a matte that just holds out the ocean because that's all in the far background and then I went ahead and use Roto Brush to just create a really dirty roto of that cyclist. It doesn't have to be perfect. This is a great use of Roto Brush because it can be just good enough.

So, with all those layers on, let's go back and just preview again what we've got. Now, the blur effect is too heavy and you see an artifact happening here that I'm going to talk about in a moment. Let me cut this down in about half or a little bit less. So it's a little bit subtler. And I will animate it starting when it's just sort of starting to leave, but we want him to be in focus. I am going to set this back to 0. So now our guy in the background is not the object of focus. It's foreground guy. There is my first keyframe and then I will move ahead just as he exits. That's when will be focused on background guy.

And as I like to do, I think adding an Ease to these would be nice. We will just right-click on the keyframes. Under Keyframe Assistant, choose Easy Ease and that just recreates a kind of more organic and cameraman- like quality to how this happens. Let's preview and see what we have got. What succeeds about this rack focus effect is that there is a gradient traveling between the two points and that means that there are all those nice in-between values for the camera to focus on going from white to black.

So this is different from rotoscoping like you see over here where the transition from white to black is very sudden and it's those in between values that really give you the nice rack focus. One flaw that I pointed out earlier is that the edges around this foreground guy, when he's defocused, are actually looking a little too soft and what's happening is that hard edge is causing the blur to go right along it and it's blurring together the background and foreground.

So you are getting a little bit of haloing. It's not too bad, but I'd like to show a different scene in which I really did have to actually solve that problem. In this scene, my intention was to bring the foreground guy just in clear focus and have the background be out of focus. And as a reference I have this shot. So I was looking for an effect more like this. I will just go ahead and take a snapshot of that. So I have got a reference saved. Now you can use the same means as we did before. So I have a map.

So that's just again a use of Roto Brush to isolate them. Let's take a look at just the Alpha channel and there's the selection. Again, it's not a perfect matte, but it's certainly good enough to get started. And it just stays off when you put it to use. If I try to apply that to a single layer, as I have done here, you can see that it's a similar setup to what I had before. This time I am using the Alpha channel, but I have about the same amount of blur and the Focal Distance is set to 1 to have him be in focus and the background be out of focus, but the edges are really blowing the gag.

The only solution for this is actually to do them on separate passes to effectively create a clean plate for that background and to separate him out completely. Now we do already have him separated out. Let me show you what I mean by clean plate. I will just solo this layer. Now using that same Roto Brush effect, what I was able to do under Roto Brush is to actually use edge decontamination, just pull in those edges a little bit.

So what we have here is a clean plate, which just pulls more pixels in where there was the edge of guy before, so that there is nothing to blend against except background. Now you don't have to go so far as to knock him out completely. You just need enough to blur into and the Roto Brush with its decontamination options can do that. If I add the foreground, that one is in sharp focus and it helps to just have the plates behind them to cover that gap.

Now I explained it earlier that my Roto is not perfect here, but let's just take a look at the result and you can see that it's a lot closer than what we had. So what we have here is clearly a work in progress, but all the glitches that you see are just the result of the approximate Roto that's happening with just a quick Roto Brush. With proper Roto, you could certainly pull this one off and you'd even be free to create a rack focus so that as he gestures back toward the ocean, perhaps he would have him go out of focus and have the ocean come into focus.

At home, no one will know that lens effect such as shallow depth of field and rack focus weren't part of the original shot if you take the time to make full use of a blur map to control focal depth.

There are currently no FAQs about After Effects CS5.5 New Features.

Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed After Effects CS5.5 New Features.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked