Houdini tip | sRGB preview inside Houdini and Mplay

In this post I will describe a little confusion with varying brightness levels I encountered in MPlay and Nuke and how to solve it 🙂

comp_dark_stack_crop
Bottom: Nuke, middle: MPlay with gamma 1 and linear->sRGB LUT applied, top: MPlay with gamma 2.2 and no LUT

 

When comparing renders in Mplay and Nuke you might have noticed that brightness levels do not match. When viewed linear in both applications, they look same, but when switching to gamma-corrected they look different. The reason for it is, that Houdini/Mplay simply apply a gamma of 2.2 to the image, while Nuke will display image in sRGB color space. sRGB and gamma2.2 might look similar at first look, but this might lead to confusion, when we are expecting to see exactly the same result in both apps.

Solution to this is simple: configure Houdini using environment variables to use a linear->sRGB LUT.
To learn more about using environment variables in Houdini check my previous post.

Here is snippet of a windows batch file:

set "HOUDINI_IMAGE_DISPLAY_GAMMA=1"
set "HOUDINI_IMAGE_DISPLAY_LUT=path_to_folder_with/linear-to-srgb_14bit.lut"
set "HOUDINI_IMAGE_DISPLAY_OVERRIDE=1"

On a linux the starting script should contain this:

export HOUDINI_IMAGE_DISPLAY_GAMMA=1
export HOUDINI_IMAGE_DISPLAY_LUT="path_to_folder_with/linear-to-srgb_14bit.lut"
export HOUDINI_IMAGE_DISPLAY_OVERRIDE=1

You can find documentation of houdini environment variables here.
And of course you can get the LUT here (source).

 

Advertisements
Houdini tip | sRGB preview inside Houdini and Mplay