TriDef Photo Transformer - Tutorials
Depth Data Ramps
Training objectives
At the end of this tutorial you will be able to:
-
Select Depth Data points
-
Select an appropriate Ramp Tool
-
Apply Linear Ramp
-
Apply Cylindrical Ramp
-
Apply Radial Ramp
For this tutorial you will practice with an image containing simple shapes.
Starting up
-
Start Photo Transformer
-
Choose File > Open.
-
Open C:\Documents and Settings\All Users\Application Data\DDD\Tutorials\TriDefPhotoTransformer\Tutorial5.TriDefPhoto
Please Note: The Application Data folder is Hidden by default, so you may need to change your Windows Explorer options to see it.
-
Make sure your Depth scale is set to Percent for this tutorial.
Tip: Edit > Preferences > Depth
-
Hide the Depth Data for a moment so you can see the image more clearly.
Tip: Edit > Preferences > Visibility, then set Opacity to 0. Leave this window open.
There are three objects in this image: a solid wedge, a curved piece of paper, and a ball. You could add Depth Data to these objects by painting on points, choosing gradually darker shades as you work from front to back. This would be very time consuming, and could produce a Depth Map with a jagged staircase effect. A better solution is to apply a Depth Data Ramp.
-
Set Opacity back up to 100 so you can see the Depth Data points again.
Tip: Edit > Preferences > Visibility, then set Opacity to 100.
-
Close this window for now.
About Depth Data Ramps
Depth Data Ramps are effects that can be applied to selected Depth Data points to create more realistic 3-D effects. All Depth Data Ramps create smooth gradients between two gray depth values called Depth1 and Depth2
All Depth Data Ramps have to be applied to a selection of existing Depth Data points; you can't draw Depth Data Ramps directly onto an image that has no Depth Data points. Applying ramps often means that you need to add more Depth Data points than you would need just to fill an area with just a flat depth.
Photo Transformer offers 3 types of Depth Data Ramp:
Linear Ramps are used to represent flat receding planes such as floors, walls and tabletops. Depth values vary in a smooth gradient from Depth1 to Depth2. This effect is applied over a selection of Depth Data points using the Linear Ramp tool. The Background Ramp you applied in Tutorial 2 is an example of a Linear Ramp. You will be using two Linear Ramps to Depth Map the wedge shape.
Cylindrical Ramps are used to represent curved surfaces like coffee cups and tree trunks. Depth values vary from Depth1 on the center line to Depth2 along the edges. This effect is applied over a selection of Depth Data points using the Cylindrical Ramp tool. You will be using two Cylindrical Ramps to Depth Map the curved piece of paper.
Radial Ramps are used to represent hollows and bumps such as balls and faces. Depth values vary from Depth1 at the center of a circle or ellipse to Depth2 on the outside edge. This effect is applied over a selection of Depth Data points using the Radial Ramp tool. You will be using a radial Ramp to Depth Map the ball.
The tools to create these are found on the Toolbar:
Selecting Depth Data
Since Depth Data Ramps have to be applied to existing data, you have to start by selecting some data points.
If the groups of data points are surrounded by a lot of clear space as in the tutorial image, you do not have to closely trace around the points themselves. If you select a lot of empty space that doesn't matter.
Selected points have a blue spot in the middle.
-
Choose the Freehand Selection Tool. You can use this tool for selecting any shape, but it is most effective on curves and odd-shaped objects.
-
Select the data points in Shape #2 by drawing a line around the object. Remember, you can include as much clear space as you like - it is the data points that matter.
When you release the mouse you will no longer see the line you just traced, but the points will be selected in blue.
-
Choose the Point Selection Tool.
This tool is used to create or adjust a selection. It can be used to add points to a selection, or remove them.
-
Press and hold Alt, and click along the edge of the selection you just made.
See how some of the points become deselected?
-
Release the Alt key and click on these points again to restore the selection to its original shape.
Experiment some more with this tool: click to add points to a selection, and Alt+click to remove points from a selection.
You will get more selection practice later in this tutorial as you learn to apply Depth Data Ramps.
Applying a Linear Ramp
Shape #1 - the wedge - has two flat planes which will need two separate Linear Ramps to Depth Map. This means you will have to select each plane separately.
-
Choose the Polygon Selection Tool.
-
Select the side of the wedge, by clicking from corner to corner. Double-click to finish the selection.
-
Choose the Linear Ramp Tool. The Depth Picker at the bottom of the Toolbar now has two lines across it (red and green) and two sample swatches above.
-
Click in the text box above the left (red) swatch. Type 100 to select white for the thin edge of the wedge (Depth 1).
-
Draw a horizontal line from the top front point of the wedge to the back edge (See Figure 1, Line 1).
-
When you release the mouse the Depth Data points that you selected will be shaded from Depth1 at the front to Depth2 at the back.
Figure 1
-
Use the Polygon Selection Tool to select the top surface of the wedge.
-
Use the Linear Ramp Tool to draw a vertical line from the top front point of the wedge to the same level as the back of the wedge (See Figure 1, Line 2).
-
Check your Depth Map (View > Depth). You will see a jagged effect of overlapping circles. While you had enough Depth Data to create a flat object, you need more data points to create a smooth gradient.
-
Use the Polygon Draw tool to add more dense data to the top and sides of the wedge.
Tip: You could also draw more points in with the Freehand Draw or Line Draw tools if you wished.
Tip: Leave a space around the line dividing the top and side of the wedge. This will make it easier to select the two planes separately later.
-
Repeat steps 1-8 to reselect each plane and apply the ramps again until you see a smooth gradient in your Depth Map.
Applying a Cylindrical Ramp
If you draw a vertical line through the middle of Shape #2 you can see it is made of two cylinder halves which will need two separate Cylindrical Ramps to Depth Map. This means that you have to select each curved section separately. To start with, think of the left half as convex, or bulging in the middle towards the viewer. Think of the right half as concave, or collapsing away from the viewer.
-
Select the left half of Shape #2, using the Box Selection Tool.
-
Choose the Cylindrical Ramp Tool.
-
Drag the red line in the Depth Picker to select white (100) for the bulge in the middle.
-
Drag the green line in the Depth Picker to select a mid gray (60) for the edges of this cylinder.
-
Draw a horizontal line across the selection (See Figure 2, Line 1). When you release the mouse the Depth Data points along the edges of the selection should be darker than in the middle.
Figure 2
-
Select the right half of Shape #2, using the Polygon Selection Tool this time, to see the difference. You don't have to closely follow the curves of the shape in the source image to select the Depth Data points - empty space in a selection is just ignored.
-
Choose the Cylindrical Ramp Tool.
-
Choose 20 for red (dark gray), and 60 for green (mid gray). This will make the depth values
Keep the green line where it is (mid gray, 60), but drag the red line to dark gray (20).
-
Draw a horizontal line across the center of the selection (See Figure 2, Line 2.). When you release the mouse you should see the opposite pattern to the left side.
-
Check your Depth Map.
Tip: This image has a lot of Depth Data in it now, so you may have to wait for a moment for the Depth Map to update. Look for a bouncing smiley face in the bottom right corner. When it stops moving the Depth Map is up to date.
If you want more practice at applying Cylindrical Ramps, imagine that the left side of Shape #2 is concave instead of convex (and vice versa for the right side).
Applying a Radial Ramp
Shape #3 is a ball which requires a single Radial Ramp. Radial Ramps are drawn from a (not necessarily central) starting point inside a selection, and radiate out to the edges of the selection. Radial ramps can be applied to any shaped selection or object, not just round things.
-
Select the data points in Shape #3 using your choice of Selection Tools.
-
Choose the Radial Ramp Tool.
-
Drag the red line on the Depth Picker to select white (Depth1) (100).
This will be used for the middle of the ball.
-
Drag the green line on the Depth Picker to select a dark gray (Depth2) (20).
This will be used for the outside edges of the ball.
-
Starting in the middle of the ball, drag the mouse to the edge. As you drag an ellipse appears. When you release the mouse, the depth at the center becomes Depth1 and the depth at the edges of the selection becomes Depth2.
Tip: The ellipse you draw with the Radial Ramp Tool does not have to be the same size or shape as your selection. All Depth Data points outside the radial ramp area and inside the selection will be set to the Depth2 value.
-
Check your Depth Map.
If you would like more practice at creating Radial Ramps, imaging that Shape #3 is the inside of a soup bowl as seen from above. That is, concave instead of convex like a ball.
If you would like to save your work, File > Save As Student2.TriDefPhoto.
Next Tutorial - Advanced Depth Map Settings is optional, but gives you alternatives to adding more Depth Data points. This can be important if you are working with large or complex image on a slower machine. |