Friday, June 3, 2011

Color management

Ramen uses OpenColorIO for color management.
OpenColorIO (OCIO) is an open source color management project from Sony Pictures Imageworks.
It has been used on feature films like Alice in WonderlandCloudy With A Chance Of MeatballsSpiderman(s)Surf's Up, and Watchmen.


Configuring OCIO:


Ramen comes with a very basic OCIO configuration. It's recommended that you download the latest color configurations from OCIO website (download the one that says v0.7v4) and use them instead.
There are currently 4 configs: spi-vfx, spi-anim, nuke-default and iff. Please check OCIO's website for more info. In case of doubt, nuke-default is usually a good choice.


The first time Ramen is executed, it will create a ramen1.0 directory in your home directory.
The easiest way of pointing Ramen to the new color configuration is to copy the config.ocio file and the luts folder to $HOME/ramen1.0/ocio.


A better option is to create an enviroment variable $OCIO and point it to the config you want to use. This way you can use the same configuration for all programs that use OpenColorIO.
It's rumored that future versions of Nuke will use OCIO.
In the following examples, the nuke-default config will be used.

Reading images:

Ramen works in linear color space. Normally, you want to convert all input images 
to linear color space, do all processing and convert to your destination color space 
when rendering the composition.

When reading images, select the input color space in the image_in node controls.
The image will be converted from the color space picked to linear.




Viewing images:

There are controls in the viewer to modify the way the images are displayed.


From left to right, they are display device, display transform, exposure and gamma.
It's important to note that processing is not affected in any way by these controls.
They only change the way images are displayed.

Converting between colorspaces and other ops:

There are a number of nodes related to color management:

- OCIO Colorspace converts between color spaces.
- OCIO File Transform applies luts and other transformations.
- Log to Linear converts between linear and log color spaces.
- CDL can import, export and apply standard CDL ( Colour Decision List) corrections.

Image output:

The last step is converting the images to the output color space when the composition 
is rendered. This is done in the image_out node controls.



The correct color space depends on the output format and the output medium.
For EXR, HDR and floating point TIFF images, linear is the correct pick.
You'd use linear for images used as textures in 3d renderers for example.
For film output, use DPX or Cineon formats and a logarithmic color space.
Use sRGB for images to be displayed on a computer screen ( web, presentations, ...) 
and video ( rec709) for HD video.
------------------------------------------------------------------

8 comments:

  1. How exciting!. Awesome job on the OCIO integration!

    ReplyDelete
  2. Thank you!, but you know, most of the work is yours.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. If i am doing a film out from my HD material, should i use sRGB color space?

    ReplyDelete
  5. In the default config and also in ocio's nuke default config, rec709 is the correct colorspace to use for HD video. Set also the display transform ( in the viewer) to rec709.

    ReplyDelete
  6. Feature request:
    Can you implement color wheels for color correction?

    ReplyDelete
  7. Sorry, no.
    Color wheels don't work with high dynamic
    range images, which is one of the most important features of the program.

    ReplyDelete
  8. high dynamic range images huh? I taught of color correcting for 8bit linear tiff files, as the cameras record in 8bit only format.

    ReplyDelete