Grain

The Grain node lets you add synthetic grain (rather than grain derived from actual film stock) to an image. This helps you ensure that all of the elements in your composite, including those which were digitally generated, look like they were shot on the same film stock.

The presets dropdown menu includes predefined types of grain, such as Kodak 5248 and Kodak 5218. These are the correct size for 2K scans.

You can also adjust the Grain node’s controls to match a sample piece of grain:

1.   Find a sample with a rather constant background.
2.   Blur the sample to remove the grain.
3.   Connect the blurred sample to the Grain node’s input.
4.   In the Viewer, wipe between the Grain node and the original sample image, and adjust the Grain node’s controls to match the grain. It helps to view and match each of the red, green, and blue channels separately.

See also ScannedGrain and F_ReGrain.

Inputs and Controls

Connection Type

Connection Name

Function

Input

1

The image sequence to receive the effect.

Control (UI)

Knob (Scripting)

Default Value

Function

User Tab

seed

seed

134

A different grain pattern is produced for each frame. Change this number to get a different initial pattern, for instance if you are using multiple Grain nodes.

If you require an identical grain plate for every frame, enter -frame in this field.

presets

presets

N/A

Choose the film stock you want to match:

Kodak 5248

Kodak 5279

Kodak FX214

Kodak GT5274

Kodak 5217

Kodak 5218

other - changes the label on the node to other. This has no effect on the effect applied.

Size

red

red_size

3.3

Shrinks or enlarges the effect in the red channel.

green

green_size

2.9

Shrinks or enlarges the effect in the green channel.

blue

blue_size

2.5

Shrinks or enlarges the effect in the blue channel.

Irregularity

red

red_i

0.6

Increases or decreases the random quality of the effect in the red channel.

green

green_i

0.6

Increases or decreases the random quality of the effect in the green channel.

blue

blue_i

0.6

Increases or decreases the random quality of the effect in the blue channel.

Intensity

red

red_m

0.416

Increases or decreases the contrast of the effect in the red channel against the original image.

green

green_m

0.46

Increases or decreases the contrast of the effect in the green channel against the original image.

blue

blue_m

0.85

Increases or decreases the contrast of the effect in the blue channel against the original image.

black

black

0

The base amount of grain to add at the black point.

minimum rgb

minimum

0, 0, 0

The minimum output rgb values. If the calculation results in pixel values lower than these, these values are used instead.

Mask

Apply only through alpha

maskgrain

enabled

When enabled, effect is limited to the non-black areas of the image’s alpha channel. This can be useful when you want to apply grain to premultiplied CG images without contaminating the background black.

When disabled, effect is applied to the entire image.

Invert alpha

invert_mask

disabled

Inverts the use of the alpha channel, so that when Apply only through alpha is enabled, the effect is limited to the non-white areas of the alpha.

Step-by-Step Guides

Using Synthetic Grain