Regrain
Description
Based on DasGrain by Fabian Holtz, Regrain samples the source image’s grain, regenerates and randomizes it for the purpose of adding it back to a degrained composite.
Note: A good degrain result is crucial for Regrain to work.
Node Group
Filter.
Go to the Regrain tutorials to see how it works.
Workflow
1 Connect the original plate into the first input, a degrained plate into the second input and then the composite into the third input. The composite should be done over the degrained plate.
2 Press the Analyze Footage button.
3 Position the sample box to an area without image detail.
4 If seams appear when scattering grain, activate Edge Blend and/or the Distortion Amplitude and Frequency.
5 If desired, limit the scattered grain to the optional Matte input.
Controls
Analyze
Analyze Footage
Calculates the response curve of the grain which is then normalized and adapted to the composite.
Number of Frames
Sets the number of sample frames to be analyzed. More frames produce a more accurate response curve.
Sample Count
The sample count is spread across the sampled frame range based on the AlexaV3LogC curve. This results in more samples in the dark areas and less in bright areas. More samples result in a more detailed response curve, while the accuracy is limited by the quality of the degrain.
Replace
Scatter
Generates grain based on the selection in the sample box and scatters it.
Sample Box
Use the sample box overlay to define a source area to be used for the grain scattering. The sampled grain should be as even as possible and not contain any image detail.
Overlay Cell Pattern
Overlays the cell pattern used to scatter the grain.
Cell Size
The cell size used to scatter the grain.
Edge
Edge Blend Size
Minimizes cell pattern seams if present. Set the View to Adapted Grain to see the cell seams.
Distortion Amplitude
Distorts the cell pattern edges. This is useful if straight seams are visible.
Distortion Frequency
The frequency of the distortion.
Matte
Limits the scattered grain to the selected channel of the optional matte input. Outside of the matte uses the original plate grain.
Enable
Enables the Matte input.
Channel
Red
Uses the red channel.
Green
Uses the green channel.
Blue
Uses the blue channel.
Alpha
Uses the alpha channel.
Luminance
Uses the average luminance of the RGB channels.
Invert
Inverts the matte.
Outputs
Output
Outputs the regrained composite.
Grain Only
Outputs only the generated grain. Use this output in conjunction with the Grain Composite node to composite the grain.