Blender 2.7 Basics — Tutorial 06: Cameras and Rendering
Working with Cameras
Let’s start by looking at the basic Camera that is part of the default scene.
If we select the Camera we can now go into the Data tab (video camera icon) we can access the properties associated with this Camera. Let’s look at the Display options first.
The Display options show the limits of the camera. We can turn on or off showing how far the mist comes from the camera. If we put a checkmark next to Mist we now see a line being drawn through the Cube.
We can turn on Title Safe Areas by checking the box next to “Safe Areas.” When we go into Camera Mode (0 on the Numpad) we can now see our Safe Areas within the dotted borders.
We can turn on and off the Name of the Camera. If we turn this option on we see the Name of the Camera in the lower-left corner of the Camera View.
The Size parameter grows or shrinks the size of the Camera icon. If we go back out of Camera View (0 on the Numpad) and change the size to 1.0 notice that the Camera has now become larger and if we change it back to 0.5 the Camera becomes smaller.
The Passepartout option sets the amount of gray on the outside of the Camera when in the Camera View. If we go back into Camera View (0 on the Numpad) and change the Alpha to 1.0 we now see black outside the Camera View and if we change it back to 0.5 we get a dark gray color in the background.
Now let’s look at the Lens options.
In the default Blender Render we have two Lens options — Perspective (which is the default) and Orthographic. Let’s quickly look at the Orthographic Lens first. This Lens type flattens the perspective and makes the render flat. The Orthographic Scale controls the apparent size of the objects in the Camera. If we change the Orthographic Scale to 10 the Cube looks smaller and further away from the Camera but if we change it to 5.0 the Cube looks larger and closer to the Camera.
Let’s look at the Perspective Lens which is the Lens we will use most of the time. This Lens acts like a real-world Lens.
The Focal Length parameter controls the amount of zoom or the amount of the scene which is visible. Longer Focal Lengths result in a smaller Field of View and shorter Focal Lengths result in a larger Field of View.
By default the Focal Length is set to 35 millimeters which is the same as a 35-millimeter lens. This is basically a wide-angle lens. If we change the Focal Length to 135 we notice how the Camera zooms in and we get a smaller Field of View. If we change the Focal Length back to 35 we zoom out and now have a larger Field of View.
Shift allows us to shift the Camera up or down. If we change the X value to 0.2 and the Y value to 0.2 notice how the Cube shifts to the lower-left corner of the Camera View.
Clipping is “the interval in which objects are directly visible.” This is a useful option when doing special effects within Blender. If we change the Start to 10 for example we notice a gray bar across the bottom of the Camera View and part of the Cube is disappearing. If we do a quick render you can see that the Camera will only render beginning at the Start point.
Depth of Field
Let’s go back to the 3D View and change the Start Clipping option to 0.1.
Let’s go into Top View (7 on the Numpad) and then use the shortcut SHIFT+A > Mesh > Cylinder to bring in a Cylinder. Then move the Cylinder so it is off to the left of the Cube. Then using the shortcut SHIFT+A > Mesh > Cone add a Cone to the scene and move it to the right of the Cube.
Select the Cube and add a material to it. Go to the Materials tab and change the Diffuse color to red. Select the Cylinder and give it a material by changing its Diffuse color to blue. Select the Cone and give it a material by changing its Diffuse color to green.
Go into Front View (1 on the Numpad) and using the shortcut SHIFT+A > Mesh > Plane add a Plane to the scene. Move the Plane below the Cube and size it using the S key and the number 6. Then give it a material and change the Diffuse color to purple.
Let’s then select the Lamp and change it to a Hemi Lamp. If we render this scene we notice that all the objects are in focus. This is because we don’t have a Depth of Field.
Let’s select the Camera and go back into the Data tab. If we go to the Display options and turn on Limits you notice that we have a cross at the Camera. This is the Depth of Field distance. If we change the Distance to 3.0, notice that this cross moves closer to the Cube. This is telling the Camera where it is going to focus.
In order to actually use the Depth of Field we need to work with Nodes. Let’s split the 3D Viewport into two horizontal areas and change the top area to the Node Editor and the bottom into a UV Image Editor. We need to use Composite Nodes so click on the Compositing Node icon (pictures) and then click on Use Nodes.
We have two Nodes — Render Layers and Composite. We can now add any filter to this Node setup to make changes to the scene. Since we want to add Depth of Field let’s add a Defocus filter by going to Add > Filter > Defocus. Once we place this Node in between the other two notice that the Image inputs and outputs are automatically connected. Now we need to connect the Z-Buffer output from the Render Layers Node to the Z-Buffer input of the Defocus Node.
The fStop is related to the Depth of Field an fStop of 128 means and infinite Depth of Field. What this means is that the higher the number the less Depth of Field and the smaller the number the more Depth of Field. Let’s change the fStop to 2.0 and if we render the scene we see a distinct defocus effect. The Maximum Blur changes the blur of the scene and we will just leave that at the default.
The Threshold determines how wide the focal area is — the larger the number the more stuff is in focus. If we change the Threshold to 10 for example and render the scene, we notice that the Cube and Cone are in focus but the Cylinder and part of the Plane are still out of focus compared to everything being out of focus when we had the Threshold set to the default of 0.2.
Creating Camera Targets
Let’s now look at setting up the constraints of a Camera. Let’s start with a clean scene by going to File > New > Reload Startup File.
If we select the Camera we notice that we can move it like any other object in the Scene. However, there are times where we want the Camera to be pointing at a specific object and be able to move the Camera while keeping the object centered. This is where Constraints come into play in Blender.
Select the Camera and go into the Constraints tab (link icon). The easiest way to focus the Camera on a specific object is to use the Damped Track. Click on Add Object Constraint and then Damped Track under the Tracking option.
We can select a target object by clicking in the Target field and selecting Cube. We can now see that the Camera is pointing in the wrong direction. This can easily be fixed by selecting an Axis — in this case, the -Z-Axis so the Camera is pointing in the right direction. Now if we move the Camera we can see that it is always pointed toward the Cube.
Often times we don’t want to point to a specific object but rather to a target in the scene. We can do this by using a helper object and in this case we will be using an Empty object. Use the shortcut SHIFT+A > Empty > Plain Axes to add an Empty to the scene. Use the Manipulator and move the Empty above the Cube. This is a simple cross-hair target that will not render in the scene.
Select the Camera and go into the Constraints tab and click on Add Object Constraint and then Damped Track under the Tracking option. Choose Empty from the Target list and now notice that the Camera is focusing on the Empty instead of the Cube. This is very useful when doing animation in Blender.
Let’s now look at the Render properties.
Click on the Render tab (camera icon) to open the Render properties. In any scene that we may have there is always the Render properties option.
The first option we see is the Render properties. We can render the scene. We can render animation. We can also render audio. We can also choose how we want to display the Render. We have the option of displaying the Render full screen, in the image editor, in a new window, or we can keep the existing UI.
We have a number of Render Presets available to us. When we select a Preset it changes the Resolution settings, Aspect Ratio settings, and the Frame Rate. If we choose NTSC 4:3 notice that the Resolution changes to 720px by 486px, the Aspect Ratio is now 10 for X and 11 for Y , and the Frame Rate changes to 29.97.
Anti-Aliasing smooths out the edges as it Renders the scene. The higher the number the longer it will take to Render the scene. Shading is an option we have already seen and it deals with the Shadows and Ray Tracing.
Performance tells us how much of the computer will be used to Render the scene. Auto-detect will detect how many processors you have in your system. You can adjust the number of Threads to limit the resources used for Rendering.
The Output option is where we can choose how and where to save our files. By default Blender saves the files to the Temp Directory but we can change this to any folder or drive we wish by clicking on the folder icon. We can export our scene as a PNG, JPG, TIFF, or BMP as well as many other formats supported by Blender. We also have movie formats for rendering animations.