OCIO CDLTransform:
The OCIOCDLTransform node is designed to apply a Color Decision List (CDL) transformation to an image, which is a standardized method used in the film and video industry to adjust color balance and contrast. This node leverages the OpenColorIO (OCIO) framework to perform precise color grading operations, allowing you to manipulate the slope, offset, and power of the RGB channels, as well as adjust the saturation. The CDL transformation is particularly useful for achieving consistent color grading across different shots or scenes, ensuring that the visual tone remains uniform. By using this node, you can apply complex color adjustments in a straightforward manner, making it an essential tool for artists looking to refine the color aesthetics of their digital artwork.
OCIO CDLTransform Input Parameters:
slope
The slope parameter adjusts the gain of the RGB channels, effectively controlling the contrast of the image. It is a list of three values corresponding to the red, green, and blue channels. Increasing the slope value will make the image appear more contrasty, while decreasing it will reduce contrast. The typical range for each channel is from 0.0 to 2.0, with a default value of 1.0, which means no change.
offset
The offset parameter shifts the RGB channels, affecting the brightness of the image. It is a list of three values for the red, green, and blue channels. Positive values will brighten the image, while negative values will darken it. The range for each channel is typically from -0.5 to 0.5, with a default value of 0.0, indicating no change.
power
The power parameter applies a gamma correction to the RGB channels, influencing the midtones of the image. It is a list of three values for the red, green, and blue channels. Values greater than 1.0 will darken the midtones, while values less than 1.0 will lighten them. The range is usually from 0.1 to 2.0, with a default value of 1.0, meaning no change.
sat
The sat parameter controls the saturation of the image, affecting the intensity of the colors. It is a single float value where 1.0 means no change, values greater than 1.0 increase saturation, and values less than 1.0 decrease it. The typical range is from 0.0 to 2.0.
direction
The direction parameter determines the direction of the transformation, either forward or inverse. The forward direction applies the transformation as specified, while the inverse direction reverses it. This is useful for undoing a previous CDL transformation.
rgb
The rgb parameter is the input image data in the form of a numpy array. It represents the pixel values of the image that will undergo the CDL transformation. The array should be in a contiguous format with a shape of [..., 3], where the last dimension corresponds to the RGB channels.
OCIO CDLTransform Output Parameters:
transformed_rgb
The transformed_rgb parameter is the output image data after the CDL transformation has been applied. It is a numpy array with the same shape as the input rgb parameter, containing the adjusted pixel values. This output reflects the color grading adjustments specified by the slope, offset, power, and saturation parameters, providing a visually enhanced image.
OCIO CDLTransform Usage Tips:
- To achieve a natural-looking color grade, start with small adjustments to the slope, offset, and power parameters, and gradually increase them until the desired effect is achieved.
- Use the saturation parameter to enhance or mute colors, but be cautious of oversaturation, which can lead to unnatural-looking images.
- Experiment with the
directionparameter to understand how reversing the transformation affects the image, which can be useful for creating dynamic visual effects.
OCIO CDLTransform Common Errors and Solutions:
"Invalid slope, offset, or power values"
- Explanation: This error occurs when the slope, offset, or power parameters are set outside their valid ranges.
- Solution: Ensure that the slope values are between 0.0 and 2.0, offset values are between -0.5 and 0.5, and power values are between 0.1 and 2.0.
"Invalid saturation value"
- Explanation: This error is triggered when the saturation parameter is set outside its valid range.
- Solution: Check that the saturation value is between 0.0 and 2.0.
"Invalid direction value"
- Explanation: This error occurs when the direction parameter is not set to either
forwardorinverse. - Solution: Set the direction parameter to either
forwardorinverseto specify the transformation direction correctly.
