Match Grain
Use the Match Grain node to apply the grain or noise from a clip to your composition.
Access | To access the Match Grain menu, use:
|
Inputs |
|
Outputs |
|
All connected inputs must have the same resolution.
The Front, Degrained Clip, and Original Clip inputs must have the same colour space.
Workflow
To reapply the grain on a composited clip
- Connect a clip to each of the Front, Degrained Clip, and Original Clip inputs.
- Analyze the differences between the Degrained Clip and the Original Clip inputs. The analysis outputs red, green, and blue curves, each representing the grain intensity over various luminance levels.
- Adapt the grain to the Front clip by leveraging the RGB curves.
To apply the same grain on other clips
- Duplicate a Match Grain node.
- Connect the Normalized Grain output of the original node to the Grain input of the duplicated node.
- Connect another clip to the Front clip input of the duplicated Match Grain node.
By connecting the Normalized Grain from the original node to the Grain input of the duplicated node, you carry over the the Red, Green, and Blue curves created by the original analysis. This allows you to apply the normalized grain to the clip connected to the Front input.
Settings
Analysis
The first step in the match grain process is the grain analysis. You start an analysis by clicking Analyze. Use the controls in the Analysis section to limit the extent of the analysis.
This analysis compares the Original Clip with its Degrained version. This comparison extracts the grain and analyzes its intensity at various luminance levels, creating RGB curves. Match Grain uses this information to match the grain to the clip connected to the Front input.
The quality of the degraining process significantly impacts the precision of the analysis. If the analysis does not yield satisfactory results, the Degrained clip may be the source of the problem. You can also fine-tune the normalized grain by editing the Red, Green, and Blue curves.
Samples field
Sets how many slices will be created on the luminance spectrum for the analysis. Every slice is then analyzed to create Red, Green, and Blue curves.
From field
Sets the first frame used for the analysis.
To field
Sets the last frame used for the analysis.
Step field
Sets the frame interval in between the first and last frames.
You don't have to analyze all the frames if there is no luminance variations throughout the clip. Analyzing only the first 20 frames should usually be enough. For clips with bright highlights, such as HDR clips, analyzing more frames may be necessary.
Range option 
Select Setup Range to analyse frames ranging from the Setup Start to Setup End frames. Select Custom Range to define a range of frames.
When Setup Range is selected, the Step numeric field is initially set to a value that equals the setup duration divided by 20, but is editable.
Curves
The analysis outputs Red, Green, and Blue curves that define the average grain intensity based on the clip's luminance. The analysis may not produce optimal results if there aren't enough pixels in a given sample. To rectify this situation, reduce the number of samples so each sample includes more pixels, or analyze additional frames.
The curves are used for grain normalization and to match the grain to the Front clip.
Changing the Grain Colours
To alter the colour in the grain, do not use the Match Grain node where you perform the analysis. Try the following instead:
- Output the normalized grain from the Match Grain node where you conducted the analysis.
- Duplicate the node.
- Connect the Grain output from the original node to the Grain input of the duplicated node.
- Change the curves in the duplicated Match Grain node.
By editing the curves in another node, you preserve the results of the original analysis and their accuracy by making sure they are used solely for grain normalization. You can then use these normalized results in the duplicated node to exclusively match the grain on the Front clip.
Curves Controls
Standard controls are available to select the Histogram to display in the background, select the curves, frame the canvas, and reset the curves.
Add and delete points with the Add Points and Delete tools.
Dispersion
A part of the grain texture can be dispersed to the entire image or to a specific area defined by the clip connected to the Matte input. This is useful to remove visible artefacts and ensure that the grain is uniform across the entire frame. The dispersion is achieved using the following controls:
Active
Activate the grain dispersion. A bounding box widget appears in the viewport and can be used to define the region of the grain texture to disperse. Define a region containing a uniform grain texture. If you're using an external matte to limit where the dispersion occurs, select a region that matches the part of the image to which you're applying the grain.
The frame field below the Active button indicates at which frame the grain was sampled. A new sample is taken every time the bounding box is activated or moved.
Box
Enable to show the bounding box in the viewport. Disable to hide it.
Box colour
Set the colour of the bounding box.
Show Cells
Enable to show the edges of the cells used to disperse the grain. Disable to hide them.
Cell Size field
Sets the size of the cells.
Even though the range of this setting goes from 5 to 200, it is possible that increasing the size will have no effect if the bounding box is too small.
Distortion field
Sets the amount of turbulence applied to the cells' edges.
Blending field
Blends the grain texture between two cells.
Boosted Grain view
The Boosted Grain view is available from the View drop-down or can be selected using the F6 keyboard shortcut. It is used to highlight the grain texture applied to the Front clip and is particularly useful while adjusting the dispersion area.
Transforms
The Red, Green, and Blue channels of the dispersed grain can be modified using Scaling, Blurring, and Gain controls. The scope of each transform can be set based on the External Matte.
Use: | To: |
---|---|
Bypass Matte | Apply the transforms to the entire image. |
Inside | Apply the transforms inside the matte, in the white part of the External Matte clip. |
Outside | Apply the transforms outside the matte, in the black part of the External Matte clip. |
The Proportional buttons are used to apply changes to all channels proportionally or to affect only one channel at a time.
Scale
The size of the grain in the Red, Green, and Blue channels can be scaled with the Scale X and Scale Y fields.
Blur
The grain in the Red, Green, and Blue channels can be blurred with the Blur Controls.
Gain
The brightness of the grain in the Red, Green, and Blue channels can be modified with the Gain controls.
External Matte
Enable the Active button to limit where the grain dispersion or external grain are applied using the clip connected to the Matte input.
Grain Output
Select the type of grain to output from the Match Grain node.
Grain | The difference between the Original Clip and the Degrained Clip. |
Normalized Grain | The grain normalized according to the luminance. This output must be used when you want to apply external processing on the grain and/or use it in a duplicated Match Grain node. |
Matched Grain | The grain adapted to the Front clip. |