Work with Grain effects



Almost every digital image captured from the real world contains grain or visual noise caused by the recording, encoding, scanning, or reproduction processes and by the equipment used to create the image. Examples include the faint static of analog video, compression artifacts from digital cameras, halftone patterns from scanned prints, CCD noise from digital image sensors, and the characteristic speckle pattern of chemical photography, known as film grain.

Noise isn’t necessarily bad; it’s often added to images to create a mood or tie elements together, such as adding film grain to a computer-generated object to integrate it into a photographed scene. However, noise can be unwanted for aesthetic reasons. Archival footage or high-speed photography may appear unpleasantly grainy; digital compression artifacts or halftone patterns may mar an image; or noise may interfere with technical processes such as bluescreen compositing.

Technical reasons also exist for reducing noise. For example, compression algorithms usually achieve smaller file sizes if the input material is less noisy, so noise reduction is a valuable preprocessing step for work such as DVD creation and video streaming.

The Add Grain, Match Grain, and Remove Grain effects allow you to manipulate grain that appears more or less evenly over an entire image. Grain effects can’t correct image problems that affect only a few pixels, such as dust, salt and pepper noise, or analog video dropouts.

The Add Grain effect generates new grain from nothing; it doesn’t take samples from existing grain. Instead, parameters and presets for different types of film can be used to synthesize different types of grain.

The Remove Grain and Match Grain effects use a two-step process to manipulate grain without affecting the edges, sharpness, or highlights of an image. First, the grain is sampled, either automatically or manually; second, the grain is analyzed and portrayed by a mathematical model, which the effect uses to add, remove, or match the grain.

Three types of grain effects: matching (upper-left), adding (lower-left), and removing (lower-right)

RE:Vision Effects provides the DE:Noise plug-in for removing noise and grain from images. For information, see the RE:Vision Effects website.

Neat Video provides the Reduce Noise plug-in for removing noise from digital video. For information, see the Neat Video website.

Apply a grain effect

Each grain effect is applied with default settings and is displayed in Preview viewing mode, which has a preview region framed by a white border and centered on the image. The preview region displays the results of the grain effect on a portion of your image, for speed and comparison purposes. The grain effects are almost fully automatic but also offer many controls to achieve precise results. You can also selectively apply the grain effects to portions of your image using the extensive Blend With Original features provided with each effect.

  1. Select the layer, and choose Effect > Noise & Grain > [effect].
  2. Choose a viewing method from the Viewing Mode control in the Effect Controls panel:
    Preview
    Displays the current settings of the applied effect in a 200x200-pixel area.

    Blending Matte
    Shows the current color matte or mask, or the combination of both, which results from the current settings of the Blend With Original controls group.

    Final Output
    Renders the full active frame, using the current settings of the effect.

  3. Adjust the controls for the effect in the Effect Controls panel.

    The preview region in the Composition panel reflects any changes you make.

  4. Choose Final Output from the Viewing Mode control.

Apply a grain effect to a selected area

The Blend With Original controls group lets you precisely apply a grain effect to a particular area of an image or sequence by masking and matting the desired area. You can choose between two selection techniques or use a combination of both:
Color Matching
Excludes any area of the image that matches a selected color. By inverting the matte, you can also selectively process such an area.

Masking Layer
Uses any layer in the current composition as a mask to selectively process or exclude an area of the current layer or track.

When any grain effect is first applied, the Amount value of the Blend With Original controls group is set to 0%; this value determines the percentage of blending between the original image and the processed version. At 0%, no blending occurs and the selected effect is applied to the entire image at full strength; at 100%, white areas of the blending matte are unchanged from the original image.

Any mask or matte works in a similar way: The white pixels in it exclude that area of the original image from processing by the grain effect; the black pixels process normally. At 100% Amount, the white areas fully blend with the original so that they are completely excluded from the processing. This behavior remains true when the match is inverted. Regardless of the Amount value, the black areas of the matte or mask are always processed. The Amount slider affects only the areas under the white pixels in the matte or mask. It affects only how each grain effect treats the white areas of the matte or mask.

  1. Apply a grain effect to the image.
  2. Do any of the following in the Effect Controls panel:
    • To create a matte around the area to which you want to apply or exclude the grain effect, use the Color Matching controls in the Blend With Original controls group.

    • To mask the current layer with another layer or track, use the Masking Layer controls.

  3. Adjust the Blur Matte value to soften the matte and to produce a softer transition between the affected and unaffected areas of the image.
  4. If you’re using both a color matte and a layer mask, choose one of the following from the Combine Match And Mask Using menu:
    Screen
    Makes the matte white wherever either the mask or the color match is white.

    Multiply
    Makes the matte white where both of the inputs are white.

  5. Reduce the Amount value to let more of the original image show through the grain.
  6. Choose Final Output from the Viewing Mode control.

Generate a color-matching matte

When a grain effect is first applied, a neutral gray color is used to generate a default color-matching matte, so that in most images a visible matte appears. The Color Matching group of controls uses color matching to precisely define a matte. The matte isolates portions of the image where the layer that uses the grain effect is blended with the input.

  1. Apply a grain effect to the image.
  2. To select a color to exclude from or restrict to the effect, do one of the following adjacent to the Matching Color control in the Blend With Original and Color Matching controls groups:
    • Click the color swatch and select a color in the Color Picker dialog box.

    • Click the eyedropper  and click a color anywhere on the screen.

  3. Do one of the following:
    • To prevent the grain effect from affecting the selected color, make sure that the Invert Match control is deselected.

    • To restrict the grain effect to the selected color, leaving the rest of the image unaffected, select Invert Match.

  4. If you want to exclude colors that are similar to the matching color, increase the Matching Tolerance value, which sets a threshold for color matching. As the value increases, the matte includes pixels with colors increasingly different from the matching color.
  5. Choose an option from the Match Color Using control if you want to change the default criterion (RGB) used to determine that a color is similar to the matching color.
  6. Adjust the Matching Softness controls to determine the width of the transition band between completely matched and completely unmatched pixels or how smoothly the affected areas blend with the original image.
  7. Select Invert Match if you want to invert the matte so that the white areas become black and the black areas become white. (The matching color is black in the matte and is processed by the grain effect regardless of the Amount setting. The inversion doesn’t affect any other settings.)
  8. If you’re using both a color matte and a layer mask, choose one of the following from the Combine Match And Mask Using menu:
    Screen
    Makes the matte white wherever either the mask or the color match is white.

    Multiply
    Makes the matte white where both of the inputs are white.

  9. Choose Final Output from the Viewing Mode control.

Generate a layer matte

In some cases, you may want to use a different layer or track as a mask for the layer that uses a grain effect. This type of mask allows unlimited control over exactly which parts of an image are modified and by how much.

  1. Apply a grain effect to the image.
  2. In the Effect Controls panel, choose the layer that you want to use as a mask from the Mask Layer control in the Blend With Original and Masking Layer controls groups.
  3. Choose a masking mode from one of the standard track matte mode options.
  4. If the masking layer is a different size than the current layer, choose one of the following from the If Mask Size Differs pop-up menu in the Masking Layer controls:
    Center
    Centers the masking layer over the current layer.

    Stretch To Fit
    Resizes the masking layer to match the dimensions of the current layer.

  5. If you’re using both a color matte and a layer mask, choose one of the following from the Combine Match And Mask Using menu:
    Screen
    Makes the matte white wherever either the mask or the color match is white.

    Multiply
    Makes the matte white where both of the inputs are white.

  6. Choose Final Output from the Viewing Mode control.

Change the preview region

You can use the Preview Region controls group to change the position or the size of the preview region for a grain effect.

Because adding or removing grain can affect sharpness of detail, you may want to preview an area of fine detail, such as a human face or some text. When you remove grain with the Remove Grain effect, a best practice is to preview an area where the grain is most clearly visible or most objectionable, such as a large expanse of solid color.

You’ll achieve the best results by experimenting, applying small increments to each of several controls in the Effect Controls panel, and viewing the results in the Composition panel after every adjustment.

  1. After applying a grain effect, click the Center button   in the Preview Region group of controls in the Effect Controls panel.

    A cross hair is centered in the Composition panel.

  2. In the image, click the desired center of the preview region.

    The preview region redraws, centered in the new position.

  3. To change the dimensions of the preview region, change the Width and Height values in the Effect Controls panel to the desired size, in pixels. (Larger preview regions can result in slower rendering.)
  4. Select Show Box if you want to outline the preview region in color. If you want to change the outline color, next to Box Color do one of the following:
    • Click the color swatch and select a color in the Color Picker dialog box.

    • Click the eyedropper button, and click a color anywhere on the screen.

  5. View the results:
    • To view the fine detail of the noise structure, zoom into the preview region.

    • To examine the noise in each channel independently, click the corresponding color channel icon in the Composition panel.

    • To increase the interaction speed and RAM preview duration, use the Region Of Interest feature in the Composition panel to reduce the area that’s processed. (See Region of interest (ROI).)

    • To retain an image of the current frame in its current state, click Take Snapshot  in the Composition panel. You can then click Show Last Snapshot  to view the most recent snapshot instead of the active composition, and to toggle between the current and previous states of the preview region. This technique is extremely useful for evaluating subtle adjustments. (See Snapshots.)

    • To compare the preview region with and without the grain effect, click the Effect switch next to the name of the grain effect in the Effect Controls panel to temporarily disable the effect. Click Take Snapshot  in the Composition panel, click the Effect switch again to re-enable the effect, and then click and hold down Show Last Snapshot  to display the snapshot of the image without the effect.