PLogLin

Converts between logarithmic and linear encoding (colorspace) based on a single gray point rather than the standard Cineon formula with a black point and white point (the formula that the Log2Lin node uses). This method is frequently referred to as Josh Pines log conversion.

Like the Log2Lin node, you can use this node to override Nuke’s default Cineon-conversion. When doing so, ensure that the Read or Write node is not applying an automatic colorspace conversion based on its assumptions about the file format. You can do this by setting colorspace on the Read or Write to linear or enabling its raw option. PLogLin uses the formula posted on the EXR list at:
http://lists.gnu.org/archive/html/openexr-devel/2005-03/msg00006.html

See also Log2Lin.

Inputs and Controls

Connection Type

Connection Name

Function

Input

unnamed

If you are using this node to convert your input file to linear, attach the Read node here.

If you are using this node to convert to logarithmic for output, attach the node whose result you want to output here.

mask

An optional image to use as a mask. By default, the colorspace conversion is limited to the non-black areas of the mask.

At first, the mask input appears as triangle on the right side of the node, but when you drag it, it turns into an arrow labeled mask. If you cannot see the mask input, ensure that the mask control is disabled or set to none.

Output

 

If you are using this node to convert your input file to linear, attach any nodes you want to use to process the image here.

If you are using this node to convert to logarithmic for output, attach the Write node here.

Control (UI)

Knob (Scripting)

Default Value

Function

PLogLin Tab

channels

channels

all

The PLogLin effect is only applied to these channels.

If you set this to something other than all or none, you can use the checkboxes on the right to select individual channels.

operation

operation

log to lin

Select the operation you want the node to perform:

log to lin - convert the input from logarithmic to linear colorspace.

lin to log - convert the input from linear to logarithmic colorspace.

linear reference value

linref

0.18

Set this to the linear value that corresponds with the log reference value.

For example, you could leave this at 0.18 (mid-gray) and enter the logarithmic value that corresponds with 0.18 in the log reference value field.

log reference value

logref

445

Set this to the logarithmic value that corresponds with the linear reference value.

negative gamma

ngamma

0.6

The film response gamma value.

density per code value

density

0.002

The change in the negative gamma for each log space code value.

mask

N/A

disabled

Enables the associated mask channel to the right. Disabling this checkbox is the same as setting the channel to none.

maskChannelInput

none

The channel to use as a mask. By default, the colorspace conversion is limited to the non-black areas of this channel.

inject

inject

disabled

Copies the mask input to the predefined mask.a channel. Injecting the mask allows you to use the same mask further downstream.

invert

invert_mask

disabled

Inverts the use of the mask channel so that the colorspace conversion is limited to the non-white areas of the mask.

fringe

fringe

disabled

When enabled, only apply the effect to the edge of the mask.

When disabled, the effect is applied to the entire mask.

(un)premult by

N/A

disabled

Enables the associated channel to the right. Disabling this checkbox is the same as setting the channel to none.

unpremult

none

The image is divided by this channel before being processed, and multiplied again afterwards.

If you are using premultiplied input images, you may want to check (un)premult by and select rgba.alpha here. This will simulate doing the colorspace conversion before the premultiplication was done. It is the same as adding an Unpremult node before this node and a Premult node after, but allows you to work faster if you’re only using one color correct node.

If you are using unpremultiplied input images, you should leave this set to none.

invert

invert_unpremult

disabled

Inverts the use of the (un)premultiply channel.

mix

mix

1

Dissolves between the original image at 0 and the full colorspace conversion at 1.

Step-by-Step Guides

To Convert Between Logarithmic and Linear Color Spaces