Replace background in an image with a texture
 
 
 

Remove the sky from an image and replace it with a textured shape.

This “How-To” uses the file annecy.tif, provided in the courseware directory.

First you’ll select the sky and remove it from the image.

To select the sky and remove it

  1. Choose Paint > Select > Magic Wand.

    This tool lets you select a consistently colored area of an image layer.

    Notice that the Paint Panel now displays the Magic Wand Options.

  2. Click the sky to select it.

    The sky appears unchanged, but the rest of the image becomes pink.

    The pink color indicates regions that are not selected. (Regions that are not selected are also referred to as masked regions.)

    Regions that are not pink are selected regions (or unmasked regions).

    Now you can only modify the selected regions (for example, painting, erasing, copying, and so on).

    You cannot modify the pink (masked) regions.

  3. In the Paint Panel under Magic Wand Options change the Tolerance to see how the selection changes.

    For example, set it to 100, 120, 130, and finally 20.

    Notice that the text in the top left corner is not selected (that is, it appears pink).

  4. Choose Windows > Editors > Canvas Layer Editor to open the Canvas Layer Editor window.
  5. In the Canvas Layer Editor window, rename the layer with the picture on it annecy (if not already the case).
  6. Click the icon for the annecy layer to hide it.
  7. Choose Convert > Marquee to mask in the editor.

    A new mask layer called Marquee-# (where # is a number) is created in the bottom section of the Canvas Layer Editor and becomes the active layer.

    Regions of the mask layer that contain red paint represent areas of the active image layer that are masked, and regions of the mask layer that do not contain paint represent regions of the active image layer that are not masked (paintable).

    Here we want to modify the mask by painting directly into the mask layer.

  8. Choose Paint > Eraser > Eraser Hard and erase the red regions that appear over the text.

    Now these regions are unmasked.

    (If there were any masked regions within the sky, for example clouds, you could remove them in a similar way.)

  9. Choose Pick > Object.

    (The reason for this is only so a brush preview doesn’t obscure your view when you zoom into the image in the next step.)

  10. Zoom and pan your view until you are zoomed in very close to the edge of the pink region.

    Notice that the edge of the masked region is very abrupt and jagged.

    Another modification we can make directly to the mask layer is to blur it so that the edge of the masked region is smooth.

  11. Choose Paint Edit > Layer Effect > Blur Layer to blur the Selection layer.

    Now the edge of the masked region is much more smooth.

  12. In the Canvas Layer Editor window, click the icon for the annecy layer to show it again.
  13. Zoom and pan your view until you can see the entire image.
  14. Click the annecy layer to make it the active layer.
  15. Click on the icon next to the Marquee-# layer so that it becomes a icon. The mask is now associated with the annecy layer.
  16. In the Canvas Layer Editor click to erase the selected region of the image.

To create a shape with texture fill for the background

Next you’ll create a new sky for the image using a shape with texture fill.

  1. Choose Curves > Keypoint Curve Toolbox, and in the toolbox choose Keypoint Curve Tools > Rectangle.

    This tool allows you to create a rectangle using Alias curves.

  2. Click just outside the top left corner of the image to set the first corner point for the rectangle.
  3. Click on the opposite corner point for the rectangle so the rectangle surrounds the entire sky region.
  4. Choose Pick > Nothing to clear the selection.
  5. Choose Paint > Shape > Make Image Shape.

    This tool allows you to create a shape with a fill and/or outline using Alias curves.

    Notice that the Paint Control Panel now displays the Shape Outline options and Shape Fill options.

  6. Click the rectangle to select it.

    A check mark should appear on it.

  7. In the Paint Panel, Visibility should be turned off under Shape Outline options, but turned on under Shape Fill options so that the shape has a fill but no outline.
  8. In the Paint Panel under Shape Fill options, click the button beside RGB Color to open the Shape Texture window.

    This lets you choose a texture for the shape’s fill.

  9. In the Shape Texture window click Ramp to choose the ramp texture and open the Shape Texture: Ramp window.

    This window contains parameters that let you customize the ramp texture. You’ll do this later in the tutorial.

  10. Close the Shape Texture: Ramp window.
  11. Click Accept to create the shape.

    A shape layer called Shape-# is created in the Canvas Layer Editor and contains the new shape.

  12. Choose ObjectDisplay > Invisible to hide the rectangle.

To edit the sky

Next you’ll move the shape behind the image and modify the ramp texture so it appears more like an actual sky.

  1. Choose Windows > Editors > Canvas Layer Editor to open the Canvas Layer Editor window.

    There are two layers in this sketch: annecy and Shape-# (where # is a number). annecy is an image layer (indicated by ) and Shape-# is a shape layer (indicated by ).

    An image layer contains paint (in this case, an imported image) and a shape layer contains shapes. You cannot use a brush to paint or erase on a shape layer.

  2. Double-click Shape-# to rename the layer.
  3. Type sky and press (Windows) or (Mac).
  4. In the Canvas Layer Editor window use the to drag the sky layer down.

    Drag the sky layer onto the annecy layer. When a red triangle pointing down appears on the annecy layer, release the.

    The sky layer is now beneath the annecy layer.

  5. Click the white triangle beside the sky layer to display the list of shapes it contains.

    In this case, there is only one shape on the layer: Shape-rectangle.

  6. Click Shape-rectangle to select it.

    It becomes highlighted in yellow.

    The shape’s name appears in the Paint Panel above the Display options.

  7. In the Paint Panel under Shape Fill options, click the beside the button under RGB Color to open the Shape Texture: Ramp window.
  8. Click the red square with an X to the right of the ramp to remove this color from the texture.

    Notice how the shape’s fill changes.

    The black handle at the bottom left corner of the ramp is highlighted in white indicating that it is the active handle.

  9. Drag the Ramp Color slider to the right to change its color to white.

    Notice how the shape’s fill changes.

  10. Click the blue handle at the top left corner of the ramp so it becomes highlighted in white.
  11. Click the Ramp Color to open the Color Editor.
  12. Choose a sky blue color.