You are here: User Guide > Nuke > Keying with Primatte > Adjust Lighting

Adjust Lighting

When adjust lighting is enabled, Primatte first creates a grid on the foreground image and samples the grid to determine which squares contain foreground information and which contain some shade of the background color. Using the remaining shades of blue, it uses extrapolations of the existing backing screen colors, and then uses this technique to fill in the area previously covered by the foreground object. This results in a clean backing screen that has no foreground object (to see this, you can set output mode to adjust lighting BG). Primatte uses this clean backing screen as the reference data to process the original foreground image to generate light-adjusted foreground that has a much more even shade of blue with the foreground object (this is displayed if you set output mode to adjust lighting FG). This allows Primatte to perform the keying operation using the light-adjusted foreground, resulting in a clean key around all areas on the foreground object.

The default settings under Adjust Lighting should detect all the areas of the grid that contain foreground pixels and deliver a smooth, artificially created, optimized backing screen for the keying. Should it fail to do this, you can adjust the settings of the algorithm by moving the threshold slider. This determines if a grid pixel should be treated as a pure background sample, a simulated background sample, or a foreground sample. Increasing the threshold value brings more of the foreground into the adjusted lighting.

If necessary, you can also set the grid size used in the adjust lighting algorithm. Increasing this value increases the grid resolution used in the adjusted lighting calculation.