ART / FLPA / COJO 371
 
Digital Imaging

Week 10 Part II: Depth Maps

Lesson Objectives

At the end of this lesson, students will be able to:

  • create shallow depth of field using the tilt-shift blur tool in Photoshop
  • create a depth map for an image
  • modify an image to show shallow depth of field

Overview

crab

This week we’re focusing on a technique used for 3D programs such as Maya, Adobe Dimensions, Adobe After Effects and others that is important to know about because there are times that depth of field and moving between shallow and deep depth of field is really important to communicating your message.

 

About Depth of Field

Depth of field is the distance between the nearest and furthest objects and how well they are in focus. This is generally a choice that you make as a photographer. The larger the aperture (smaller f/stop like f2.5), the more shallow your depth of field will be, the larger the f/stop number (f22), the deeper your depth of field focus will be.   Also, the closer you are to the primary subject you focus on, the more out of focus other elements may be. There are some other considerations focal length and sensor size as well.

An example of shallow depth of field with a close subject:

shallow depth of field example

Here is an example of deep depth of field, which is commonly used with landscape and architectural photography primarily:

deep depth of field example

About Depth Maps

A depth map is a grayscale image, similar to an alpha channel that is a graphical representation of depth.   Each pixel stores a grayscale value of   0-255   based upon its distance from the camera, 0 being black, 255 being white. Traditionally the objects closest to the camera are white and the objects furthest from the camera are black.

In the image below, there is a deep depth of field, pretty much everything is in focus. But what if you wanted to really highlight the little dog and make everything else blurry like in the flower on the piano image above.  The depth map would look something like this, where the black is furthest from the camera and white closest subject that is to be in focus. Each value is placed on a separate layer.

archway with dog  archway depth map

Using the depth mask layers to make selections from the background, each on their own layer, an image can be built with shallow depth of field by blurring the layers of various depths incrementally. In the case below:

  1. the dog has no blur applied
  2. the 2 map selection has a field blur of 3
  3. the 3 map selection has a field blur of 6
  4. the 4 map selection has a field blur of 9 (note that areas of this layer are covered up by the less blurry ones higher up)
  5. the 1 map was copied and pasted onto the background copy layer mask and inverted. A field blur of 4 was then applied. The gradation allows for no blur in the front and gradually increasing.
  6. the background layer is still visible and in focus but only in the front of the image around the dog, as layers above are blocking the rest out, including the gradient mask on the background copy directly above.

depth map in action

Why do we care about depth maps?

Depth maps have a variety of uses for digital imaging, video,3D imaging, and other simulations.

They can be helpful for simulating volumetric effects like fog to look more realistic.

Depth maps are used as part of a buffering (z-buffer) process used in some 3D applications and games where rendering of objects can be made more efficient for viewers.   It also comes in handy for shadow maps in games and 3D rendering on the fly.

Depth maps can be useful when creating parallax effects (2.5D) on flat images to help mask out parts of the image will be moving in different ways. Here are some great examples of what that looks like:

Creating Depth of Field - Two Methods

I would like you to be aware of two methods for creating depth of field in a photo other than inside the camera itself. There are two primary ways to do this in Photoshop:

1. using the shallow depth of field effect with the tilt shift blur filter – this is a less transferrable skill in terms of software but handy to know how to do. It’s also considered faking it.

2. creating a depth mask

Both of these methods are outlined in detail in the video below. Please watch it through (20min), as it is a very good demonstration of how to do both with some simple examples.

Further Reference

 


HOMEWORK

Exercise

Download one of the following images (click for full image, right-click or drag drop to download).

sheep bison horses llama  

mountain horns hikers valley

Create a depth map for your image. Demonstrate making a depth map with your subject and background at a minimum. Some images may have three levels of depth and some may need a gradient.   You will be applying various levels of blur on each layer of depth. It is your choice whether you want the subject or the background to be in focus.

You will be uploading 4 images:

  1. before any changes (reduce size for upload to width=1000px)
  2. your depth map (can be a screen grab)
  3. your final image with blur applied to depth map areas.
  4. a screen grab of your final layers.

Take some notes on your process.

Journal

  1. Create a new post  on the course website and give it the category ‘Week 10 Part II’².
  2. Upload the JPEG images you worked on for this exercise and the final image.
  3. Write a short reflection on the processes you used to create your image. Were you successful in creating your image? What do you like about it? How could it be improved? Describe any challenges you encountered.

Discussion

Instead of discussion this week, please fill out this poll concerning your Final Project. Two weeks ago, you submitted your Final Project proposal and I want to check in to see how your plans are coming along.   Remember to update your planning file if your ideas shift.

[socialpoll id=”2528451″]