Ready to watch this entire course?
Become a member and get unlimited access to the entire skills library of over 4,974 courses, including more 3D + Animation and personalized recommendations.Start Your Free Trial Now
- View Offline
- What is a keyframe?
- Working with the F-Curve Manager
- Pausing an animation
- Working with the Editor Camera vs. the camera object
- Adding movement with a spline wrap
- Creating custom shapes with the Melt deformer
Skill Level Beginner
Depth of field is a term that's used in photography to describe how much of an image is in or out of focus. An image that's all in focus is said to have a lot of depth of field, an image that is only partially in focus is said to have very shallow depth of field. In CINEMA 4D, there are three techniques for getting depth of field. Two of them involve using CINEMA 4D's own Render Engine and one technique involve using a Filter in After Effects. I'm going to cover the first two techniques in CINEMA 4D in this video and we'll talk about the third technique later on in the Essentials Training series.
So I've got a very simple grid set up here and I've got a camera already set up in the scene. And you'll notice that there is a group of green objects here. And I've set these green objects at the focal distance from the camera. If I select my Camera and go to the Object Properties and look at the Focus Distance. That is this plane right here and you could see that there's a row of objects that line up exactly with that plane. And those are the objects that are green. I've done that so we can see exactly where that focal plane is and we'll be able to see the depth of field effect and see how it affects the background and see how it affects the foreground relative to those in focus objects.
So, the first technique for getting depth of field involves the built-in render engine for CINEMA 4D. The way you activate depth of field is that multi-step process. So step one is to go to the Render Settings and activate depth of field. So, I'll hit Command+B or Ctrl+B on the keyboard and in the Render Settings I'm going to go to Effect and add Depth of Field. Let's go to the full-screen Perspective view. So now that we've activated Depth of Field on the Render Setting, we can do a test render here.
I'll hit Command+R or Ctrl+R on the keyboard and you can see that everything in the image is still in focus. Depth of field has not activated. That's because I have to tell CINEMA 4D which parts of the image I want in focus and which parts I want out of focus. The way that you do that is by turning on some settings on the camera. So let's go to the Details tab of the camera. So let's raise this up just a bit so we could see everything. We've got our Focus Distance set at 2,000. We're going to leave that alone. So when we go to the Details tab, there is a Depth of Map Front Blur and Rear Blur. When I change that DOF Rear Blur, two things happen.
The first thing that happened was I have this new extension on the end of my camera. My focus plane is still right here, but now I've got this extra little bit that's attached to the camera. If I turn that off, you'll see that it disappears. Let's turn it back on again. So now when I render, let's click in the Perspective view and hit Command+R or Ctrl+R on the keyboard. You can see that everything beyond those green objects is now going out of focus. And there's a range of values that you'd get here. And that's what's defined by this Start and End field.
The Start is the focal plane and 1,000 units beyond the Start of the focal plane is where the End of the blur field will go. So everything beyond that setting will become out of focus and will gradually become in focus the closer it gets to the focal plane. Let's activate Front Blur and you'll see that it's much the same. We now have this little area that's shown up on our camera right there, and everything in this range will now go slowly out of focus. Let's do another rendering. Let's bring the Perspective view up full frame.
You see, it takes a moment to calculate, but now you can see that the foreground objects are all out of focus and the objects at the focal distance are all in focus and there's a nice range of values. So that's the first way of getting depth of field inside of CINEMA 4D. The next way to get depth of field involves something called the Physical Render Engine. So I'm going to reset some values here on my camera. Let's turn off the Depth of Field Front and Rear Blur. And that was the only things I changed on the camera.
I'm going to go back to the Render Settings now. Hit Command+B or Ctrl+B on the keyboard and I'm going to Delete the Depth of Field effect. If you have the Broadcast, Visualize, or Studio bundles of CINEMA 4D, then you have access to something called the Physical Render Engine. If you have the Prime version of CINEMA 4D, you don't have Physical Render Engine, but you still can do regular depth of field. So you can just follow along with this if you only have Prime. The way you activate the Physical Render Engine is by going to the Render pulldown right here and clicking on that and going to Physical Render. When I do that, let's move the Render settings over here for a moment and hit Command+R or Ctrl+R on the keyboard.
You can see that when I do that, it really looks like nothing's changed. That's because in the Physical Render properties, when I Click on the word Physical, there's a Depth of Field checkbox here. So I have to turn on this Depth of Field checkbox. When I click that, I can now close up the Render Settings and when I hit Command+R or Ctrl+R again, I'll get a rendering. It looks like nothing happened, that's because really nothing did. What I have to do now is start to adjust the camera properties in order to get the depth of field.
What happens with the Physical Render Engine is that when you activate it, the camera starts to behave in a much more physically correct way. So in order to get a really strong depth of field effect, you have to dial down your F-Stops. Under the Physical menu on the Camera, I've got an F-Stop setting here. It's set for f/8. On a real camera at f/8 on the type of lens that I have here which is a focal length of 36, I wouldn't have a very shallow Depth of field, a lot of my image is going to be in focus. So let's go back to the physical settings and dial the F-Stops down.
I'm going to go to the F-Stops and go from 8 down to 1 and now when I Command+R or Ctrl+R on the PC, you're going to see that some of my image is out of focus. Primarily, it's this area here in front. One of the things that's a bit strange about the Physical Render Engine is that I have to tweak my settings a lot to get the look that I'm going for here. In a real camera, if you're using an F-Stop of 1, you'd have a very shallow depth of field and things would be much less in or out of focus than they are now.
So if I take this F-Stop and I'll dial it down to 0.1 and then I'll hit Command+R or Ctrl+R on the keyboard, you'll see that when I do that, I now have an extreme depth of field. My focus plane is still in focus, but I've got a lot of depth of field coming into and out of that region, going off into the distance, things are getting out of focus, and the in the foreground, things are out of focus. And I did that without using the depth of field adjustments under the Details tab. Now in the Physical Render Engine Settings, Command+B or Ctrl+B on the keyboard to get there.
The quality of the depth of field is controlled by the sampling quality in the Physical Render Settings. So under the Sampler there is a method for sampling and then there's a Sampling Quality. I'm going to just for right now turn the Sampling Quality from Low to High and when I render again, Command+R or Ctrl+R on the keyboard, you're going to notice a couple of things. First of all, it's going to take a lot longer to render. Let's move the Render Settings out of the way. This rendering is going to take quite a bit of time with the Sample Quality set so high. So we're going to fast forward through the rendering to get to the fully rendered image.
But the quality of the rendering is going to be very, very good. The general rule of thumb is that you have to adjust your sample quality based on the amount of time you have to render your project. Obviously, you want to always go for the highest quality possible, but sometimes you need to dial it down to make adjustments for the time you have to render. So you can see those are the two basic methods for creating depth of field inside of CINEMA 4D. We've got the built-in Render Engine which is available to all the versions of CINEMA 4D and then we've got the Physical Render Engine which is available to the Broadcast, Studio, and Visualize versions of CINEMA 4D.