TriDef Photo Transformer - Tutorials
Working With Depth Data
Training objectives
At the end of this tutorial you will be able to:
-
Identify objects
-
Select depth value
-
Sample depth value
-
Add Depth Data points
-
Apply Transparent points
-
View Depth Map
-
Replace depth values
-
Remove Depth Data points
-
Select Depth Data Scale
-
Adjust visibility options
Starting up
-
Start Photo Transformer
-
Choose File > Open.
-
Go to C:\Documents and Settings\All Users\Application Data\DDD\Tutorials\TriDefPhotoTransformer\Tutorial3.TriDefPhoto
Please Note: The Application Data folder is Hidden by default, so you may need to change your Windows Explorer options to see it.
-
Click Open.
About Depth Data
Depth Data describes the relative positions of objects in an image by using shades of gray to indicate distance from the viewer. White means 'closest to the viewer' and black means 'furthest from the viewer'.
There are two number scales you can use to refer to these shades of gray: Percent (0-100) and Value (0-255 gray scale). The first thing we'll do is make sure we're in Percent mode for this tutorial.
-
Choose Edit > Preferences
-
Click the Depth panel.
-
Find the Depth Scale section and make sure the Percent option is selected.
The rest of the settings on this panel should be the same as those you set in Tutorial 1.
-
Click the Close (x) button.
Photo Transformer generates a Depth Map by using the sample Depth Data points you provide when you paint points of gray on your 2-D source image.
You don't have to fill in an entire image with Depth Data to create a complete Depth Map. Photo Transformer compares these Depth Data points with the matching parts of the image and fills in the rest of the Depth Map for you. How it does this depends on the Depth Map settings, which are covered in Tutorial - Advanced Depth Map Settings.
If there isn't enough Depth Data to create a complete Depth Map, Photo Transformer uses the Background Ramp to fill in the gaps. Background Ramps were covered in Tutorial - Backgrounds.
Analyzing the image
View the image in the Drawing window, and decide which objects need separate depth values to distinguish them from the Background Ramp. The tyre is the most obvious object, and because it is almost in the very front it is already Depth Mapped in off white (about 90%). (Some of the sand is closer to the viewer than the tyre is.)
The boy is also a separate object. He is a little further away from the viewer than the front of the tyre, so he will be a slightly darker shade of gray (about 80%) He is also well in front of the fence behind him, so he can't be too dark.
Finally, the tree trunk on the left and the car are worth treating as separate objects, but the rest of the image can be taken care of by the Background Ramp. This means that you don't need to add Depth Data points to those parts of the image.
Selecting depth values
You already have a depth value for the tyre, so use this value as a reference to select a new value to Depth Map the boy, just a little behind the tyre.
-
Select the Freehand Drawing tool from the Toolbar.
-
Click on the top of the Drawing window, anywhere that isn't part of the golf picture.
-
Press the Alt key and click on the tyre in the Drawing window.
-
This temporarily selects the Eyedropper tool, and the Depth value on the tyre itself, about 90.
-
You need a Depth value slightly darker (further away) for the boy, so type 80 in the Depth Picker, and press Enter.
-
Roughly 'outline' the boy with lines and spots then add a few more spots to cover any large areas inside his body.
Add some Depth Data of the same value to the inside of the tyre (the black strip above the boy's head) and the ropes the tyre is hanging from.
-
Press Alt and click where the bottom of the left tree meets the sand.
-
Add some Depth Data to the tree trunk.
-
Press Alt and click on the middle of the car tyre.
-
Add some Depth Data to the car.
Depth values can also be selected by using the slider on the Depth Picker (at the bottom of the Toolbar) or by typing numbers directly into the box above the gray swatch.
Depth values can also be selected by using the slider on the Depth Picker (at the bottom of the Toolbar) or by typing numbers directly into the box above the gray swatch.
Viewing the Depth Map
The Depth Map is what Photo Transformer creates out of your Depth Data and the Background Ramp. It represents the relative depths in all parts of your image.
-
Choose View > Depth
What you will probably see is a 'bleeding' effect as the depth you added to the objects is extended beyond their borders. The solution is to add Transparent points.
About Transparent Points
Transparent points are used to stop depth values from bleeding over the edges of objects. They tell Photo Transformer where to ignore the Depth Data and instead use the Background Ramp to create the Depth Map.
Use Transparent points when your foreground objects are similar in color or shading to the background (e.g. a blue boat on the ocean). Adding Transparent points around the outside of the foreground object constrains the Depth Data to the required area.
Transparent points are red to distinguish them from the gray Depth Data points, and you 'paint' them over your image the same way you do Depth Data.
Adding Transparent Points
Depending on where you have drawn your Depth Data points, you may see overflow effects around the boy's head and the inside of the tyre. What you have to do is add Transparent points to the outside edges of these objects to act as a sort of barrier.
In the Depth window, select the Source checkbox and choose a value of 50 so you can see where the errors in the Depth Map are.
-
Select the Freehand Drawing tool.
-
Click the red Transparent box at the bottom of the Toolbar. The sample swatch above the Depth Picker turns red.
-
Add Transparent Points to anywhere there is depth spillage. You can either click on the Drawing window or directly on the Depth Window.
-
Your Depth Data should now look something like this:
Editing Depth Data points
There are two ways to change the value of Depth Data points without adding new points:
The Replace Depth tool works like a special paintbrush: if you paint over an existing Depth Data point the value of that point will be changed to the currently selected depth value, but it won't add any new Depth Data points.
The Flood Fill tool needs a selection first. Select the Depth Data points you would like to change (this is covered in Tutorial 5), and then click anywhere in that selection to change all of those points to the new value.
It is better to use these tools rather than simply painting on new Depth Data points because too many extra points will just slow Photo Transformer down, and you may get odd patterns on your Depth Map.
-
Drag the red line on the Depth Picker to black, or just click and type 0 in the number box above it.
-
Choose the Replace Depth tool from the Toolbar.
-
Paint some of the Depth Data points on the tyre to see them change to black.
-
Choose Edit > Undo or press Ctrl+Z to undo the change.
Changing the appearance of Depth Data Points
Since it can be difficult to see gray points on some image there is a setting you can use to add some color to your Depth Data points:
-
Choose Edit > Preferences
-
On the Visibility panel, find the Depth Data Points 'Outline' checkbox and select it.
-
Click the color swatch to see the color picker. Select a bright color, then click OK.
All your Depth Data points should now be colored. To return them to pure gray, just clear the Outline checkbox, and close the Preferences box.
Removing Depth Data points
Removing Depth Data points is just like erasing part of an image in a drawing program. When you remove Depth Data points you may find that this does not actually change the Depth Map, if you originally gave Photo Transformer more data than it really needed.
-
Select the Erase Tool using one of the following methods:
-
Press D
-
Choose the Erase Tool from the Toolbar
-
-
Click or drag the Erase Tool over the Depth Data points on the boy's head.
-
Choose Edit > Undo or press Ctrl+Z to undo the change.
Tips:
-
If you are using the Drawing tools, you can temporarily switch to the Erase Tool as long as you hold Ctrl.
-
The
Box Erase tool erases all depth and Transparent points in a rectangular area.
-
When you learn how to select Depth Data points, the Delete key erases all points in a selection.
Next
Either Exit Photo Transformer, saving all your data as Student.TriDefPhoto or proceed directly to Tutorial - 3-D Previews and Outputs.
|